System-Defined Public Window Classes

The system provides a number of public window classes that support menus, frame windows, control windows, and dialog windows. An application can create a window of a system-defined public window class by specifying one of the following class name constants in a call to WinCreateWindow:

┌───────────────┬─────────────────────────────────────────────┐
│Class Name     │Description                                  │
├───────────────┼─────────────────────────────────────────────┤
│WC_BUTTON      │Consists of buttons and boxes the user can   │
│               │select by clicking the pointing device or    │
│               │using the keyboard.                          │
├───────────────┼─────────────────────────────────────────────┤
│WC_COMBOBOX    │Creates a combination-box control, which     │
│               │combines a list-box control and an           │
│               │entry-field control. It enables the user to  │
│               │enter data either by typing in the entry     │
│               │field or by choosing from the list in the    │
│               │list box.                                    │
├───────────────┼─────────────────────────────────────────────┤
│WC_CONTAINER   │Creates a control in which the user can group│
│               │objects in a logical manner.  A container can│
│               │display those objects in various formats or  │
│               │views.  The container control supports drag  │
│               │and drop so the user can place information in│
│               │a container by simply dragging and dropping. │
├───────────────┼─────────────────────────────────────────────┤
│WC_ENTRYFIELD  │Consists of a single line of text that the   │
│               │user can edit.                               │
├───────────────┼─────────────────────────────────────────────┤
│WC_FRAME       │A composite window class that can contain    │
│               │child windows of many of the other window    │
│               │classes.                                     │
├───────────────┼─────────────────────────────────────────────┤
│WC_LISTBOX     │Presents a list of text items from which the │
│               │user can make selections.                    │
├───────────────┼─────────────────────────────────────────────┤
│WC_MENU        │Presents a list of items that can be         │
│               │displayed horizontally as menu bars, or      │
│               │vertically as pull-down menus.  Usually menus│
│               │are used to provide a command interface to   │
│               │applications.                                │
├───────────────┼─────────────────────────────────────────────┤
│WC_NOTEBOOK    │Creates a control for the user that is       │
│               │displayed as a number of pages.  The top page│
│               │is visible, and the others are hidden, with  │
│               │their presence being indicated by a visible  │
│               │edge on each of the back pages.              │
├───────────────┼─────────────────────────────────────────────┤
│WC_SCROLLBAR   │Consists of window scroll bars that let the  │
│               │user scroll the contents of the associated   │
│               │window.                                      │
├───────────────┼─────────────────────────────────────────────┤
│WC_SLIDER      │Creates a control that is usable for         │
│               │producing approximate (analog) values or     │
│               │properties.  Scroll bars were used for this  │
│               │function in the past, but the slider provides│
│               │a more flexible method of achieving the same │
│               │result, with less programming effort.        │
├───────────────┼─────────────────────────────────────────────┤
│WC_SPINBUTTON  │Creates a control that presents itself to the│
│               │user as a scrollable ring of choices, giving │
│               │the user quick access to the data.  The user │
│               │is presented only one item at a time, so the │
│               │spin button should be used with data that is │
│               │intuitively related.                         │
├───────────────┼─────────────────────────────────────────────┤
│WC_STATIC      │Simple display items that do not respond to  │
│               │keyboard or pointing device events.          │
├───────────────┼─────────────────────────────────────────────┤
│WC_TITLEBAR    │Displays the window title or caption and lets│
│               │the user move the window's owner.            │
├───────────────┼─────────────────────────────────────────────┤
│WC_VALUESET    │Creates a control similar in function to     │
│               │radio buttons but provides additional        │
│               │flexibility to display graphical, textual,   │
│               │and numeric formats.  The values set with    │
│               │this control are mutually exclusive.         │
└───────────────┴─────────────────────────────────────────────┘

Each system-defined public window class has a corresponding set of window styles that an application can use to customize a window of that class. For example, a window created with the WC_BUTTON class has styles that include BS_PUSHBUTTON and BS_CHECKBOX. Window styles enable you to customize aspects of a window's behavior and appearance. The application specifies the window styles in the WinCreateWindow function.


[Back: Public Window Classes]
[Next: Custom Public Window Classes]