<?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[Code Beispiel: Bitmap aus Resource file laden]]></title><description><![CDATA[<p>Hat jemand ein kleines Beispie/Code wie man ein Bitmap aus der Resource Datei lade und dann im fenster Darstelle??</p>
<p>Danke im vorraus für euere Bemühungen</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/159348/code-beispiel-bitmap-aus-resource-file-laden</link><generator>RSS for Node</generator><lastBuildDate>Tue, 28 Jul 2026 05:57:01 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/159348.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 14 Sep 2006 09:57:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Code Beispiel: Bitmap aus Resource file laden on Thu, 14 Sep 2006 09:57:31 GMT]]></title><description><![CDATA[<p>Hat jemand ein kleines Beispie/Code wie man ein Bitmap aus der Resource Datei lade und dann im fenster Darstelle??</p>
<p>Danke im vorraus für euere Bemühungen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1137141</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1137141</guid><dc:creator><![CDATA[BorisDieKlinge]]></dc:creator><pubDate>Thu, 14 Sep 2006 09:57:31 GMT</pubDate></item><item><title><![CDATA[Reply to Code Beispiel: Bitmap aus Resource file laden on Thu, 14 Sep 2006 10:13:01 GMT]]></title><description><![CDATA[<p>- leg eine CBitmap Membervariable an (CBitmap m_bitmap;)<br />
- lade ein Bitmap aus der Ressource (z.B. in OnInitDialog)</p>
<pre><code class="language-cpp">m_bitmap.LoadBitmap( IDB_BITMAP1 );
</code></pre>
<p>- temporäres DC erstellen, Bild selektieren und zeichnen (z.B. in OnPaint)</p>
<pre><code class="language-cpp">CPaintDC dc(this);
CDC memDC;
memDC.CreateCompatibleDC( &amp;dc );
CBitmap* pBmpOld = memDC.SelectObject( &amp;m_bitmap );
BITMAP bm;
GetObject( m_bitmap, sizeof( bm ), &amp;bm );
dc.BitBlt( 0, 0, bm.bmWidth, bm.bmHeight, &amp;memDC, 0, 0, SRCCOPY );
memDC.SelectObject( pBmpOld );
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1137154</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1137154</guid><dc:creator><![CDATA[Airdamn]]></dc:creator><pubDate>Thu, 14 Sep 2006 10:13:01 GMT</pubDate></item><item><title><![CDATA[Reply to Code Beispiel: Bitmap aus Resource file laden on Thu, 14 Sep 2006 10:31:39 GMT]]></title><description><![CDATA[<p>ohh dasd ging schnell .. danke..</p>
<p>gibt es jetzt noch en möglich keit das Bitmap in der größe zu verziehen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1137174</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1137174</guid><dc:creator><![CDATA[BorisDieKlinge]]></dc:creator><pubDate>Thu, 14 Sep 2006 10:31:39 GMT</pubDate></item><item><title><![CDATA[Reply to Code Beispiel: Bitmap aus Resource file laden on Thu, 14 Sep 2006 11:44:36 GMT]]></title><description><![CDATA[<p>BorisDieKlinge schrieb:</p>
<blockquote>
<p>ohh dasd ging schnell .. danke..</p>
<p>gibt es jetzt noch en möglich keit das Bitmap in der größe zu verziehen?</p>
</blockquote>
<p>ja gibt es. Statt BitBlt nimmst Du StretchBlt. Das hat 2 Parameter mehr für die Größe und Breite, in der das Bild dargestellt werden soll.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1137222</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1137222</guid><dc:creator><![CDATA[Airdamn]]></dc:creator><pubDate>Thu, 14 Sep 2006 11:44:36 GMT</pubDate></item><item><title><![CDATA[Reply to Code Beispiel: Bitmap aus Resource file laden on Fri, 15 Sep 2006 04:07:40 GMT]]></title><description><![CDATA[<p>ohh.. danke für die hilfe...<br />
aber nun hab ich noch ne frage?:)</p>
<p>wenn ich nun CDC *p; DC erstelle, und in dem von mir aus ne Linie zeiche, kann ich diese DC doch auf den aktuellen fesnter DC blasen &quot;BitBlt&quot; oder?? das hab ich mal so versucht:</p>
<pre><code>CPen CMyPen;

	CDC *p = new CDC();
	p-&gt;CreateCompatibleDC(&amp;dc);

	LOGBRUSH logBrush;
	logBrush.lbStyle = BS_SOLID;
	logBrush.lbColor = RGB(0,255,255);
	CMyPen.CreatePen(PS_DOT|PS_GEOMETRIC|PS_ENDCAP_ROUND, 2, &amp;logBrush);

	p-&gt;MoveTo(10,10);
    // Roten Stift fuer erste Linie auswaehlen
    CPen *pCOrgPen = dc.SelectObject(&amp;CMyPen);
    // Erste Linie zeichnen
    p-&gt;LineTo(100,100);
	dc.BitBlt(0,0,100,100,p,0,0,SRCCOPY);
</code></pre>
<p>allerdingwir nichts im fenster gezeichne?? denke mal ich muss von dem DCD beim erstellen nich die größe oder so angeben odr??</p>
<p>grüße</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1137702</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1137702</guid><dc:creator><![CDATA[BorisDieKlinge]]></dc:creator><pubDate>Fri, 15 Sep 2006 04:07:40 GMT</pubDate></item><item><title><![CDATA[Reply to Code Beispiel: Bitmap aus Resource file laden on Fri, 15 Sep 2006 07:53:38 GMT]]></title><description><![CDATA[<p>ich hab ein Dejavu :p<br />
wenn Du ein DC neu erstellst, dann hat der ein Bitmap in der Größe von 1x1 Pixel. Du musst also auch ein entsprechendes Bitmap erstellen oder laden, auf dem Du zeichnen kannst. Das kannst Du dann auf Dein Fenster blitten <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1137756</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1137756</guid><dc:creator><![CDATA[Airdamn]]></dc:creator><pubDate>Fri, 15 Sep 2006 07:53:38 GMT</pubDate></item></channel></rss>