Window and Static Icons

BlitzMax Forums/MaxGUI Module/Window and Static Icons

William Drescher(Posted 2008) [#1]
Ok, there are 2 things I really would like to do:

1. I would like to be able to set a seperate icon for each window (Like a SetWindowIcon(window, iconimage) kind of thing)
2. I would like to be able to put a static icon in the application area of the window.

Can someone please help me with this?


Yahfree(Posted 2008) [#2]
maybe this can help you:

http://blitzbasic.com/Community/posts.php?topic=72899


I'd imagine it'd be as simple as using your window's HWND for the TheWindow% parameter in:

Function SetIcon(iconname$, TheWindow%)	
	?Win32
	Local icon=ExtractIconA(TheWindow,iconname,0)
	Local WM_SETICON = $80
	Local ICON_SMALL = 0
	Local ICON_BIG = 1
	sendmessage(TheWindow, WM_SETICON, ICON_BIG, icon)
	?
End Function



William Drescher(Posted 2008) [#3]
Is there a way to implement that into making a static icon on the application area?


SebHoll(Posted 2008) [#4]
Pssst! If you are using MaxGUI.Win32MaxGUIEx, the SetGadgetPixmap() command and the GADGETPIXMAP_ICON flag may be just what you need... ;-) Don't tell anyone - it isn't official or supported atm...


William Drescher(Posted 2008) [#5]
Ok...just found a problem. When using MaxGUI.Win32MaxGUIEx I get the cool Windows XP/Vista styles. But if I import my icon with Import "icon.o" then I lose the XP/Vista look. How do I fix this?


Grisu(Posted 2008) [#6]
Your answer should be in here:
http://www.blitzbasic.com/Community/posts.php?topic=71485#801572

Thanks go to Seb as usual and Grisu for being the testing rabbit. ;)


Yan(Posted 2008) [#7]
Or simply use this...

MakeObject.Zip ~100KB

...to create your object file.


Also, import your object file *before* you import MaxGUI.