What does Windows error code 1422 (ERROR_INVALID_COMBOBOX_MESSAGE) mean?

 
Previous Next
ERROR_CONTROL_ID_NOT_FOUND ERROR_WINDOW_NOT_COMBOBOX

ERROR_INVALID_COMBOBOX_MESSAGE

The message is incompatible with the combo-box style

Win32 has three main combo-box forms. CBS_SIMPLE and CBS_DROPDOWN expose an editable selection field, while CBS_DROPDOWNLIST displays the selection in a static control and does not let the user type arbitrary text.

Messages such as edit-selection operations are meaningful only when the combo contains an edit control. Sending one to a drop-down-list style is a contract mismatch, even though the target HWND is a valid combo box.

What to check

  • Read the actual style bits of the created control, not only the resource editor design intent.
  • Map each CB_* message to the combo types documented to support it.
  • Use selection-item messages for CBS_DROPDOWNLIST instead of edit-selection messages.
  • Check that a runtime style/resource variant did not change the control type.

Unlike ERROR_WINDOW_NOT_COMBOBOX, the window is a combo box; the requested message is incompatible with its internal composition.

References


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