IonicWind Software

Aurora Compiler => GUI => Topic started by: Parker on February 14, 2006, 01:16:43 PM

Title: Window icon
Post by: Parker on February 14, 2006, 01:16:43 PM
Another question from me, who hasn't done much Aurora GUI programming. How do I set the icon in a window? I've tried
d1.hIcon = LoadImage(GetModuleHandle(null),
    101, 1, 16, 16, 0);
if (d1.hIcon = null)
    MessageBox(0, "Image failed to load (2)", "Internal Error", 0);
d1.SetIcon(d1.hIcon);

but it's not showing anything where the icon should be.
Title: Re: Window icon
Post by: Doc on February 14, 2006, 03:34:48 PM
If you are talking about a standard application icon, then you can set that directly in the build/compile dialog when compiling the application.

-Doc-
Title: Re: Window icon
Post by: Parker on February 14, 2006, 08:23:30 PM
That one I've got, thanks though. It's the title bar icon I'm trying to set. The ID of the resource is 101, so I would think LoadImage would work (IMAGE_ICON = 1).

I might add that I used the dialog editor, but changed to a window. And it's also a child of a fullscreen window.
Title: Re: Window icon
Post by: Parker on February 15, 2006, 02:49:31 PM
It seems it's not possible to set the icon of a child window - I tried sending the WM_SETICON message also.
Title: Re: Window icon
Post by: Ionic Wind Support Team on February 15, 2006, 05:08:51 PM
You can set the icon of an MDI child, that I have done.  But a regular child window might take a little creative coding.
Title: Re: Window icon
Post by: Bruce Peaslee on February 15, 2006, 10:21:35 PM
With the stuff Paul puts out, you say something is impossible at your peril.ÂÃ,  ÂÃ, ;)