🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Move program into the system tray with SetWindowLong

#12039
From: Remy Lebeau (TeamB)
Date: Tue, 30 Dec 2003 21:09
22 lines
1794 bytes
"Jan Weing�rtner" <jweingart@gmx.de> wrote in message
news:3ff1e2bd@newsgroups.borland.com...

> If i execute this in OnCreate:

Do not use the OnCreate event in C++.  Use the constructor instead, or
alternatively since you are modifying the main TApplication window, move the
code into the WinMain() function directly.

> all works fine. The task bar icon disappears.
>
> Later i can use the following code to switch back to the normal mode:

Why not just use the ShowWindow() approach as described in
http://www.bcbdev.com/faqs/faq4.htm ?  It woks fiine for what you are asking
for.  You should not be toggling the window styles back and forth for this
purpose.  That should only be used if you are removing the taskbar button
permanantly, which you are obviously not actually doing.


Gambit
Technical Details
Message-ID: <3ff1e84d$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3ff17a91@newsgroups.borland.com> <3ff1c0dd$1@newsgroups.borland.com> <3ff1e2bd@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10cc67,3dad11c17b4bae3d
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-12-30 13:09:47 PST
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3ff17a91@newsgroups.borland.com> <3ff1c0dd$1@newsgroups.borland.com> <3ff1e2bd@newsgroups.borland.com>
Subject: Re: Move program into the system tray with SetWindowLong
Date: Tue, 30 Dec 2003 13:09:40 -0800
Lines: 24
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: 67.22.139.199
Message-ID: <3ff1e84d$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1072818253 67.22.139.199 (30 Dec 2003 13:04:13 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail