If there is no message in the Message Queue, GetMessage will not return until there is. The call to GetMessage tells windows to retrieve the first message in the Message Queue. The MSG structure is a structure that holds all the information about the message: The window it was sent to, the message identifier, the two lParam/ wParam parameters that come with the message, the time at which the message was sent, and the position of the mouse when the message was sent. Usually, the Message Loop is implemented as a basic while loop: Every window must have a window class, so typically, RegisterClass is called in WinMain. To create a Window class, you call RegisterClass that accepts a WNDCLASS structure defining the properties of the Window class. In Windows, every window has a Window Class that defines the attributes of a window such as the window's icon, the window's background and the window's procedure. This kind of class is a template or model for creating windows. Window "classes" in traditional programming for Windows define the characteristics of a "class" (not a C++ class) from which any number of windows can be created. No CWinApp to implement the Message Loop for you. Handling messages in SDK applications is a totally different process than MFC. The Dialog part assumes you are familiar with creating modal and modeless dialog in a SDK program. This article assumes you are familiar with creating a window in an SDK program.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |