| Previous | Next |
| ERROR_CHILD_WINDOW_MENU | ERROR_INVALID_MSGBOX_STYLE |
ERROR_NO_SYSTEM_MENU
The window does not have a system menu
The system menu is the window menu associated with top-level window operations such as move, size, minimize, maximize, and close. Its presence depends on the window's style and type; it is not a universal menu attached to every HWND.
A helper that calls system-menu APIs for child windows, tool windows with different chrome, or top-level windows created without the relevant style can encounter this condition. Adding menu items cannot work until the target actually has a system menu.
What to check
- Inspect the target window type and style bits, including
WS_SYSMENU. - Call system-menu APIs only for windows whose nonclient design includes that menu.
- Do not confuse the application menu returned by
GetMenuwith the system menu. - When styles change dynamically, reacquire the system-menu handle instead of caching it indefinitely.
A missing command in an existing menu is a different lookup problem; this code says the target window has no system menu to operate on.
References
Looking for a different code? Search another status or error code.
