<?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[BitBlt und gegen flimmern]]></title><description><![CDATA[<p>Hallo!</p>
<p>Hab ein problem:</p>
<pre><code class="language-cpp">// in InitInsatnce
   HDC dc = GetDC(g_hWnd);
   HDC g_RenderDC = CreateCompatibleDC(dc);
   HBITMAP g_RenderScreen = CreateCompatibleBitmap(dc, 800, 600);
   HBITMAP g_OldBitmap = (HBITMAP)SelectObject(g_RenderDC, g_RenderScreen);
   ReleaseDC(g_hWnd, dc);

// in WM_PAINT:
  hdc = BeginPaint (hWnd, &amp;ps);
  TextOut(g_RenderDC, 100, 100, &quot;Dies ist ein Text&quot;, 10);
  if(!BitBlt(ps.hdc, 0, 0, 800, 600, g_RenderDC, 0, 0, SRCCOPY))
	int i = 1;  // Fehler!, wird aber nie erreicht, BitBlt klappt also 
  EndPaint( hWnd, &amp;ps );
</code></pre>
<p>Ich will also erst alles in eine Bitmap blitten, und die dann mit einem mal ins Fenster zeichnen, dass das nciht so flimmert. Aber, das problem ist, dass das, was ich zeichne, nicht angezeigt wird, also, man sieht nichts im Fenster. Woran kann das liegen?</p>
<p>Gruß, MAxi</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/85310/bitblt-und-gegen-flimmern</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Apr 2026 01:16:24 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/85310.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 07 Sep 2004 15:54:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to BitBlt und gegen flimmern on Tue, 07 Sep 2004 15:54:49 GMT]]></title><description><![CDATA[<p>Hallo!</p>
<p>Hab ein problem:</p>
<pre><code class="language-cpp">// in InitInsatnce
   HDC dc = GetDC(g_hWnd);
   HDC g_RenderDC = CreateCompatibleDC(dc);
   HBITMAP g_RenderScreen = CreateCompatibleBitmap(dc, 800, 600);
   HBITMAP g_OldBitmap = (HBITMAP)SelectObject(g_RenderDC, g_RenderScreen);
   ReleaseDC(g_hWnd, dc);

// in WM_PAINT:
  hdc = BeginPaint (hWnd, &amp;ps);
  TextOut(g_RenderDC, 100, 100, &quot;Dies ist ein Text&quot;, 10);
  if(!BitBlt(ps.hdc, 0, 0, 800, 600, g_RenderDC, 0, 0, SRCCOPY))
	int i = 1;  // Fehler!, wird aber nie erreicht, BitBlt klappt also 
  EndPaint( hWnd, &amp;ps );
</code></pre>
<p>Ich will also erst alles in eine Bitmap blitten, und die dann mit einem mal ins Fenster zeichnen, dass das nciht so flimmert. Aber, das problem ist, dass das, was ich zeichne, nicht angezeigt wird, also, man sieht nichts im Fenster. Woran kann das liegen?</p>
<p>Gruß, MAxi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/601776</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/601776</guid><dc:creator><![CDATA[Maxi]]></dc:creator><pubDate>Tue, 07 Sep 2004 15:54:49 GMT</pubDate></item><item><title><![CDATA[Reply to BitBlt und gegen flimmern on Wed, 08 Sep 2004 07:57:37 GMT]]></title><description><![CDATA[<p>Kann daran liegen, dass bei deinem GetDC Aufruf, das Fenster noch nicht erstellt wurde, und der DC ungültig ist, versuchs mal so in WM_PAINT:</p>
<pre><code class="language-cpp">hdc = BeginPaint (hWnd, &amp;ps);   
HDC g_RenderDC = CreateCompatibleDC(hdc);
HBITMAP g_RenderScreen = CreateCompatibleBitmap(dc, 800, 600);
TextOut(g_RenderDC, 100, 100, &quot;Dies ist ein Text&quot;, 10);
if(!BitBlt(hdc, 0, 0, 800, 600, g_RenderDC, 0, 0, SRCCOPY))
    int i = 1;  // Fehler!, wird aber nie erreicht, BitBlt klappt also 
DeleteDC(g_RenderDC);
EndPaint( hWnd, &amp;ps );
</code></pre>
<p>Gruß,<br />
Kevin</p>
]]></description><link>https://www.c-plusplus.net/forum/post/602177</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/602177</guid><dc:creator><![CDATA[Surkevin]]></dc:creator><pubDate>Wed, 08 Sep 2004 07:57:37 GMT</pubDate></item><item><title><![CDATA[Reply to BitBlt und gegen flimmern on Wed, 08 Sep 2004 08:21:24 GMT]]></title><description><![CDATA[<p>Du musst die Variablen g_RenderDC (und auch die anderen) static oder zur Not auch global machen, damit du später noch auf ihren Inhalt zugreifen kannst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/602197</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/602197</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Wed, 08 Sep 2004 08:21:24 GMT</pubDate></item></channel></rss>