Article ID: 152000 - Last Review: November 21, 2006 - Revision: 2.1 PRB: Appearance Property Uses Windows 4.0 WS_EX_CLIENTEDGEThis article was previously published under Q152000 On This PageSYMPTOMS
MFC Controls support a set of standard properties. One of these properties
is Appearance (DISPID_APPEARANCE). Appearance is implemented to give a
control a 3-D look. If the control is used on a version of Windows or
Windows NT less than 4.0, the Appearance property will not affect the
appearance of the control at run time.
CAUSE
At run time, the Appearance property is implemented in an MFC control by
setting an extended window style WS_EX_CLIENTEDGE. This window style is not
supported on versions of Windows or Windows NT less than 4.0.
RESOLUTION
It is possible to supply your own implementation of the Appearance property
although this technique will not work for subclassed Windows controls.
STATUS
This behavior is by design.
MORE INFORMATION
Using the Class Wizard, add the stock Appearance property but choose
Get/Set methods rather that accepting the stock implementation. In the
control, declare a member variable of type BOOL to represent the Appearance
property. The stock Get/Set functions can be copied and changed slightly to
manipulate this variable as well as handle the property binding
requirements. In the Draw function, draw a 3-D border depending on the
value of this variable.
Sample CodeAPPLIES TO
| Article Translations
|

Back to the top
