How To Use CTL3D Under the Windows 95 Operating System (130693)



The information in this article applies to:

  • Microsoft Win32 Application Programming Interface (API), when used with:
    • Microsoft Windows 95
    • the operating system: Microsoft Windows 2000

This article was previously published under Q130693

SUMMARY

When an application that uses CTL3D is run under Windows 95 or Windows 2000, CTL3D disables itself if any dialog box has the DS_3DLOOK style. By default, all applications based on Windows version 4.0 get the DS_3DLOOK style for all dialog boxes. This article explains how this affects the way dialog boxes and controls are displayed under the Windows 95 and Windows 2000 operating system.

MORE INFORMATION

When CTL3D is disabled, the operating system draws dialog boxes and controls using its own 3D drawing properties. Windows 95 does not draw the static rectangles and frames in 3D as CTL3D does. For more information about how these frames and rectangles are drawn under Windows 95, please see the following article in the Microsoft Knowledge Base:

125684 How To Use SS_GRAYRECT SS_BLACKRECT SS_WHITERECT in Windows 95

There are two new static control styles (SS_SUNKEN and SS_ETCHEDFRAME) in Windows 95 that simulate two of the static panels used in CTL3D. SS_SUNKEN creates a sunken panel, and SS_ETCHEDFRAME creates a panel with a dipped edge. There is no static style for creating a raised panel, but you can use the DrawEdge API to draw a raised panel.

There are also two new static control styles that you can use to create 3D lines. SS_ETCHEDHORZ creates a dipped horizontal line, and SS_ETCHEDVERT creates a dipped vertical line.

An application should check the platform version at run time by using the GetVersion or GetVersionEx function, and then implement appropriate 3D effects. If the major version is less than 4, the application can use the CTL3D functions, messages, and controls. If the major version is 4 or greater, the application should not implement CTL3D; it should create the proper Windows 95 style controls (or use DrawEdge to draw its 3D panels) to achieve the desired effects.

Modification Type:MinorLast Reviewed:8/30/2004
Keywords:kbCtrl kbhowto KB130693