| nRC | Error or user pressed cancel: 0 ok: 1 |
| NewColor | ...will retrieve the selected BGR-value of the color |
| 0x0088ff | You can choose a color which is preselected when the dialog is shown |
Gui, Add, Button, x10 y410 w50 h30 gColorPicker, Choose Color
Gui, Show, w650 h550, this is a unique title
;...
;...
;Initialize the dll
;...
;...
ColorPicker:
; --------------- Color Picker -----------------------------------------
; -----------------------------------------------------------------------
NewColor:=0
nRC := DllCall("AHKCtrlSupport\ColorPicker", "int *", NewColor, int, 0x0088ff, "Cdecl Int")
if (errorlevel <> 0) || (nRC = 0)
{
MsgBox error while calling ColorPicker Errorlevel: %errorlevel%
return
}
;Convert to hex
SetFormat, integer, hex
NewColor += 0
SetFormat, integer, d
MsgBox You have choosen the BGR color %NewColor%
return