how to show several sizes of the icons help
Posted: Tue Jan 05, 2010 7:46 pm
hi...
i need extract icons from a dll and i need show several sizes of each icon in ImageGadget.
i have one example from "netmaestro" but only show 2 sizes.
anyone can help me?
i need extract icons from a dll and i need show several sizes of each icon in ImageGadget.
i have one example from "netmaestro" but only show 2 sizes.
Code: Select all
file$ = #PB_Compiler_Home+"purebasic.exe"
; Query the file
num_icons = ExtractIconEx_(file$, -1, #Null, #Null, #Null)
If num_icons > 0
; Allow room for the icons
Dim small(num_icons)
Dim large(num_icons)
; Retrieve the icons
ExtractIconEx_(file$, 0, large(), small(), num_icons)
; Look at the icons
OpenWindow(0,0,0,640,480,"",#PB_Window_ScreenCentered|#PB_Window_SystemMenu)
Repeat
ev=WaitWindowEvent()
Select ev
Case #PB_Event_Repaint
hdc = StartDrawing(WindowOutput(0))
DrawIconEx_(hdc, 10,20,small(0),0,0,0,0,#DI_NORMAL)
DrawIconEx_(hdc, 50,20,large(0),0,0,0,0,#DI_NORMAL)
StopDrawing()
EndSelect
Until ev=#PB_Event_CloseWindow
EndIf
; That's enough work for now, have a beer ;)