please dont rip this site Prev Next

ChooseColor info  Overview  Group

The ChooseColor function creates a Color common dialog box that enables the user to select a color.

BOOL ChooseColor(

    LPCHOOSECOLOR lpcc 

// pointer to structure with initialization data

   );

Parameters

lpcc
Pointer to a CHOOSECOLOR structure that contains information used to initialize the dialog box. When ChooseColor returns, this structure contains information about the user’s color selection.

Return Values

If the user clicks the OK button of the dialog box, the return value is nonzero. The rgbResult member of the CHOOSECOLOR structure contains the RGB color value of the color selected by the user.

If the user cancels or closes the Color dialog box or an error occurs, the return value is zero. To get extended error information, call the CommDlgExtendedError function, which can return one of the following values:

CDERR_FINDRESFAILURE

CDERR_MEMLOCKFAILURE

CDERR_INITIALIZATION

CDERR_NOHINSTANCE

CDERR_LOCKRESFAILURE

CDERR_NOHOOK

CDERR_LOADRESFAILURE

CDERR_NOTEMPLATE

CDERR_LOADSTRFAILURE

CDERR_STRUCTSIZE

CDERR_MEMALLOCFAILURE

Remarks

The Color dialog box does not support palettes. The color choices offered by the dialog box are limited to the system colors and dithered versions of those colors.

You can provide a CCHookProc hook procedure for a Color dialog box. The hook procedure can process messages sent to the dialog box. To enable a hook procedure, set the CC_ENABLEHOOK flag in the Flags member of the CHOOSECOLOR structure and specify the address of the hook procedure in the lpfnHook member.

See Also

CCHookProc, CHOOSECOLOR, CommDlgExtendedError 


file: /Techref/os/win/api/win32/func/src/f05_10.htm, 3KB, , updated: 2000/4/7 11:19, local time: 2024/11/26 02:40,
TOP NEW HELP FIND: 
3.144.90.108: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://sxlist.com/Techref/os/win/api/win32/func/src/f05_10.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 sxlist.com!


Site supported by
sales, advertizing,
& kind contributors
just like you!

Please don't rip/copy
(here's why

Copies of the site on CD
are available at minimal cost.
 

Welcome to sxlist.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .