Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide to Clip-4-Win version 3.0 - <b>choosecolor()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
ChooseColor()
Get the user to select a colour
------------------------------------------------------------------------------

Syntax
ChooseColor( [ <nInitColour> ] , [ <aCustomColours> ] ,
             [ <nFlags> ] )   -->   nColour

Arguments
<nInitColour> is an optional parameter used to set the default
colour.  (The RGB() macro can be used to set the value.)  The
default is black.

<aCustomColours> is an optional array of 16 custom colours.

<nFlags> is an optional parameter specifying the type of
dialog the user will see.  (Use the CC_* values defined in
COMMDLG.CH.)  The default is likely to be all you need.

Returns
The returned value is an integer specifying the colour
selected by the user, or the value -1 if the user cancelled
the dialog (or if an error is detected).

Description
This function displays a Windows-defined dialog box that
allows the user to choose a colour using the mouse and/or
keyboard.  The user can experiment on-screen whilst choosing.

Example
nColour = ChooseColor()
nPen = CreatePen( PS_SOLID, 5, nColour )


See Also: CreatePen() RGB()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson