How to Use CTL3D Under the Windows 95 Operating System

Last reviewed: September 29, 1995
Article ID: Q130693
The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API) included with:

        - Microsoft Windows 95 version 4.0
    

SUMMARY

When an application that uses CTL3D is run under Windows 95, 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 operating system.

MORE INFORMATION

When CTL3D is disabled, Windows 95 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:

ARTICLE-ID: Q125684

TITLE     : 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.


Additional reference words: 4.00
KBCategory: kbui
KBSubcategory: UsrCtl


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 29, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.