| |
|
|
|
Description:
declared ExtractIcon supply the lever one Icons of/ one EXE-File.
Deklaration:
DEF @ExtractIcon(3) !SHELL32,ExtractIconA
Parameter:
1.Parameter: the Instancehandle the application, The the Icon contains (LongInt). 2.Parameter: an Memory-Variable, The whom names the application contains or The address one Strings, the whom names the EXE-File angibt. 3.Parameter: The number the desired Icons (Integer).
Return Value:
lever the Icons as LongInt.
Examples:
DEF ExtractIcon(3) !"SHELL32","ExtractIconA"
After Andreas Miethes example => Greeting on "Nachbarstadt" Bielefeld
Def CreateSolidBrush(1) ! "GDI32","CreateSolidBrush"
DEF @GetSysColor(1) !"USER32","GetSysColor"
Windowstyle 31
Windowtitle "Icon on Button zeichnen"
Window 0,0-640,440
Declare Button&,IconHandle&,IconHolder$,DCButton&
Declare Brush&
LET BUTTON&=@CREATEBUTTON(%HWND,"OK",100,100,200,30)
Let brush&=CreateSolidBrush(@GetSysColor(15))
LET ICONHOLDER$=@FINDFIRST$($WINPATH+"*.EXE")
LET ICONHANDLE&=@ExtractIcon(%HINSTANCE,@ADDR(ICONHOLDER$),0)
LET DCBUTTON&=@GetDC(Button&)
@DrawIconEx(DCBUTTON&,10,5,ICONHANDLE&,20,20,0,brush&,3)
While 0=0
Waitinput
@DrawIconEx(DCBUTTON&,10,5,ICONHANDLE&,20,20,0,brush&,3)
Wend
|
|
|
| |
|
|