What does Windows error code 1436 (ERROR_CHILD_WINDOW_MENU) mean?

 
Previous Next
ERROR_DESTROY_OBJECT_OF_OTHER_THREAD ERROR_NO_SYSTEM_MENU

ERROR_CHILD_WINDOW_MENU

Child windows do not own menus through the creation parameter

The hMenu parameter of CreateWindowEx is overloaded by window type. For overlapped or pop-up windows it identifies a menu. For a child window it specifies the child-window identifier used by the parent and dialog-style command routing.

Treating a child as if it had a top-level menu confuses those two contracts. The fix is not to cast the menu handle differently; the window hierarchy or the menu ownership design must change.

What to check

  • Confirm whether WS_CHILD is set on the created window.
  • For a child, pass the intended control ID in the creation parameter.
  • Attach menus to the appropriate top-level window or implement child-specific commands through the parent.
  • Audit wrapper APIs that call the parameter simply menu and hide its child-ID meaning.

This is closely related to ERROR_TLW_WITH_WSCHILD, but here the specific conflict is menu semantics on a child window.

References


Looking for a different code? Search another status or error code.