structure:
type OS_ChooseColor from structure
long lstructsize
unsignedlong hwndowner
unsignedlong hinstance
long rgbresult
blob lpcustcolors
long flags
long lcustdata
long lpfnhook
long lptemplatename
end type
function:
function boolean ChooseColorA( REF os_ChooseColor lpcc ) library "comdlg32.dll"
public function boolean of_choosecolor (ref long al_rgbresult, readonly long al_owner, integer ai_para);os_ChooseColor lstr_ChooseColor
long ll_CustomInitColors[16]
blob{64} lbl_CustomColors
// initialize choosecolor information
// convert the default custom color array to a blob variable blobedit(ibl_customcolors,1,il_custominitcolors)
// let the structure element point to the blob array
lstr_choosecolor.lpcustcolors = lbl_customcolors
// set the size
lstr_choosecolor.lStructSize = 36
// no owner
choose case ai_para
case 0
SetNull(lstr_choosecolor.hwndOwner)
case 1
lstr_choosecolor.hwndOwner=al_owner
case else
SetNull(lstr_choosecolor.hwndOwner)
end choose