How do I add an icon to the EXE ?

BlitzPlus Forums/BlitzPlus Programming/How do I add an icon to the EXE ?

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.

No worries :o)

Anyhow, had a quick play with the API, here's what you can do.
hWND=QueryObject(MainWindow,1)
Icon=LoadIcon(hWND,CurrentDir()+"blankpage.ico",0)
SetClassLong hWND,-14,Icon
Add these commands to the relevant .decls.
.lib "user32.dll"
SetClassLong(hWnd%,nIndex%,Value%) : "SetClassLongA"

.lib "shell32.dll"
LoadIcon%(hWND%,File$,Index%) : "ExtractIconA"

Then you can pop the .ico file you want anywhere you want and load from there. You can also grab from the resource, but this was just a quick way to load a "File" into the current Blitz window.