Thread: Hide application from systray

  1. #1
    Registered User
    Join Date
    Jul 2005

    Exclamation Hide application from systray

    Hi all, someone has some ideas if there's a C++ function or similar to hide an application from the systray?

    For example, I minimize my application to systray, then I want to hide it by pressing for example Ctrl+D to hide it, or to change the icon!

    Some ideas?

  2. #2
    int x = *((int *) NULL); Cactus_Hugger's Avatar
    Join Date
    Jul 2003
    Banks of the River Styx
    Well, just remove the icon from the systray! You put it there, and you should remove it in your program shutdown anyways....
    Just make another call to Shell_NotifyIcon() with NIM_DELETE... make sure that pnid's uID and hWnd members are the same as when you created the systray icon.

    As for the key press, I think the best way would be to register a hot key. (Never done this myself though.) See the RegisterHotKey() function.
    Last edited by Cactus_Hugger; 01-16-2006 at 04:39 PM.
    long time; /* know C? */
    Unprecedented performance: Nothing ever ran this slow before.
    Any sufficiently advanced bug is indistinguishable from a feature.
    Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31.
    The best way to accelerate an IBM is at 9.8 m/s/s.
    recursion (re - cur' - zhun) n. 1. (see recursion)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem with com application
    By amardon in forum C++ Programming
    Replies: 3
    Last Post: 10-06-2005, 05:50 AM
  2. MFC run application by clicking on file...
    By dug in forum Windows Programming
    Replies: 4
    Last Post: 12-02-2004, 04:33 AM
  3. Hide Application
    By cr_naik in forum Windows Programming
    Replies: 17
    Last Post: 07-07-2003, 08:23 PM