please dont rip this site Prev Next

CHOOSECOLOR info  Overview  Group

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; 

 

Members

lStructSize
Specifies the length, in bytes, of the structure.
hwndOwner
Identifies the window that owns the dialog box. This member can be any valid window handle, or it can be NULL if the dialog box has no owner.
hInstance
If the CC_ENABLETEMPLATEHANDLE flag is set in the Flags member, hInstance is the handle of a memory object containing a dialog box template. If the CC_ENABLETEMPLATE flag is set, hInstance identifies a module that contains a dialog box template named by the lpTemplateName member. If neither CC_ENABLETEMPLATEHANDLE nor CC_ENABLETEMPLATE is set, this member is ignored.
rgbResult
If the CC_RGBINIT flag is set, rgbResult specifies the color initially selected when the dialog box is created. If the specified color value is not among the available colors, the system selects the nearest solid color available. If rgbResult is zero or CC_RGBINIT is not set, the initially selected color is black. If the user clicks the OK button, rgbResult specifies the user’s color selection.
lpCustColors
Pointer to an array of 16 COLORREF values that contain red, green, blue (RGB) values for the custom color boxes in the dialog box. If the user modifies these colors, the system updates the array with the new RGB values. To preserve new custom colors between calls to the ChooseColor function, you should allocate static memory for the array.
Flags
A set of bit flags that you can use to initialize the Color common dialog box. When the dialog box returns, it sets these flags to indicate the user’s input. This member can be a combination of the following flags:

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.

lCustData
Specifies application-defined data that the system passes to the hook procedure identified by the lpfnHook member. When the system sends the WM_INITDIALOG message to the hook procedure, the message’s lParam parameter is a pointer to the CHOOSECOLOR structure specified when the dialog was created. The hook procedure can use this pointer to get the lCustData value.
lpfnHook
Pointer to a CCHookProc hook procedure that can process messages intended for the dialog box. This member is ignored unless the CC_ENABLEHOOK flag is set in the Flags member.
lpTemplateName
Pointer to a null-terminated string that names the dialog box template resource in the module identified by the hInstance member. This template is substituted for the standard dialog box template. For numbered dialog box resources, lpTemplateName can be a value returned by the MAKEINTRESOURCE macro. This member is ignored unless the CC_ENABLETEMPLATE flag is set in the Flags member.

See Also

CCHookProc, ChooseColor, MAKEINTRESOURCE, WM_INITDIALOG


file: /Techref/os/win/api/win32/struc/src/str01_16.htm, 7KB, , updated: 2000/4/7 11:20, local time: 2024/11/24 12:41,
TOP NEW HELP FIND: 
3.15.148.203:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://massmind.org/techref/os/win/api/win32/struc/src/str01_16.htm"> CHOOSECOLOR</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to massmind.org!

 

Welcome to massmind.org!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .