Windows API Guide: Beep Function


Type CHOOSECOLOR_TYPE   lStructSize As Long   hwndOwner As Long   hInstance As Long   rgbResult As Long   lpCustColors As Long   Flags As Long   lCustData As Long   lpfnHook As Long   lpTemplateName As String End Type

Description & Usage

The CHOOSECOLOR_TYPE structure stores the information passed to and from the Choose Color common dialog box. The structure's data members specify both the user's selection(s) as well as other information specifying how to create the Choose Color box.

Visual Basic-Specific Issues

Officially, this structure is called CHOOSECOLOR. However, that violates the case-sensitive name spacing of Visual Basic because Visual Basic cannot then distinguish it from the ChooseColor API function. The Windows API Guide calls this structure CHOOSECOLOR_TYPE to avoid the naming collision.

Data Members

lStructSize
The size in bytes of the structure.
hwndOwner
A handle to the window opening the ChooseColor box, if any.
hInstance
A handle to a dialog template to use in place of the default box. If this is not being used, set to 0.
rgbResult
Set to the RGB value of the default selected color before calling ChooseColor. The function places the RGB value of the color the user selected into this member.
lpCustColors
A pointer to the memory block which holds the list of 16 custom colors.
Flags
A combination of the following flags specifying how to create the Choose Color box:
CC_ANYCOLOR = &H100
Allow the user to select any color.
CC_ENABLEHOOK = &H10
Use the hook function specified by lpfnHook to process the Choose Color box's messages.
CC_ENABLETEMPLATE = &H20
Use the dialog box template identified by hInstance and lpTemplateName.
CC_ENABLETEMPLATEHANDLE = &H40
Use the preloaded dialog box template identified by hInstance, ignoring lpTemplateName.
CC_FULLOPEN = &H2
Automatically display the Define Custom Colors half of the dialog box.
CC_PREVENTFULLOPEN = &H4
Disable the button that displays the Define Custom Colors half of the dialog box.
CC_RGBINIT = &H1
Make the color specified by rgbResult be the initially selected color.
CC_SHOWHELP = &H8
Display the Help button.
CC_SOLIDCOLOR = &H80
Only allow the user to select solid colors. If the user attempts to select a non-solid color, convert it to the closest solid color.
lCustData
Application-defined value to pass to the hook function specified by lpfnHook whenever it is called.
lpfnHook
A pointer to the CCHookProc hook function to use to process the Choose Color box's messages. To have the dialog box process its own messages, set this to 0.
lpTemplateName
The name of the dialog box template to use in the module identified by hInstance. If this is not needed, set this to 0.

Constant Definitions

Const CC_ANYCOLOR = &H100 Const CC_ENABLEHOOK = &H10 Const CC_ENABLETEMPLATE = &H20 Const CC_ENABLETEMPLATEHANDLE = &H40 Const CC_FULLOPEN = &H2 Const CC_PREVENTFULLOPEN = &H4 Const CC_RGBINIT = &H1 Const CC_SHOWHELP = &H8 Const CC_SOLIDCOLOR = &H80

Used By

ChooseColor

Go back to the alphabetical Structure listing.
Go back to the Reference section index.


Last Modified: August 14, 1999
This page is copyright © 1999 Paul Kuliniewicz. Copyright Information Revised October 29, 2000
Go back to the Windows API Guide home page.
E-mail: vbapi@vbapi.com Send Encrypted E-Mail
This page is at http://www.vbapi.com/ref/c/choosecolor_type.html



Windows API Guide
Windows API Guide - Reference - Volume 1: Version 3.0 For the MS-DOS and PC-DOS Operating Systems
ISBN: B001V0KQIY
EAN: N/A
Year: 1998
Pages: 610

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net