Hiding Another Progs System Tray Icon

This is a discussion on Hiding Another Progs System Tray Icon within the Windows Programming forums, part of the Platform Specific Boards category; Hey, I have a handle to a program that has a system tray icon. I have checked that the handle ...

  1. #1
    Registered User (TNT)'s Avatar
    Join Date
    Aug 2001
    Location
    UK
    Posts
    339

    Hiding Another Progs System Tray Icon

    Hey,


    I have a handle to a program that has a system tray icon. I have checked that the handle is correct and everything and it is. I just need to hide the icon in the tray that that program has put there. I do not want to close this program just hide it.

    This is what ive tried:

    Code:
    HWND hWndA = FindWindow(0, "TNT MSG");
    
    if(hWndA == NULL)
    {
    MessageBox(hWnd, "Not Found", "", NULL);
    }
    
    else
    {
    ShowWindow(hWndA, SW_HIDE);
    }
    I just tried ShowWindow() to hide the icon, but i didnt think it would work and it didnt, please let me know how i can do this.

    Thanks alot,
    TNT
    TNT
    You Can Stop Me, But You Cant Stop Us All

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    I havent tried and I am only guessing....have you attempted to use a WM_SETICON message?


    Dont know how viable this is though

  3. #3
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,267
    the only way i've seen is to get the MFC CWND class of the program and use SetIcon(0), and i dont know if that (works/is possible) or not!
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Closing system tray program
    By (TNT) in forum Windows Programming
    Replies: 4
    Last Post: 08-02-2002, 08:12 AM
  2. system tray icons
    By canine in forum Windows Programming
    Replies: 1
    Last Post: 05-14-2002, 04:51 PM
  3. Console App minimized into system tray
    By Liam Battle in forum C++ Programming
    Replies: 3
    Last Post: 05-12-2002, 02:29 AM
  4. System Tray
    By genghis in forum Windows Programming
    Replies: 2
    Last Post: 01-21-2002, 11:15 AM
  5. System Tray Icons
    By ExDigit in forum Windows Programming
    Replies: 5
    Last Post: 01-08-2002, 05:26 PM

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