Change Window/Taskbar Icon using hardcoded one?

BlitzMax Forums/BlitzMax Beginners Area/Change Window/Taskbar Icon using hardcoded one?

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

This works:
Strict

?Win32

Import "-lshell32"

Extern "Win32"
	Function LoadIcon:Int(hWnd:Int, file$z, index:Int) = "ExtractIconA@12"
	Function SetClassLong:Int(hWnd:Int, nIndex:Int, dwNewLong:Int) = "SetClassLongA@12"
End Extern

?

Function Win32_SetIcon(Window:TGadget, IconID = 0)
?Win32
	Local hWnd:Int = QueryGadget(Window, 1)
	Local icon:Int = LoadIcon(hWnd,AppFile,IconID)
	SetClassLong(hWnd,-14,icon)
?
End Function

Not sure how MaxIDE does it, though.