| Previous | Next |
| ERROR_NO_SYSTEM_MENU | ERROR_INVALID_SPI_VALUE |
ERROR_INVALID_MSGBOX_STYLE
The message-box style combination is invalid
MessageBox uses a bit field to select button groups, icon, default button, modality, alignment, and other behavior. Some bits are alternatives within a mask rather than independent features that can all be ORed together.
This status indicates parameter validation before ordinary user interaction. It is especially useful when style flags are assembled from configuration or translated from another UI framework: a numeric value can contain mutually incompatible group selections or bits that are not valid for the called API.
What to check
- Log the final style value in hexadecimal and decode every flag by mask group.
- Choose exactly one button-group value and one icon/default-button value where the API defines alternatives.
- Remove framework-private flags before calling USER32.
- Reproduce with a minimal fixed style to isolate the bit group that introduces the invalid combination.
The error does not indicate that a button click or dialog procedure failed; USER32 rejected the style description used to create the message box.
References
- Microsoft: Dialog Box Programming Considerations
- Microsoft: Windows and Messages
- Wine: user32 API implementation inventory
Looking for a different code? Search another status or error code.