|
|
The command message, indicates a notification message from child window, or the user has selected a menu item. This message sent to the window when the user has selected a menu item, or a child window has sent a notification message to the parent.
MSG_COMMAND int id = LOWORD(wParam); int code = HIWORD(wParam); HWND hwnd = (HWND)lParam;
|
|
|
Get default push button ID first.
|
|
|
Set default push button ID first.
|
|
|
Indicates the window is disabled/enabled. This message is sent to the window if the window has been disabled or enabled.
MSG_ENABLE BOOL enabled = (BOOL)wParam;
|
|
|
Indicates the window font has been changed. This message is sent to the window after the window font has changed. Some window should be repainted to reflect the new window font. |
|
|
Indicates the user is trying to change the font of the window. This message is sent to the window when the user is trying to change the font of the window by calling SetWindowFont. If you return non-zero after handling this message, SetWindowFont will return immediately, i.e., the default window font will not change.
MSG_FONTCHANGING PLOGFONT log_font = (PLOGFONT)lParam;
|
|
|
You can send this message to freeze or thaw the paint action of the control.
MSG_FREEZECTRL BOOL bFrozen; wParam = bFrozen lParam = 0;
|
|
|
Get dialog code.
|
|
|
Sent to the control to get the text. This message is sent to the control when you calling GetWindowText function to get the text.
MSG_GETTEXT int max_len; char* text_buf; wParam = (WPARAM)max_len; lParam = (LPARAM)text_buf;
|
|
|
Sent to the control to get the length of the text. This message is sent to the control when you calling GetWindowTextLength function to get the lenght of the text.
MSG_GETTEXTLENGTH wParam = 0; lParam = 0;
|
|
|
This message will be sent to the container window procedure after the container window is created. This message is sent to the container in order that you can initialize the controls in the container.
MSG_INITCONTAINER DWORD add_data = (DWORD)lParam;
|
|
|
Ready to initialize the controls in a dialog box. This message is sent to the dialog in order that you can initialize the controls in the dialog box.
MSG_INITDIALOG HWND focus_hwnd = (HWND)wParam; LPARAM lparam = (LPARAM)lParam;
static int DepInfoBoxProc (HWND hDlg, int message, WPARAM wParam, LPARAM lParam) { struct _DepInfo *info; switch(message) { case MSG_INITDIALOG: { /* * Get the lParam passed to this dialog box, and assign it * to the second private additional data assoiciated * with the dialog box. */ info = (struct _DepInfo*)lParam; SetWindowAdditionalData2 (hDlg, (DWORD)lParam); break; } case MSG_COMMAND: { /* * Get the parameter from the second private data assoiciated * with the dialog box. */ info = (struct _DepInfo*) GetWindowAdditionalData2 (hDlg); switch(wParam) { case IDOK: /* Use the data in the parameter. */ ...... case IDCANCEL: EndDialog(hDlg,wParam); break; } } } return DefaultDialogProc (hDlg, message, wParam, lParam); } |
|
|
Ready to initialize the controls in a property page. This message is sent to the page in order that you can initialize the controls in the page.
MSG_INITPAGE DWORD add_data = (DWORD)lParam;
|
|
|
Sends to a window to query whether the window is a dialog window.
|
|
|
Sent to the control to set the text. This message is sent to the control when you calling SetWindowText function to set the text.
MSG_GETTEXT char* text_buf; wParam = 0; lParam = (LPARAM)text_buf;
|
|
|
Indicates that a PSM_SHEETCMD message had been sent to the PropertySheet control. This message is sent to the property page when the property sheet contains the page received the PSM_SHEETCMD message.
MSG_SHEETCMD WPARAM param1 = wParam; LPARAM param2 = lParam;
|
|
|
Indicates the page will be shown or hidden. This message is sent to the page when the page will be shown or hidden.
MSG_SHOWPAGE HWND focus_hwnd = (HWND)wParam; int show_cmd = (int)lParam;
|
|
|
This message will be sent to the parent of the ScrollView control when the container of the ScrollView control reveived a MSG_COMMAND message. This message will be sent to the parent of the ScrollView when the container of the ScrollView control reveived a MSG_COMMAND message. Generally, the notification of the child control in the container will be sent via MSG_COMMAND to the container. If you have not defined your own window procedure for the container, this message gives a chance for the parent of the ScrollView control to handle the notifications come from the controls in the container. Note that you can also define your window procedure for the container, and handle the notification from the child control in this procedure.
MSG_SVCONTCMD WPARAM param1 = wParam; WPARAM param2 = lParam;
|
|
|
The system command message.
|
1.4.2