| |
|
|
| Hello Sebastian...
What am I doing here wrong???
DEF @LoadImage(6) !"USER32","LoadImageA"
Declare Hintergrundfarbe&,DLL&,Textfarbe&,Fenstertext#,IMG&[0],IMG$[0],REFRESH&
Windowstyle 31+512
Window Title "Colorbutton with Image"
Window 0,0-640,440
SETTRUECOLOR 1
User Messages $10
LET Hintergrundfarbe&=@RGB(255,255,240)
CLS Hintergrundfarbe&
LET DLL&=@USEDLL("SKCONTROL.DLL")
$I SKCONTROL.INC
@SKCtrl_InitDll()
Controls create
DIM Fenstertext#,256
LET IMG$[0]="BAUM"
Let IMG&[0]=@LoadImage(%HINSTANCE,@ADDR(IMG$[0]),$1,18,18,$0)
String Fenstertext#,0="Colorbutton with Image"
LET Textfarbe&=@SKCtrl_RGB(180,0,0)
LET HINTERGRUNDFARBE&=@SKCtrl_RGB(255,255,255)
LET REFRESH&=@SKCtrl_CreateClrImageButton(%HWND,IMG&[0],Fenstertext#,Textfarbe&,HINTERGRUNDFARBE&,0,1,350,20,-200,30,%HINSTANCE)
@SKCtrl_SetColor(REFRESH&,1,Textfarbe&)
@SKCtrl_SetColor(REFRESH&,2,HINTERGRUNDFARBE&)
Dispose Fenstertext#
While %Umessage<>$10
Waitinput
wend
DeleteObject IMG&[0]
@SKCtrl_DeInitDll()
FreeDLL DLL&
END
|
|
|
| |
|
|
|
Sebastian König | Hello Andreas,
two items:
1. have You a Error in the SKControl-Help found : with the Description of SKCtrl_CreateClrImageButton() is the Order the Parameter described incorrectly - ico and hndl should to tc and bc stand. i'll the correct
2. commit You a incorrect worth for graphic-type. there it itself for a Icon deals, ought to tc too 1 his. The korrekte appeal is then altogether:
LET REFRESH&=@SKCtrl_CreateClrImageButton(%HWND,IMG&[0],Fenstertext#,1,1,Textfarbe&,HINTERGRUNDFARBE&,350,20,-200,30,%HINSTANCE)
MfG
Sebastian |
|
|
| Windows XP, XProfan/Profan² 4.5 bis 11 Profan2Cpp-Homepage: [...] Alte Profan²-Seite: [...] | 10/16/06 ▲ |
|
|
|
|
| |
|
| |
|
|