CWinApp::Enable3dControls

BOOL Enable3dControls( );

BOOL Enable3dControlsStatic( );

Note   Both Enable3dControls and Enable3dControlsStatic are described in this topic.

Return Value

TRUE if the CTL3D32.DLL is loaded successfully; otherwise FALSE.

This function will return FALSE if the operating system supports the three-dimensional look for controls.

Remarks

Call either of these member functions from your override of the InitInstance member function to enable dialog boxes and windows whose controls have a three-dimensional appearance. These member functions load the CTL3D32.DLL and registers the application with the DLL. If you call Enable3dControls or Enable3dControlsStatic, you do not need to call the SetDialogBkColor member function.

Enable3dControls should be used when linking to the MFC DLLs.  Enable3dControlsStatic should be used when statically linking to the MFC libraries.

Feature Only in Professional and Enterprise Editions   Static linking to MFC is supported only in Visual C++ Professional and Enterprise Editions. For more information, see Visual C++ Editions.

MFC automatically provides 3D control effects for the following classes of windows:

If the controls for which you want a 3D effect are in a window of any of these types, all you need is the enabling call to Enable3dControls or Enable3dControlsStatic. If you want to give a 3D effect to controls in windows based on other classes, you must call the CTL3D32 API functions directly.

Example

#ifdef _AFXDLL
    Enable3dControls( );   //Call Enable3dControls
#else
    Enable3dControlsStatic( );
//Call Enable3dControlsStatic
#endif

CWinApp OverviewClass MembersHierarchy Chart

See Also   CWinApp::InitInstance, CWinApp::SetDialogBkColor