SECColorWell::Create

BOOL SECColorWell::Create(DWORD dwStyle, int x, int y, CWnd* pParentWnd, UINT nID, BOOL bDialogBaseUnits, BOOL bOtherButton, CCreateContext* pContext)

Creates a color well window and attaches it to the SECColorWell object.

You construct a color well window in two stages. First, call the SECColorWell constructor, which constructs the SECColorWell object. Then call Create, which creates a color well window and attaches it to the SECColorWell object.

The initial x and y position can either be specified in logical units, or in dialog base units in which case pParentWnd must be a derivative of CDialog. Note that the color well is auto sizing (it will size to the correct width to show all the cells in the grid).

You can specify CWS_RAISED_BORDER as part of the window style. This will cause the color well window to have a 3D raised border style.

Defining the color well window to have an ‘other' button, allows colors other than the 20 system colors to be used. When the user clicks the ‘other' button, a color common dialog (CColorDialog) is displayed.

Defined in: SECWELL.cpp

Return Value

Nonzero if the SECColorWell window was successfully created; otherwise 0.

Parameters

dwStyle

Window style to create the color well window with.

x

Initial X position for the color well window.

y

Initial Y position for the color well window.

pParentWnd

Pointer to the parent of the color well window.

nID

Pointer to the parent of the color well window.

bDialogBaseUnits

TRUE if x and y are specified in dialog base units; FALSE if they are in logical units.

bOtherButton

TRUE if the color well window has an ‘other' button.

pContext

The create context of the window.

See Also

SECColorWell SetGridSize