🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: How to set icon and caption of windows taskbar button?

#4850
From: Alistair
Date: Fri, 18 Nov 2005 18:44
22 lines
2007 bytes
Simon Elliott wrote:
> On 27/05/2005, Remy Lebeau (TeamB) wrote:
> 
>>> Now I'd like to gove the taskbar button its own icon and
>>> caption - possibly different from the ones shown by the
>>> form. How do I do this?
> 
>> The Caption of the Taskbar Button is always the same as the Form's
>> Caption, and the Icon is the same as the Form's Icon.  You cannot
>> specify a different Caption and Icon that are just for the button
>> alone.  They have to be applied to the Form as well.
> 
> OK. I vaguely recalled from the olden days of Petzold that there was a
> way of drawing on the taskbar button's canvas, but it was so long ago
> that my memory could be a bit flaky...
> 

Well,  Get the taskbar handle, then get the child handle to the window 
containing the taskbar buttons, then search for the child window that is 
your applications taskbar button.

Get a DC for the window and draw.
Technical Details
Message-ID: <437e20c6$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed.hal-mli.net!feeder1.hal-mli.net!news-out.superfeed.net!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <42972464$1@newsgroups.borland.com> <429753ca$1@newsgroups.borland.com> <42985468$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,d0933eb43b54b0eb
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Fri, 18 Nov 2005 18:44:17 +0000
From: Alistair <NoSpamPlease@Somewhere.Com>
User-Agent: Thunderbird 1.4 (Windows/20050908)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: How to set icon and caption of windows taskbar button?
References: <42972464$1@newsgroups.borland.com> <429753ca$1@newsgroups.borland.com> <42985468$1@newsgroups.borland.com>
In-Reply-To: <42985468$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 84.9.169.51
Message-ID: <437e20c6$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1132339398 84.9.169.51 (18 Nov 2005 10:43:18 -0700)
Lines: 22
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed.hal-mli.net!feeder1.hal-mli.net!news-out.superfeed.net!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail