Home
Products
Community
Manuals
Contact
Login or Signup

Window and Static Icons

BlitzMax Forums/BlitzMax GUI Programming/Window and Static Icons

Wilkua(Posted 1+ years ago) #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 1+ years ago) #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



Wilkua(Posted 1+ years ago) #3
Is there a way to implement that into making a static icon on the application area?


SebHoll(Posted 1+ years ago) #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...


Wilkua(Posted 1+ years ago) #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 1+ years ago) #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 1+ years ago) #7
Or simply use this...

MakeObject.Zip ~100KB

...to create your object file.


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