Microsoft KB Archive/74297

{|
 * width="100%"|

INFO: Button and Static Control Styles Are Not Inclusive

 * }

Q74297

-

The information in this article applies to:


 * Microsoft Win32 Software Development Kit (SDK)
 * Microsoft Windows Software Development Kit (SDK) versions 3.0, 3.1

-

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.

Additional query words:

Keywords : kbButton kbCtrl kbOSWinNT kbOSWin2000 kbSDKWin32 kbStaticCtrl kbGrpDSUser kbOSWin

Issue type : kbinfo

Technology : kbWin32SDKSearch kbAudDeveloper kbWin3xSearch kbSDKSearch kbWin32sSearch kbWinSDKSearch kbWinSDK300 kbWinSDK310