Article View: borland.public.cppbuilder.nativeapi
Article #13425Re: hide/show system tray question
From: Martin C
Date: Sun, 12 Oct 2003 03:17
Date: Sun, 12 Oct 2003 03:17
42 lines
2460 bytes
2460 bytes
Thanks Remy so much, that is all what I was looking for.
And I will for sure use WinSight in the future...
BR
"Remy Lebeau (TeamB)" <gambit47.no.spam@no.spam.yahoo.com> wrote in message
news:3f88c52f$1@newsgroups.borland.com...
>
> "Martin C" <martinc@aol.com> wrote in message
> news:3f88c3a5$1@newsgroups.borland.com...
>
> > I am using the following code to show/hide taskbar, but I really
> > can't find the system tray window handle, or at least how to get
> > it by code...do you have any idea how I can accomplish this...
>
> You already have half of the code needed. The system tray is a child of
the
> taskbar window, whose HWND you already have. You can use FindWindowEx()
to
> get the system tray HWND from that, ie:
>
> HWND TaskbarWindow = FindWindow("Shell_TrayWnd", NULL);
> if( TaskbarWindow != NULL )
> {
> HWND SystemTrayWindow = FindWindowEx(TaskbarWindow, NULL,
> "TrayNotifyWnd", NULL);
> if( SystemTrayWindow != NULL )
> // use SystemTrayWindow as needed
> }
>
> For future reference, whenever you need to work with manipulating windows,
> especially windows that are not directly part of your own programs,
WinSight
> or Spy++ are invaluable tools for determine window relationships,
> characteristics, message tracking, etc. WinSight comes with C++Builder,
> which Spy++ is a free download from Microsoft's website.
>
>
> Gambit
>
>
Technical Details
Message-ID:
<3f88c7c9@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newscore.univie.ac.at!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3f88ba6b@newsgroups.borland.com> <3f88bd9d$1@newsgroups.borland.com> <3f88c3a5$1@newsgroups.borland.com> <3f88c52f$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,eb5a844aefa46a0c X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-10-11 20:39:12 PST From: "Martin C" <martinc@aol.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f88ba6b@newsgroups.borland.com> <3f88bd9d$1@newsgroups.borland.com> <3f88c3a5$1@newsgroups.borland.com> <3f88c52f$1@newsgroups.borland.com> Subject: Re: hide/show system tray question Date: Sat, 11 Oct 2003 19:17:26 -0800 Lines: 44 Organization: V Safe X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 81.10.4.238 Message-ID: <3f88c7c9@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1065928649 81.10.4.238 (11 Oct 2003 20:17:29 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newscore.univie.ac.at!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail