🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.multimedia
Article #816

Printing a bitmap

#816
From: dave
Date: Mon, 09 Sep 2002 00:36
10 lines
1445 bytes
Im having trouble with the code to print a bitmap of the form. The program is a single form. Ive tried a book called C++ builder in 21 days and the code is as follows.
Graphics::TBitmap* bitmap = new Graphics::TBitmap;
bitmap->LoadFromFile("c:\\winnt\\winnt.bmp");
Printer()->BeginDoc();
Printer()->Canvas->Draw(20, 20, bitmap);
Printer()->EndDoc();
delete bitmap;

This tries to open up the winnt.bmp file but it returns an error saying that it can't. I need to change the LoadFromFile to a screen capture of the form. Can anyone point me in the right direction....
Technical Details
Message-ID: <3d7bed10$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!feed.textport.net!news.stealth.net!news.stealth.net!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d0fc,f209399ecff8ca09,start
X-Google-Attributes: gid10d0fc,public
X-Google-ArrivalTime: 2002-09-08 18:52:05 PST
From: "dave" <davidwardle4@hotmail.com>
Sender: "dave" <davidwardle4@hotmail.com>
Reply-To: "dave" <davidwardle4@hotmail.com>
Subject: Printing a bitmap
Newsgroups: borland.public.cppbuilder.multimedia
X-User-Info: 213.40.3.97 213.40.3.97    
NNTP-Posting-Host: 207.105.83.65
Message-ID: <3d7bed10$1@newsgroups.borland.com>
Date: 8 Sep 2002 17:36:32 -0700
X-Trace: newsgroups.borland.com 1031531792 207.105.83.65 (8 Sep 2002 17:36:32 -0700)
Lines: 10
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!feed.textport.net!news.stealth.net!news.stealth.net!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail