First, the overview control is a sub-window, which is the system has defined a good window class, so there is no need to register, nor does it require a write message processing function. Create a sub-window when you get a WM_CREATE message at the main window. Second, instance // Parameters: window handle, message, message parameters, message parameters LRESULT CALLBACK WNDPROC (HWND HWND, UINT MESSAGE, WPARAM WPARAM, LPARAM LPARAM) {// Handling Message Switch (Message) {Case WM_CREATE: CREATEWINDOW (Text ("Button"), // Control "class name" Text ("button (& A)"), WS_CHILD | WS_Visible | BS_PUSHBUTTON, 10, 10, 100, 100, HWND, (HMENU) 1000, // Control ID (LPCreateStruct) LParam -> hinstance, // Example handle null); return 0; case wm_destroy: // When the user turns off the window, the window is destroyed, the program needs to end, send the message to exit the message loop PostquitMessage (0); RETURN 0;} // Other messages are handed over to the default processing function provided by the system Return :: DefWindowProc (HWND, Message, WPARAM, LPARAM); Structural pointer (LPCREATESTRUCT). The structure contains some useful information (parameters when the window is established). typedef struct tagCREATESTRUCT {LPVOID lpCreateParams; HINSTANCE hInstance; // instance handle HMENU hMenu; HWND hwndParent; int cy; int cx; int y; int x; LONG style; LPCTSTR lpszName; LPCTSTR lpszClass; DWORD dwExStyle;} CREATESTRUCT, * LPCREATESTRUCT; Fourth, the control and the parent window will send a notification message WM_COMMAND to the parent window when an action occurs on the control. WM_COMMAND: HiWord (WPARAM): Notification Code Loword (WPARAM): Control ID (HWND) LPARAM: Control Handle In addition to WM_COMMAND, each control may have other notification messages (such as WM_DRAWITEM). 2. When the parent window needs to control the control, send the control message to the control. The control handle should be recorded in advance, or obtain the control handle by ID 3. Note: Notification Unit and control messages for various controls can be found by MSDN-> Platform SDK-> User Interface Services-> Windows User Interface-> Controls.