🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #16512

bitmap printing in windows

#16512
From: Troels
Date: Wed, 03 May 2000 00:00
22 lines
1309 bytes
I'm using MS Visual C++

I have array, myPictArray[][], that contains a bitmap that I would like to
print using win32 / MFC api calls. How do I do that best ?

I've tried to create a device-context, and attached it to the printer and
then:

for(int x = 0 ; x < xPixels ; x++)
{
  for(int y = 0 ; y < yPixels ; y++)
  {
      if (picArray[x][y]) my_dc->SetPixelV(x,y,0x000000) ; // white
      else my_dc->SetPixelV(x,y,0x00FFFFFF) ;  // black
  }
}

And it works, but it generates a printjob of 96Mb !!!!!
(I'm printing a full page of 4750 x 6800 dots, I think)

Thank You
Troels
Technical Details
Message-ID: <dMPP4.2277$pR5.78169@news.worldonline.dk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fcea4,3ed266375897e97a,start
X-Google-Attributes: gidfcea4,public
From: "Troels" <tpilt@worldonline.dk>
Subject: bitmap printing in windows
Date: 2000/05/03
Message-ID: <dMPP4.2277$pR5.78169@news.worldonline.dk>
X-Deja-AN: 618582960
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
X-Complaints-To: news-abuse@wol.dk
X-Trace: news.worldonline.dk 957335689 212.54.71.232 (Wed, 03 May 2000 08:34:49 MET DST)
Organization: Customer of World Online Denmark A/S
X-MSMail-Priority: Normal
Reply-To: "Troels" <tpilt@worldonline.dk>
NNTP-Posting-Date: Wed, 03 May 2000 08:34:49 MET DST
Newsgroups: be.comp.programming