[solved] How to make a Window iconified at activation ?

5 posts / 0 new
Last post
zzd10h
zzd10h's picture
Offline
Last seen: 7 years 2 weeks ago
Joined: 2012-08-24 20:56
[solved] How to make a Window iconified at activation ?

Hi,
I try again to mimic MUI function in Reaction.

In MUI, you can start a program in iconified state using "set(app,MUIA_Application_Iconified,TRUE) ;".

With Reaction, Window seems to have to be opened before to be iconified. Therefore, you see the window a short time and it's iconified using "IDoMethod(win, WM_ICONIFY) ;"

I didn't find a Window.class parameter to start a window in iconified state.

Does it exist ?

Thank you (and sorry for all these newbies questions that I ask currently)

broadblues
broadblues's picture
Offline
Last seen: 4 years 9 months ago
Joined: 2012-05-02 21:48
Must bepossible AOrganiser

Must bepossible AOrganiser starts iconified....

/me goes off to rifle through my oldersrc code

....
after a quick scan I see the obvious bit, if you want to start iconified don't open the window, but I can't see where I add the icon, my program is a commodity though, perhaps that's handling it.

Does simply invoking WM_ICONIFY at startup rather WM_OPEN not work?

zzd10h
zzd10h's picture
Offline
Last seen: 7 years 2 weeks ago
Joined: 2012-08-24 20:56
Thx (again ;) ) for your

Thx (again ;) ) for your reply,

No, I tried to use ICONIFY before OPEN but it crashed (certainly because I added some objects after opening, as drag area).

broadblues
broadblues's picture
Offline
Last seen: 4 years 9 months ago
Joined: 2012-05-02 21:48
My code was actually starting

My code was actually starting "hidden" rather than iconified, thus there was no icon.

I just modified it to start iconified and I can confirm that it is suffient to call WM_ICONIFY ob the WindowObject instead of WM_OPEN if you want to start iconified.

Your crash must be for some other reason. Perhaps you referenced the intuion window ptr but it was not valid as you hadn't opened the window yet?

zzd10h
zzd10h's picture
Offline
Last seen: 7 years 2 weeks ago
Joined: 2012-08-24 20:56
Right, I added Gadgets to my

Right, I added Gadgets to my window when iconified => freeze.

By adding them only when window is displayed works far better and starting with
window = (struct Window *)IDoMethod(win, WM_ICONIFY);
works fine.

Thank you

Log in or register to post comments