Add Function SetWindowIcon()
Posted: Mon Nov 14, 2011 12:10 pm
Want to see this feature?
Code: Select all
UsePNGImageDecoder()
Procedure SetWindowIcon(WinID, IconID)
CompilerSelect #PB_Compiler_OS
CompilerCase #PB_OS_Linux
gtk_window_set_icon_(WinID, IconID)
CompilerCase #PB_OS_Windows
SendMessage_(WinID,#WM_SETICON,#False,IconID)
CompilerCase #PB_OS_MacOS
; :?:
CompilerEndSelect
EndProcedure
If OpenWindow(0, 50, 50, 350, 50, "Icon Test", #PB_Window_ScreenCentered)
SetWindowIcon(WindowID(0), CatchImage(1, ?WindowIcon) )
EndIf
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
End
DataSection
WindowIcon:
IncludeBinary "ICO.png"
EndDataSection