CTLSTYLE

3.1

#include <custcntl.h>

typedef struct tagCTLSTYLE {
    UINT    wX;                 /* x-origin of control   */
    UINT    wY;                 /* y-origin of control   */
    UINT    wCx;                /* width of control      */
    UINT    wCy;                /* height of control     */
    UINT    wId;                /* control child id      */
    DWORD   dwStyle;            /* control style         */
    char    szClass[CTLCLASS];  /* name of control class */
    char    szTitle[CTLTITLE];  /* control text          */
} CTLSTYLE;

The CTLSTYLE structure specifies the attributes of the selected control, including the current style flags, location, dimensions, and associated text.

Members

wX

Specifies the x-origin, in screen coordinates, of the control relative to the client area of the parent window.

wY

Specifies the y-origin, in screen coordinates, of the control relative to the client area of the parent window.

wCx

Specifies the current control width, in screen coordinates.

wCy

Specifies the current control height, in screen coordinates.

wId

Specifies the current control identifier. In most cases, you should not allow the user to change this value because Dialog Editor automatically coordinates it with a header file.

dwStyle

Specifies the current control style. The high-order word contains the control-specific flags, and the low-order word contains the Windows-specific flags. You may let the user change these flags to any values supported by your control library.

szClass

Specifies a null-terminated string representing the name of the current control class. You should not allow the user to edit this member, because it is provided for informational purposes only. This string should be no longer than the CTLCLASS value.

szTitle

Specifies with a null-terminated string the text associated with the control. This text is usually displayed inside the control or may be used to store other associated information required by the control. This string should be no longer than the CTLTITLE value.

Comments

An application calls the ClassStyle function to display a dialog box to edit the style of the selected control. When this function is called, it should display a modal dialog box in which the user can edit the CTLSTYLE members. The user interface of this dialog box should be consistent with that of the predefined controls that Dialog Editor supports.

See Also

CTLINFO, CTLTYPE