🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #13809

Pop up menu of task bar button

#13809
From: SubZero
Date: Tue, 16 Sep 2003 17:28
45 lines
2155 bytes
Hello,

I want to make my application respond to events like single and double
clicking on task bar button (not tray). I recognized that BCB IDE does this
and all other applications built in VC++ too. So there should be a way. I
know that the window at task bar is indeed TApplication however, I hid
TApplication using

void __fastcall TMainForm::CreateParams(TCreateParams &Params)
{
        TForm::CreateParams(Params);
        Params.ExStyle  |= WS_EX_APPWINDOW;
        Params.WndParent = GetDesktopWindow();
}

and

void __fastcall TMainForm::hideApplicationFromTaskbarManager(void) // hide
the Application window totally
{
        if(runAsService)
                return;

        ShowWindow(Forms::Application->Handle, SW_HIDE);

        SetWindowLong(
                        Forms::Application->Handle,
                        GWL_EXSTYLE,
                        WS_EX_TOOLWINDOW //| WS_DISABLED //| WS_DLGFRAME
                     );

        Forms::Application->Title = ""; // to remove from task manager!
        //RegisterServiceProcess(GetCurrentProcessID(), 1);
}
//--------------------------------------------------------------------------
-

While these are executed, I think, I lost the popup menu of the task bar
button.

Any ideas?

TIA,

SZ
Technical Details
Message-ID: <3f674832@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,e9e78749dc28805b,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-09-16 10:31:39 PST
From: "SubZero" <g_ates@hotmail.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Pop up menu of task bar button
Date: Tue, 16 Sep 2003 20:28:15 +0300
Lines: 47
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: 212.174.56.210
Message-ID: <3f674832@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1063733298 212.174.56.210 (16 Sep 2003 10:28:18 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail