<?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[Hilfe Problem mit Device Context DC.bitBlt(.......))]]></title><description><![CDATA[<p>Hallo ihr... im folgen Code erzeuge ich einen neuen CDC (pX) ,darin mal ich dann eien ellipse und ein text, und will disen DC dann mit bitblt auf den pDC blasten bzw. kopieren.. aber es zeig im fenster nicths an.. wieso nicht???<br />
hilfe</p>
<pre><code>void CChildView::OnPaint() 
{
	CPaintDC pDC(this); // Gerätekontext zum Zeichnen

	CDC *pX= new CDC();
	pX-&gt;CreateCompatibleDC(&amp;pDC);

	pX-&gt;SelectStockObject(GRAY_BRUSH);
	pX-&gt;TextOut(0,0,&quot;TTT&quot;);
	pX-&gt;Ellipse(CRect(0,20,100,120));
	//CDC *pDC= new CDC();

	CRect CClientArea;
    GetClientRect(&amp;CClientArea);

	pDC.BitBlt(0,0,CClientArea.right,CClientArea.bottom,
                 pX,0,0,SRCCOPY);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/159017/hilfe-problem-mit-device-context-dc-bitblt</link><generator>RSS for Node</generator><lastBuildDate>Mon, 27 Jul 2026 21:47:19 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/159017.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 11 Sep 2006 11:33:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Hilfe Problem mit Device Context DC.bitBlt(.......)) on Mon, 11 Sep 2006 11:33:54 GMT]]></title><description><![CDATA[<p>Hallo ihr... im folgen Code erzeuge ich einen neuen CDC (pX) ,darin mal ich dann eien ellipse und ein text, und will disen DC dann mit bitblt auf den pDC blasten bzw. kopieren.. aber es zeig im fenster nicths an.. wieso nicht???<br />
hilfe</p>
<pre><code>void CChildView::OnPaint() 
{
	CPaintDC pDC(this); // Gerätekontext zum Zeichnen

	CDC *pX= new CDC();
	pX-&gt;CreateCompatibleDC(&amp;pDC);

	pX-&gt;SelectStockObject(GRAY_BRUSH);
	pX-&gt;TextOut(0,0,&quot;TTT&quot;);
	pX-&gt;Ellipse(CRect(0,20,100,120));
	//CDC *pDC= new CDC();

	CRect CClientArea;
    GetClientRect(&amp;CClientArea);

	pDC.BitBlt(0,0,CClientArea.right,CClientArea.bottom,
                 pX,0,0,SRCCOPY);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1135073</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1135073</guid><dc:creator><![CDATA[BorisDieKlinge]]></dc:creator><pubDate>Mon, 11 Sep 2006 11:33:54 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe Problem mit Device Context DC.bitBlt(.......)) on Mon, 11 Sep 2006 12:17:59 GMT]]></title><description><![CDATA[<p>- Du brauchst den 2. DC nicht mit new anlegen, weil Du den sonst wieder mit delete freigeben musst<br />
- Du musst ein neues Bitmap erzeugen, weil beim erzeugen eines DCs das Bitmap nur 1x1 Pixel groß ist</p>
<p>so in etwa:</p>
<pre><code class="language-cpp">CPaintDC dc(this);
	CRect rcClient;
	GetClientRect( &amp;rcClient );
	CDC memDC;
	memDC.CreateCompatibleDC( &amp;dc );
	// Bitmap mit der gleichen Größe wie Client
	CBitmap bmp;
	bmp.CreateCompatibleBitmap( &amp;memDC, rcClient.right, rcClient.bottom );
	CBitmap* pBmpOld = memDC.SelectObject( &amp;bmp );
	CBrush brush;
	// Bitmap ist beim erstellen schwarz
	brush.CreateSysColorBrush( COLOR_WINDOW );
	memDC.FillRect( &amp;rcClient, &amp;brush );
	memDC.SelectStockObject( GRAY_BRUSH );
	memDC.Ellipse( CRect( 0, 20, 100, 120 ));
	// für die Ästhetik ;)
	memDC.SetBkMode( TRANSPARENT );
	memDC.TextOut( 0, 0, &quot;TTT&quot; );
	dc.BitBlt( 0, 0, rcClient.right, rcClient.bottom, &amp;memDC, 0, 0, SRCCOPY );
	// das alte Bitmap wieder in den DC laden
	memDC.SelectObject( pBmpOld );
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1135109</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1135109</guid><dc:creator><![CDATA[Airdamn]]></dc:creator><pubDate>Mon, 11 Sep 2006 12:17:59 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe Problem mit Device Context DC.bitBlt(.......)) on Mon, 11 Sep 2006 19:46:33 GMT]]></title><description><![CDATA[<p>ok . das versuch ich dich mal aus .. danke:)</p>
<p>Wenn ich ein 2D -Objekt bewegen lassen will im fenster, mach ich das doch dann so wie du es gecoded hast oder, damit es nich flackert??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1135481</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1135481</guid><dc:creator><![CDATA[BorisDieKlinge]]></dc:creator><pubDate>Mon, 11 Sep 2006 19:46:33 GMT</pubDate></item></channel></rss>