This topic has not yet been rated Rate this topic

CColorDialog::CColorDialog

Constructs a CColorDialog object.

CColorDialog(
   COLORREF clrInit = 0,
   DWORD dwFlags = 0,
   CWnd* pParentWnd = NULL 
);
clrInit

The default color selection. If no value is specified, the default is RGB(0,0,0) (black).

dwFlags

A set of flags that customize the function and appearance of the dialog box. For more information, see the CHOOSECOLOR structure in the Windows SDK.

pParentWnd

A pointer to the dialog box's parent or owner window.


// Show the Color dialog with all the default settings.
CColorDialog dlg1;
dlg1.DoModal();

// Show the fully opened Color dialog with red as the selected color.
CColorDialog dlg2(RGB(255, 0, 0), CC_FULLOPEN);
dlg2.DoModal();


Header: afxdlgs.h

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ