Hallo Uwe!
Das sollte eigendlich klappen (tut es bei mir auch).
Was passiert denn genau bzw. was passiert nicht?
Hier noch eine Demo für die, die's sonst noch interessiert:
window 30,30-200,200
def LoadIcon(2) !"USER32","LoadIconA"
def GetModuleHandle(1) !"KERNEL32","GetModuleHandleA"
def ImageList_Create(5) !"COMCTL32","ImageList_Create"
def ImageList_AddIcon(2) !"COMCTL32","ImageList_AddIcon"
def ImageList_SetOverlayImage(3) !"COMCTL32","ImageList_SetOverlayImage"
def ImageList_Draw(6) !"COMCTL32","ImageList_Draw"
def ImageList_Destroy(1) !"COMCTL32","ImageList_Destroy"
declare IcoList&,Shell&,Shell$
IcoList&=ImageList_Create(32,32,1,1,0)'-----------Parameter 1+2: Grösse der Icons
Shell$="Shell32"
Shell&=GetModuleHandle(addr(Shell$))
ImageList_AddIcon(IcoList&,LoadIcon(Shell&,30))'--Verknüpfungspfeile laden
ImageList_AddIcon(IcoList&,LoadIcon(Shell&,31))
ImageList_AddIcon(IcoList&,LoadIcon(0,32512))'--SystemIcons laden
ImageList_AddIcon(IcoList&,LoadIcon(0,32513))
ImageList_SetOverlayImage(IcoList&,0,1)'--2.Parameter: Icon aus List
ImageList_SetOverlayImage(IcoList&,1,3)'--3.Parameter: Ziel-Index (1-basiert!!)
ImageList_Draw(IcoList&,2,%hdc,10,50,256*1)'--2.Parameter: BasisIcon
ImageList_Draw(IcoList&,3,%hdc,50,50,256*3)'--6.Parameter: Index des Overlay-Icons * $100
case IcoList&:ImageList_Destroy(IcoList&)
waitkey
HTH
Pascal
|