INFO: Button and Static Control Styles Are Not Inclusive

ID: Q74297


The information in this article applies to:


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.


Keywords          : kbButton kbCtrl kbNTOS kbStaticCtrl kbGrpUser kbWinOS 
Version           : 
Platform          : 
Issue type        : kbinfo 

Last Reviewed: March 7, 1999