Thread: Hiding Another Progs System Tray Icon

  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,793
    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,263
    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, 07:12 AM
  2. system tray icons
    By canine in forum Windows Programming
    Replies: 1
    Last Post: 05-14-2002, 03:51 PM
  3. Console App minimized into system tray
    By Liam Battle in forum C++ Programming
    Replies: 3
    Last Post: 05-12-2002, 01: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