Public Window Classes

A public window class is one that has a reentrant window procedure that is registered and resides in a dynamic link library (DLL); it can be used by any process in the system to create windows. The operating system provides several preregistered public window classes. You can specify the system-provided window classes by using the symbolic identifiers that have the prefix WC_, as shown in the following table:

┌───────────────┬─────────────────────────────────────────────┐
│Class Name     │Description                                  │
├───────────────┼─────────────────────────────────────────────┤
│WC_BUTTON      │Consists of buttons and boxes the user can   │
│               │select by clicking the pointing device or    │
│               │using the keyboard.                          │
├───────────────┼─────────────────────────────────────────────┤
│WC_CONTAINER   │Creates a control for the user to 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 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.  Menus usually│
│               │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   │Lets the user scroll the contents of an      │
│               │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 the │
│               │radio buttons but provides additional        │
│               │flexibility to display graphical, textual,   │
│               │and numeric formats.  The values set with    │
│               │this control are mutually exclusive.         │
└───────────────┴─────────────────────────────────────────────┘

With the exception of WC_FRAME, the system-provided window classes are known as control window classes because they give the user an easy means of controlling specific types of interaction. For example, the WC_BUTTON class allows single or multiple selections. These windows conform to the IBM* Systems Application Architecture (SAA) Common User Access (CUA) definition. They are designed specifically to provide function that meets the needs for a graphics-based standard user interface. The code fragments provided in this guide make extensive use of the system window classes.


[Back: Window Classes]
[Next: Private Window Classes]