May 21, 2024, 06:54:13 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Window icon

Started by Parker, February 14, 2006, 01:16:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Parker

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.

Doc

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-

Parker

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.

Parker

It seems it's not possible to set the icon of a child window - I tried sending the WM_SETICON message also.

Ionic Wind Support Team

You can set the icon of an MDI child, that I have done.  But a regular child window might take a little creative coding.
Ionic Wind Support Team

Bruce Peaslee

With the stuff Paul puts out, you say something is impossible at your peril.ÂÃ,  ÂÃ, ;)
Bruce Peaslee
"Born too loose."
iTired (There's a nap for that.)
Well, I headed for Las Vegas
Only made it out to Needles