The operating system communicates with your application window by
passing messages to it. A message is simply a numeric code that
designates a particular event. For example, if the user presses the left
mouse button, the window receives a message with the following message
code.
#define WM_LBUTTONDOWN 0x0201
Some messages have data associated with them. For example, the WM_LBUTTONDOWN message includes the x-coordinate and y-coordinate of the mouse cursor.
To pass a message to a window, the operating system calls the window procedure registered for that window.
No comments:
Post a Comment