Hi Chase,


 I see two differences here. In IUP we use LoadImage instead of LoadIcon and WM_SETICON instead of SetClassLong.


  I think that the HICON returned in LoadImage and LoadIcon are the same. So the problem should be in the second difference.


  But I cannot use SetClassLong or all IupDialogs will have the same Icon, because it will change the Window Class (even using an HWND as parameter) and all IupDialogs use the same Window Class.


  In WM_SETICON there is a parameter that specifies the size of the icon, and currently we are using ICON_BIG. The other flag is ICON_SMALL. Unfortunately they cannot be combined, so maybe we have to call WM_SETICON twice. I tried that and it doesn’t seem to work.


  Actually I tried many combinations of LoadImage/LoadIcon and SetClassLong/WM_SETICON(SMALL/BIG), and none of them work. Except LoadIcon+SetClassLong which affected all the dialogs.


  But I tested only in Windows 8. Maybe in older systems the result is different. Which system are you using?






From: Chase S [mailto:chasesan@gmail.com]
Sent: segunda-feira, 14 de abril de 2014 19:48
To: iup-users@lists.sourceforge.net
Subject: [Iup-users] IUP Windows Multi-Icon Resource


In IUP, when I specify a resource as the ICON for IUP, only the first is used for both the window and the taskbar. However my icon resource has multiple sizes of icons.


I can get around this by using a bit of the windows API and the WND from the dialog. However I think this somewhat defeats the purpose of IUP. Is there a way to handle this with just IUP?


Here is my solution, if it is of any help. http://pastebin.com/hyESmJqj