The CHOOSECOLOR structure contains information the ChooseColor function uses to initialize the Color common dialog box. After the user closes the dialog box, the system returns information about the user’s selection in this structure.
typedef struct { // cc DWORD lStructSize; HWND hwndOwner; HWND hInstance; COLORREF rgbResult; COLORREF* lpCustColors; DWORD Flags; LPARAM lCustData; LPCCHOOKPROC lpfnHook; LPCTSTR lpTemplateName; } CHOOSECOLOR;
Flag |
Meaning |
CC_ANYCOLOR |
Causes the dialog box to display all available colors in the set of basic colors. |
CC_ENABLEHOOK |
Enables the hook procedure specified in the lpfnHook member of this structure. This flag is used only to initialize the dialog box. |
CC_ENABLETEMPLATE |
Indicates that the hInstance and lpTemplateName members specify a dialog box template to use in place of the default template. This flag is used only to initialize the dialog box. |
CC_ENABLETEMPLATEHANDLE |
Indicates that the hInstance member identifies a data block that contains a preloaded dialog box template. The system ignores the lpTemplateName member if this flag is specified. This flag is used only to initialize the dialog box. |
CC_FULLOPEN |
Causes the dialog box to display the additional controls that allow the user to create custom colors. If this flag is not set, the user must click the Define Custom Color button to display the custom color controls. |
CC_PREVENTFULLOPEN |
Disables the Define Custom Colors button. |
CC_RGBINIT |
Causes the dialog box to use the color specified in the rgbResult member as the initial color selection. |
CC_SHOWHELP |
Causes the dialog box to display the Help button. The hwndOwner member must specify the window to receive the HELPMSGSTRING registered messages that the dialog box sends when the user clicks the Help button. |
CC_SOLIDCOLOR |
Causes the dialog box to display only solid colors in the set of basic colors. |