Re: any idea to hide a traybar icon of other application?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Jaime Stuardo (jstuardo_at_manquehue.net)
Date: 01/19/05


Date: Wed, 19 Jan 2005 10:29:00 -0300

That's the point. I know the usage of Shell_NotifyIcon API, but I need some
application data I don't know at first, hWnd and uID.

To get the hWnd I tried to use FindWindowAPI, but how can I find the icon in
the traybar? I tried by usng that API passing the ToolbarWindow32 class but
I didn't succeed.

The same problem I will have to get uID element.

Any further help will be greatly appreciated.

Thanks
Jaime

"selvam" <selvam@discussions.microsoft.com> wrote in message
news:B159F63B-27BA-4B35-9A82-C2879CB66BD9@microsoft.com...
>
> "Jaime Stuardo" wrote:
>
>> Hi all..
>>
>> I need to know how can I hide other applicatin traybar icon. For example,
>> if
>> I want the MSN messanger icon to be hidden by mean of an application I
>> programmed.
>>
>> I program in MFC and ATL, VC++ 6.0
>>
>> Thanks in advance
>> Jaime
>>
>>
> Hi,
>
> Try this.
>
>
>
> // for remove, only provide cbSize, hWnd and uID!
> NOTIFYICONDATA tnid;
> tnid.cbSize = sizeof(NOTIFYICONDATA);
> tnid.hWnd = m_hWnd;
> tnid.uID = IDI_ICONNAME;
>
> // call to Shell_NotifyIcon with NIM_DEL parameter
> Shell_NotifyIcon(NIM_DELETE, &tnid);
>
>
>
> Regards,
> Selvam
>



Relevant Pages

  • Re: load icon in dll file not work ?!
    ... I have to pass the resource icon from main process ... HWND hwnd, ... UINT uID, ... HICON hIcon, ...
    (microsoft.public.pocketpc.developer)
  • Re: load icon in dll file not work ?!
    ... HWND hwnd, ... UINT uID, ... HICON hIcon, ... we have to write a module with icon and system tray on pocket pc. ...
    (microsoft.public.pocketpc.developer)
  • Re: how to make a vb.net app single instance?
    ... I placed the Dim and If Then statements in the ... obtain the hwnd value than ExecutingProcesses? ... it from the RunningProcesses var? ... >>>> API or something? ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Form Unload
    ... Try saving the hwnd of the form to a form-level variable, ... in the API call. ... Private Declare Function GetWindowLong Lib "user32" Alias ... :> Are you using a timer for the fade? ...
    (microsoft.public.vb.controls)
  • Re: Sendmessage API help
    ... Do you have a snippet of code as I am not too familar with API. ... I have used SPY++ to try get the hwnd of a text box on a form and it dosent ... I would really apreciate some code that can find all edit controls or Hwnd ... at present to fill in the textboxes with data. ...
    (microsoft.public.vb.general.discussion)