🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Changing Title Bar icon

#12852
From: Remy Lebeau (TeamB)
Date: Sun, 16 Nov 2003 23:53
18 lines
1726 bytes
"Peter Rees" <peter@NOOSPAMMrees.co.nz> wrote in message
news:3fb7ee82$1@newsgroups.borland.com...

>  I want my application to have the same icon as the shortcut
> icon that was used to start it. How do I retrieve a reference/hIcon
> to that icon.

You can't.  Processes have no concept of the shortcuts that started them.
The only way you can do it is to pass the shortcut's filename to the program
as a command-line parameter (something else not easily done), so that the
program knows which shortcut was used and can then use the IShellLink
interface to get information about it.  Otherwise, just make sure that the
shortcut in question uses the same icon as the application to begin with,
not the other way around.


Gambit
Technical Details
Message-ID: <3fb80d5b@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nntp.abs.net!ash.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3fb7e214$1@newsgroups.borland.com> <3fb7e838$1@newsgroups.borland.com> <3fb7ee82$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,7713528a7c4d2220
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-11-16 16:08:58 PST
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3fb7e214$1@newsgroups.borland.com> <3fb7e838$1@newsgroups.borland.com> <3fb7ee82$1@newsgroups.borland.com>
Subject: Re: Changing Title Bar icon
Date: Sun, 16 Nov 2003 15:53:07 -0800
Lines: 20
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.137.149
Message-ID: <3fb80d5b@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1069026651 67.22.137.149 (16 Nov 2003 15:50:51 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nntp.abs.net!ash.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail