INF: Button and Static Control Styles Are Not Inclusive

ID Number: Q74297

3.00

WINDOWS

Summary:

The class-specific window styles for button controls (BS_*) are

mutually exclusive, as are the class-specific window styles for static

controls (SS_*). In other words, they cannot be OR'd together as can

most styles for edit controls, list boxes, and combo boxes.

For example, the following style is invalid:

BS_OWNERDRAW | BS_AUTORADIOBUTTON

A button control is either owner-draw or it is not. In the same

manner, the following style is also invalid:

SS_LEFT | SS_GRAYFRAME

WINDOWS.H defines button and static styles sequentially (1, 2, 3...),

instead of as individual bits (1, 2, 4...) as other control's styles

are defined. If sequential styles are OR'd together, the resulting

style may be completely different from that intended.