1. Automatically display the identifier of the window: ws_visible. If this identifier is not present, the created window needs to be manually displayed by ShowWindow ().
2, UpdateWindow () produces a WM_PAINT message.
3. The parameter HWND in the message handler function WinProc () only works when multiple windows created with the same window class are used, which indicates which window the message is from.
4. Wm_destroy is generated when the window is closed, this message does not terminate the application, just closes the window. A WM_CLOSE message is generated before this.
5, after each processing of a message, with return (0), to exit WinProc (), and the notification system has processed the message.
6. All parameters passed to WinProc () are included in the MSG struct, and the struct can be captured by getmessage () or PeekMessage () in the message loop.
7. <windowsx.h> contains some useful macros and constants. WIN32_LEAN_AND_MEAN macro hint system does not contain MFC's related things.
8. When a string is loaded as a resource, the length of each line cannot exceed 255 characters (including the constant itself).
9, in addition to the escape sequence "\ n" cannot be placed in the string form, other characters can be, for example:%d, octal code sequence "\015" and so on.
10, int LoadString () loads the string resource, returning the loaded string length.
11, the mouse position is relative to the customer area, excluding boundaries and controls, the mouse is relative to the upper left corner (0,0) coordinates; the mouse key encoding (beginning with mk_) is processed in Wm_mousemove.
12, the function of sending messages by themselves:
LRESULT SendMessage (): Passes a message to the window that requires immediate processing after the receive window finishes processing the message, and the WinProc () function of the receiving window is returned with a return value of WinProc ();
BOOL PostMessage (): Inserts a message sequentially into the message queue, executes when the message is on, that is, there is a delay in the processing of the message that is passed by the function, and if this short delay is not the case, the function can be used to pass the message, and the function is not prone to the message chaos.
...... Keep updating ...
Windows game Programming Master reading notes