IonicWind Software

IWBasic => GUI Central => Topic started by: LarryMc on May 09, 2011, 08:53:38 PM

Title: window icons
Post by: LarryMc on May 09, 2011, 08:53:38 PM
I've been working on the part of the designer that allows the user to select an icon for a window.

In the attached project I have a dialog with 2 child windows.
Each child window has its own loadimage and seticon command with different ico files

When compiled BOTH child windows have the same icon displayed (whichever is the last one processed).

What am I doing wrong? How can I make it work?

UPDATE: I found this in the SDK:
QuoteYour application can replace a class icon by using the SetClassLong function. This function changes the default window settings for all windows of a given class.
That makes me think you you can't have multiple child windows with different icons.....
@Sapero - Unless you can pull out one of your magical tricks. ;)

LarryMc
Title: Re: window icons
Post by: sapero on May 09, 2011, 09:29:06 PM
The magic here is to send a message, replacing all (two) SETICON calls!
$define WM_SETICON 0x0080
$define ICON_SMALL 0
SendMessage w1, WM_SETICON, ICON_SMALL, w1_hicon
Title: Re: window icons
Post by: LarryMc on May 09, 2011, 09:52:43 PM
 ;D ;D ;DThe "Magic Bag of Tricks" did it!!

LarryMc