April 29, 2024, 09:33:18 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


window icons

Started by LarryMc, May 09, 2011, 08:53:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LarryMc

May 09, 2011, 08:53:38 PM Last Edit: May 09, 2011, 09:11:06 PM by LarryMc
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
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

sapero

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

LarryMc

 ;D ;D ;DThe "Magic Bag of Tricks" did it!!

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library