Max IDE - Window Icon

BlitzMax Forums/BlitzMax Programming/Max IDE - Window Icon

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

This is the code I've got to get the icon from the exe (insert with reshacker) to be used by a window:
?Win32

Import BRL.MaxGUI
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_WindowIconFromExe(Window:TGadget)
?Win32
	Local hWnd:Int = Query(Window, 1)
	Local icon:Int = LoadIcon(hWnd,AppFile,0)
	SetClassLong(hWnd,-14,icon)
?
End Function

Is this not necessary with the .o file then?