INFO: Button and Static Control Styles Are Not Inclusive

ID: 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
  • Microsoft Windows 2000


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 kbNTOS kbWinOS2000 kbSDKWin32 kbStaticCtrl kbGrpUser kbWinOS
Version : WINDOWS:3.0,3.1
Platform : WINDOWS
Issue type : kbinfo


Last Reviewed: January 28, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.