Article View: borland.public.cppbuilder.nativeapi
Article #5139Re: Icons from Windows
From: Vladimir Stefanovic
Date: Sun, 25 Sep 2005 13:04
Date: Sun, 25 Sep 2005 13:04
27 lines
1895 bytes
1895 bytes
Place 4 TImage components (Image1 .. Image4) on
your main form (Form1), place a button (Button1),
and add this code to Button1::OnClick()
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Image1->Picture->Icon->Handle = LoadIcon( 0,MAKEINTRESOURCE(IDI_HAND));
Image2->Picture->Icon->Handle = LoadIcon(
0,MAKEINTRESOURCE(IDI_QUESTION));
Image3->Picture->Icon->Handle = LoadIcon(
0,MAKEINTRESOURCE(IDI_EXCLAMATION));
Image4->Picture->Icon->Handle = LoadIcon(
0,MAKEINTRESOURCE(IDI_ASTERISK));
}
--
Best regards,
Vladimir Stefanovic
"David Pedley" <david@pedley.ws> wrote in message
news:433696d4@newsgroups.borland.com...
>I have written my own MessageBox routine in VCL to give more flexibility in
>button captions. Can anyone tell me how I can retrieve and use the icons
>that the standard Windows MessageBox uses (or indeed any other standard
>icons)?
>
> David
>
Technical Details
Message-ID:
<43369ff2@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!novia!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<433696d4@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,b0c352e883a8752f X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Vladimir Stefanovic" <antivari@po.sbb.co.yu> Newsgroups: borland.public.cppbuilder.nativeapi References: <433696d4@newsgroups.borland.com> Subject: Re: Icons from Windows Date: Sun, 25 Sep 2005 15:04:28 +0200 Lines: 29 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 82.117.212.65 Message-ID: <43369ff2@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1127653362 82.117.212.65 (25 Sep 2005 06:02:42 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!novia!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail