Microsoft KB Archive/130763

-

{| The information in this article applies to: Microsoft Win32 Application Programming Interface (API) included with: - Microsoft Windows 95
 * width="100%"|

SUMMARY
An application that uses standard Windows controls (edit boxes, list boxes, and so on) as part of a dialog box with the DS_3DLOOK style set, have the 3D look by default. But if an application creates child controls as part of the main window's client area, these controls do not have the 3D look by default. Applications should add the WS_EX_CLIENTEDGE style to the list of styles while creating the child controls to get the new 3D look.

MORE INFORMATION
WS_EX_CLIENTEDGE is the new extended style that gives controls (or any window for that matter) the new 3D look. When controls are created as part of a dialog box by using a dialog template based in the resource file, Windows adds the WS_EX_CLIENTEDGE style to the list of styles.

Some applications use controls as child windows in the client area of the main window. If the WS_EX_CLIENTEDGE style is not specified, these controls have the Windows version 3.11 user interface (2D look).

The WS_EX_CLIENTEDGE style can be set as a style for the control in by using the CreateWindowEx function to create the control and adding the WS_EX_CLIENTEDGE style to the extended styles specified in by the dwExStyle parameter.

If you are using Microsoft Foundation Classes (MFC), you can add the WS_EX_CLIENTEDGE style to the control by deriving your own class from the control, overriding the PreCreateWindow virtual member function, and adding this style to the extended styles specified in the dwExStyle member of the REATESTUCT structure passed to the PreCreateWindow function.

In both cases make sure you OR in the WS_EX_CLIENTEDGE style with the existing extended styles of the control.

Keywords         : UsrCtl Technology       : kbMfc Version          : WIN95 Platform         : Win95 Issue type       : kbhowto
 * }

-

Last reviewed: March 3, 1998

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.