<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Bitmap drucken]]></title><description><![CDATA[<p>Hallo zusammen!</p>
<p>Ich möchte gerne ein Bitmap, welches in meinen Resourcen gespeichert ist, drucken (IDB_BITMAP1).</p>
<p>Warum funktioniert dieser Code nicht?</p>
<pre><code class="language-cpp">dcPrint.SetMapMode(MM_LOMETRIC);

CBitmap bmp;
bmp.LoadBitmap(IDB_BITMAP1);
// get the bitmap's size
BITMAP BM;
bmp.GetObject(sizeof(BM),&amp;BM);
long lBmpHeight = BM.bmHeight;
long lBmpWidth = BM.bmWidth;
// 2. Create a memory device context, compatible to the screen
CDC memDC;
memDC.CreateCompatibleDC(&amp;dcPrint);
// 3. Select the bitmap into it with CDC::SelectObject()
CBitmap* pOldBitmap = memDC.SelectObject(&amp;bmp);
// 4. Blit (or stretch-blit) the mem-DC into the printer-DC 
dcPrint.StretchBlt(375,350,lBmpWidth,lBmpHeight,&amp;memDC,0,0,lBmpWidth,lBmpHeight,SRCCOPY);
// 5. deselect the bitmap from the mem-DC
memDC.SelectObject(pOldBitmap);
// 6. destroy the bitmap and the mem-DC
bmp.DeleteObject();
memDC.DeleteDC();
</code></pre>
<p>Könnt ihr mir helfen, es ist sehr wichtig!!!</p>
<p>greetz<br />
tompo</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/6115/bitmap-drucken</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Apr 2026 15:05:26 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/6115.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 10 Jun 2003 13:02:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Bitmap drucken on Tue, 10 Jun 2003 13:02:00 GMT]]></title><description><![CDATA[<p>Hallo zusammen!</p>
<p>Ich möchte gerne ein Bitmap, welches in meinen Resourcen gespeichert ist, drucken (IDB_BITMAP1).</p>
<p>Warum funktioniert dieser Code nicht?</p>
<pre><code class="language-cpp">dcPrint.SetMapMode(MM_LOMETRIC);

CBitmap bmp;
bmp.LoadBitmap(IDB_BITMAP1);
// get the bitmap's size
BITMAP BM;
bmp.GetObject(sizeof(BM),&amp;BM);
long lBmpHeight = BM.bmHeight;
long lBmpWidth = BM.bmWidth;
// 2. Create a memory device context, compatible to the screen
CDC memDC;
memDC.CreateCompatibleDC(&amp;dcPrint);
// 3. Select the bitmap into it with CDC::SelectObject()
CBitmap* pOldBitmap = memDC.SelectObject(&amp;bmp);
// 4. Blit (or stretch-blit) the mem-DC into the printer-DC 
dcPrint.StretchBlt(375,350,lBmpWidth,lBmpHeight,&amp;memDC,0,0,lBmpWidth,lBmpHeight,SRCCOPY);
// 5. deselect the bitmap from the mem-DC
memDC.SelectObject(pOldBitmap);
// 6. destroy the bitmap and the mem-DC
bmp.DeleteObject();
memDC.DeleteDC();
</code></pre>
<p>Könnt ihr mir helfen, es ist sehr wichtig!!!</p>
<p>greetz<br />
tompo</p>
]]></description><link>https://www.c-plusplus.net/forum/post/29648</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/29648</guid><dc:creator><![CDATA[tompo]]></dc:creator><pubDate>Tue, 10 Jun 2003 13:02:00 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmap drucken on Wed, 11 Jun 2003 06:34:00 GMT]]></title><description><![CDATA[<p>Bei MM_LOMETRIC liegt der Koordinatenursprung unten links.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/29649</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/29649</guid><dc:creator><![CDATA[RenéG]]></dc:creator><pubDate>Wed, 11 Jun 2003 06:34:00 GMT</pubDate></item></channel></rss>