CodePudding user response:
OnFileNew no actual meaning, just framework reserved interfaceCall is ok, but why call it,
Related functions or to yourself
CodePudding user response:
Fyi:WM_COMMAND
The WM_COMMAND message is sent when The user selects a command item from a menu, when a control sends a notification message to its parent window, or when an accelerator keystroke is translated.
WM_COMMAND
WNotifyCode=HIWORD (wParam);//notification code
WID=LOWORD (wParam);//item, control, or accelerator identifier
LParam hwndCtl=(HWND);//handle of the control
The Parameters
WNotifyCode
The Value of the high - order word of wParam. Specifies the notification code if the message is from a control. If the message is from an accelerator, this parameter is 1. If the message is from a menu, this parameter is 0.
WID
The Value of the low - order word of wParam. Specifies the identifier of the menu item, control, or accelerator.
HwndCtl
Value of lParam. Handle to the control sending the message if the message is from a control. Otherwise, this parameter is NULL.
The Return Values
If an application the processes this message, it should return zero.
Few
Accelerator keystrokes that select the items from the window menu are translated into WM_SYSCOMMAND messages.
If an accelerator keystroke occurs that corresponds to a menu item when the window that owns the menu is minimized, no WM_COMMAND message is sent. Or, If an accelerator keystroke occurs that does not match any of the items in the window 's menu or in the window menu, a WM_COMMAND message is sent, even If the window is minimized.
If an application enables a menu separator, the system sends a WM_COMMAND message with the low word of the wParam parameter is set to zero when the user selects the separator.
QuickInfo
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: the Requires version 1.0 or later.
Header: Declared in winuser. H.
See Also
Edit Controls the Overview, Edit Control Messages, WM_SYSCOMMAND
CodePudding user response: