Is my understanding of __declspec(dllexport) and __declspec(dllimport) correct?
__declspec(dllexport)
is used to inform the compiler that this function or class is used as a public library, and __declspec(dllimport)
is used to inform the compiler that this function or class is not defined in the current file and will be imported from other DLL files.
How can I make an async client server system with overlapped io in c using windows.h
I’ve been trying to make an async system where both the client and the server can send and receive messages at anytime for some time and I haven’t been able to wrap my head around overlapped io.
Why am I not getting correct cursor coordinates with Windows API functions?
I am trying to capture the coordinates of the cursor in a Windows application. While the coordinate for the position (0, 0) is displayed correctly in the upper left corner, the coordinates become more and more distorted the further I move away from it, so that instead of (600, 600) only (583, 560) is displayed in the lower right corner. Here is the code I’m using
Drawing an ellipse with GDI+ while dragging mouse
With a small change, the code under WM_MOUSEMOVE in the link below can draw a 10 pixel thick red ellipse by dragging the mouse. The first Ellipse function erases the previous ellipse.