System tray icons

Started by
2 comments, last by RamboBones 20 years, 9 months ago
Hey people, I''m having a slight problem with system tray icons, actually the problem isn''t really with the system tray icons just the way I''m trying to use them, you''ll see. I''m trying to setup a program so that when you press the minimize button it creates a system tray icon and removes the window from the screen, now I can do everything BUT remove the window. You see it doesn''t matter what functions I call on the window it is STILL around or in the task bar. I figured I should destroy the window, which I''m happy to do, but the system tray icon needs a window to send it''s messages to, so I''m kinda stuck if you see what I mean. Can anyone give me some advice? If I''ve explained anything baddly and it needs clarifying don''t hesitate to ask.
Advertisement
o hide the window using ShowWindow with SW_HIDE
o change the window extended style using SetWindowLong, anding out WS_EX_APPWINDOW and oring in WS_EX_TOOLWINDOW
o refresh the new window style setting using ShowWindow with SW_SHOWNOACTIVATE
You might consider creating a message-only window and using that to handle the messages coming from the tray. After you create the message-only window you can destroy your other one.


Qui fut tout, et qui ne fut rien
Invader''s Realm
Nah, the Anonymous Posters suggestion works fine, sorry bout taking so long to say so, had to go away for a few days

This topic is closed to new replies.

Advertisement