🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Drawing an icon

#11433
From: Remy Lebeau (TeamB)
Date: Tue, 10 Feb 2004 23:39
21 lines
1509 bytes
"Malcolm Smith" <m.smith@comvision.net.au> wrote in message
news:40296666@newsgroups.borland.com...

> ::DrawIcon(imgIcon->Canvas->Handle, 0, 0, Icon->Handle);

Why not just use TCanvas::Draw() instead?

    TIcon *Icon = new Graphics::TIcon;
    Icon->Handle = ::LoadIcon(0, IDI_QUESTION);
    imgIcon->Canvas->Draw(0, 0, Icon);
    delete Icon;

> I tried drawing on the form canvas and nothing was shown.

When exactly did you do the drawing?  You can only use the form's Canvas for
anything meaningful from within the OnPaint event, if you are not already
doing so.


Gambit
Technical Details
Message-ID: <402969d3$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <40296666@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,2e2fdffa598d0cc5
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-02-10 15:40:00 PST
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <40296666@newsgroups.borland.com>
Subject: Re: Drawing an icon
Date: Tue, 10 Feb 2004 15:39:02 -0800
Lines: 23
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.138.253
Message-ID: <402969d3$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1076455891 67.22.138.253 (10 Feb 2004 15:31:31 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail