That link was great. It help to solve the problem. Now the system is correctly
using the small and the large icons from the icon file. Thanks for pointing it.
I just fixed and committed to CVS.
Best,
Scuri
From: Chase S [mailto:[email protected]]
Sent: terça-feira, 15 de abril de 2014 17:47
To: IUP discussion list.
Subject: Re: [Iup-users] IUP Windows Multi-Icon Resource
I am currently using Windows 7. I do not have Windwos 8, so I cannot say how
this behavior has changed. If you have any code you want me to try I am more
then willing to do so, however it is unlikely the behavior has changed
significantly. I do notice that on windows many programs seem to share their
main icon with all of their subwindows.
I am not sure I fully understand your problem. Is there some negative side
effect to changing the window class? Perhaps it's possible to call
LoadIcon+SetClassLong and then call LoadImage+WM_SETICON to replace the icon on
individual windows? If it works, this means the initial icon would be set as
the default, and later icons would replace it on the designated windows. But
this behavior is somewhat confusing, and might be better done with a
"DEFAULT_ICON" attribute (if it works).
The internet doesn't seem to have much of a solution to this problem and it is
not well documented. The only explanation I could find is here
http://blog.barthe.ph/2009/07/17/wmseticon/
Regards,
Chase
On Tue, Apr 15, 2014 at 2:55 PM, Antonio Scuri <[email protected]> wrote:
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
------------------------------------------------------------------------------
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