Hi all, thought I ask if there's some community supported way now of at least on Windows setting up the default icon for all windows via loading an .ico file.
thanks -Charles |
You would probably want to change the default icon in Icon and then call Icon initialize within your application initialize method. Make sure the default messages are defined within your package to nicely override the defaults when loading.
In order to change the Visual.exe icon as seen by Windows you can use ressource hacker and easily replace the VW icons within the executable.
You can also use a hexeditor to replace any cincom specific messages of the executable if really you want to go that far.
Hope this helps,
@+Maarten,
"Charles Monteiro" <[hidden email]> said: > Hi all, thought I ask if there's some community supported way now of at least > on Windows setting up the default icon for all windows via loading an .ico > file. > > thanks > > -Charles > > -- > View this message in context: > http://forum.world.st/easier-way-to-set-a-default-window-icon-tp4266512p4266512.html > Sent from the VisualWorks mailing list archive at Nabble.com. > _______________________________________________ > vwnc mailing list > [hidden email] > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc > vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Charles Monteiro
I think you're out of luck, but it would be great to hear I'm wrong! The current Windows VM support for icons is pretty braindead. There are two main problems:
Problem 1: Windows uses a 16x16 icon on the window title bar, and 32x32 in the task bar and Alt-Tab display. VW only lets you supply one size, which it then converts to both these sizes with no anti-aliasing. So if you supply a 32x32 icon, the 16x16 result is pretty much unrecognizable, and if you supply 16x16, you get a very blocky task bar icon.
Suggested solution: Change the GDI call parameter for the size conversion in the VM to use the highest quality. If possible allow the application to supply more than one size of icon.
Problem 2: the application icon (or icon group) supplied as an executable resource with ResHack is ignored, rather than being used as the default icon for windows (even if you turn off the base image code that initializes every window with the Cincom icon). So we're stuck with supplying a VW bitmap, with just one size and one bit of alpha, rather than the multiple sizes and bitdepths possible with an application icon. Suggested solution: Make windows use the executable's app icon resource by default. If possible allow the image to set a windows icon to be a resource from the executable (i.e. a new primitive or DLL call, depending how cross-platform this is).
It would be great to see at least the GDI call parameter changed soon, since that is easy and doesn't affect anything else. Some of the other parts need more thought on cross-platform and backwards compatibility.
Cheers,
Steve
From: [hidden email] on behalf of Charles Monteiro Sent: Thu 05/01/2012 20:35 To: [hidden email] Subject: [vwnc] easier way to set a default window icon Hi all, thought I ask if there's some community supported way now of at least _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Maarten Mostert
hi Maarten,
thanks, we actually already do that i.e. both. The issue is really about dynamically or at least at startup being able to assign a different icon to the windows depending on where they are deployed. We already do as much in a not so pretty way by loading image and mask at startup , creating the icon and setting it as the default. We would like to use standard icon making tools and load one file and did I mention that we feel that we should not have to spend any of our cycles on it :) -Charles |
In reply to this post by Steven Kelly
Steven,
hi, long time no speak. As always thanks for the very complete breakdown. So the answer is no not an easy way :). I noticed that Cincom has not improved this in 7.8 but I was hoping somebody had hacked something. Yes, although the client piece is deployed in Windows I would want it cross-platform . Too busy to burn any real cycles on it and particularly if it will result in a Windows only solution |
Free forum by Nabble | Edit this page |