<?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]]></title><description><![CDATA[<p>ich habe noch ein problem, folgender codeausschnitt:</p>
<p>static HANDLE hBitmap</p>
<p>hBitmap = (HBITMAP)LoadImage(NULL,&quot;test.bmp&quot;,IMAGE_BITMAP,0,0,LR_LOADFROMFILE);</p>
<p>switch(message)<br />
{<br />
case WM_PAINT:<br />
{<br />
PAINTSTRUCT ps;<br />
HDC hDC;</p>
<p>hDC = BeginPaint(hWnd, &amp;ps);<br />
{</p>
<p>HDC BhDC = CreateCompatibleDC(hDC);<br />
SelectObject(BhDC,hBitmap);<br />
BitBlt(hDC,0,0,640,480,BhDC,0,0,SRCCOPY);<br />
}<br />
EndPaint(hWnd, &amp;ps);<br />
return 0;<br />
}</p>
<p>immer wenn ich das fenster minimiere und wieder herstelle ist die bitmap weg, was mache ich falsch?? das gleiche passiert auch wenn irgendein fenster die bitmap verdeckt und wieder freigiebt???</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/94878/bitmap</link><generator>RSS for Node</generator><lastBuildDate>Sun, 26 Apr 2026 08:40:04 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/94878.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 13 Dec 2004 19:24:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Bitmap on Mon, 13 Dec 2004 19:24:43 GMT]]></title><description><![CDATA[<p>ich habe noch ein problem, folgender codeausschnitt:</p>
<p>static HANDLE hBitmap</p>
<p>hBitmap = (HBITMAP)LoadImage(NULL,&quot;test.bmp&quot;,IMAGE_BITMAP,0,0,LR_LOADFROMFILE);</p>
<p>switch(message)<br />
{<br />
case WM_PAINT:<br />
{<br />
PAINTSTRUCT ps;<br />
HDC hDC;</p>
<p>hDC = BeginPaint(hWnd, &amp;ps);<br />
{</p>
<p>HDC BhDC = CreateCompatibleDC(hDC);<br />
SelectObject(BhDC,hBitmap);<br />
BitBlt(hDC,0,0,640,480,BhDC,0,0,SRCCOPY);<br />
}<br />
EndPaint(hWnd, &amp;ps);<br />
return 0;<br />
}</p>
<p>immer wenn ich das fenster minimiere und wieder herstelle ist die bitmap weg, was mache ich falsch?? das gleiche passiert auch wenn irgendein fenster die bitmap verdeckt und wieder freigiebt???</p>
]]></description><link>https://www.c-plusplus.net/forum/post/672637</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/672637</guid><dc:creator><![CDATA[Moh]]></dc:creator><pubDate>Mon, 13 Dec 2004 19:24:43 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmap on Mon, 13 Dec 2004 19:28:14 GMT]]></title><description><![CDATA[<p>Gieb das Objekt wieder frei!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/672640</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/672640</guid><dc:creator><![CDATA[Freigabe]]></dc:creator><pubDate>Mon, 13 Dec 2004 19:28:14 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmap on Mon, 13 Dec 2004 19:44:43 GMT]]></title><description><![CDATA[<p>Naja, das Object (Bitmap) braucht er ja noch.<br />
Aber es bleibt in BhDC &quot;gefangen&quot;, da es immer nur in einen Gerätekontext gleichzeitig gesetzt werden kann.<br />
Ein DeleteDC(BhDC); vor return 0; sollte das Problem beheben oder du machst BhDC auch static und initialisierst es schon in WM_CREATE.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/672650</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/672650</guid><dc:creator><![CDATA[D*niel *chumann]]></dc:creator><pubDate>Mon, 13 Dec 2004 19:44:43 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmap on Tue, 14 Dec 2004 14:03:12 GMT]]></title><description><![CDATA[<p>jo, thx</p>
]]></description><link>https://www.c-plusplus.net/forum/post/673032</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/673032</guid><dc:creator><![CDATA[Moh]]></dc:creator><pubDate>Tue, 14 Dec 2004 14:03:12 GMT</pubDate></item></channel></rss>