Hide application from systray

This is a discussion on Hide application from systray within the Windows Programming forums, part of the Platform Specific Boards category; Hi all, someone has some ideas if there's a C++ function or similar to hide an application from the systray? ...

  1. #1
    Registered User
    Join Date
    Jul 2005
    Posts
    45

    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
    Location
    Banks of the River Styx
    Posts
    902
    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 03: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, 03:33 AM
  3. Hide Application
    By cr_naik in forum Windows Programming
    Replies: 17
    Last Post: 07-07-2003, 08:23 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21