Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: PowerBuilder
Expertise: Beginner
May 9, 1999



Application Security Testing: An Integral Part of DevOps

Windows Standard Color Dialog

How can I call the Windows color dialog box in Powerbuilder 6.0?

To use the Windows standard color chooser dialog, you will need to declare and use some API calls. Create a new nonvisual object and define a structure in your object with the following attributes:

long lstructsize
ulong hwndowner
ulong hinstance
long rgbresult
blob lpcustcolors
long flags
long lcustdata
long lpfnhook
long lptemplatename
Then define the following instance variables:
Long il_CustomCols[16]
Blob{64} ibl_CustomColours
In the constructor event add the following code:
BlobEdit( ibl_CustomColours, 1, il_CustomCol )
istr_ChooseColour.lpcustcolors = ibl_CustomColours 

istr_ChooseColour.lStructSize = 36
SetNull( istr_ChooseColor.hwndOwner )
istr_ChooseColour.flags = 1
Then define the following API call:
function boolean ChooseColorA( REF YOURSTRUCTURE_NAME lpcc ) library "commdlg"
Then define a function and add the following code:
ChooseColorA ( istr_ChooseColour )
RETURN istr_ChooseColor.rgbresult
DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date