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?
Best,
Scuri
From: Chase S [mailto:[email protected]]
Sent: segunda-feira, 14 de abril de 2014 19:48
To: [email protected]
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
Regards,
Chase
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users