CLASS Statement

Summary: Syntax

CLASS class

This optional statement defines the class of the dialog box. If no statement is given, the Windows standard dialog class will be used as the default.

The class field specifies an integer or a string, enclosed in double quotation marks, that identifies the class of the dialog box. If the window procedure for the class does not process a message sent to it, it must call the DefDlgProc function to ensure that all messages are handled properly for the dialog box. A private class can use DefDlgProc as the default window procedure. The class must be registered with the cbWndExtra field of the WNDCLASS data structure set to DLGWINDOWEXTRA.

The following example demonstrates the correct usage of the CLASS statement:

CLASS “myclass”

Summary: Comments

The CLASS statement should be used with special cases, since it overrides the normal processing of a dialog box. The CLASS statement converts a dialog box to a window of the specified class; depending on the class, this could give undesirable results. Do not use the predefined control class names with this statement.