-
samurai warrior
DispatchMessage(&msg);
what i heard is that DispatchMessage calls Windows..which in turn calls the WndProc...and in the WndProc there's a switch statment...
switch(message)
{
case WM_CREATE:
return 0;
case WM_PAINT:
return 0;
etc....
}
well how does Windows know what handle to window it is?
-
The handle to the appropriate window is found in the hwnd member of the MSG structure referenced by the call to DispatchMessage. The MSG structure also contains the message ID and two message parameters that DispatchMessage sends the window.
DispatchMessage generally handles messages posted using the PostMessage function. If the hwnd member is NULL, DispatchMessage, I presume, does nothing.
Popular pages
Recent additions