Article View: borland.public.cppbuilder.nativeapi
Article #10902Re: TBitmap->Canvas
From: Remy Lebeau (TeamB)
Date: Fri, 19 Mar 2004 22:26
Date: Fri, 19 Mar 2004 22:26
22 lines
1712 bytes
1712 bytes
"Robert Hoover" <not.a.real.address@anywhere...sorry> wrote in message news:405b5cb1$1@newsgroups.borland.com... > I've created a BITMAP structure and I'd like to use > TextOut to write text to it. But, TextOut requires an HDC. You need to create a suitable HDC for moidyfing the bitmap. Call CreateCompatibleDC(0) first and then use SelectObject() to place your HBITMAP into the compatible HDC. If the bitmap has a palette, then use SelectPalette() to put the palette into the HDC as well and then call RealizePalette(). Once you do all of that, you will then have an HDC that can modify the bitmap. > How does Builder's VCL accomplish this with > TBitmap->Canvas->TextOut()? The Canvas property is a TBitmapCanvas class which sets itself up as described above. Gambit
Technical Details
Message-ID:
<405b7172$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-mailReferences:
<405b5cb1$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,b74f22aa56d6c932 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-03-19 14:39:57 PST From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <405b5cb1$1@newsgroups.borland.com> Subject: Re: TBitmap->Canvas Date: Fri, 19 Mar 2004 14:26: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.138.253 Message-ID: <405b7172$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1079734642 67.22.138.253 (19 Mar 2004 14:17:22 -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