<?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[Button mit Bitmap ???]]></title><description><![CDATA[<p>Kann mir jemand sagen wie ich am die Funktion SetBitmap einsetze?<br />
Außerdem will ich abfragen können ob schon ein Bitmap vorhanden ist, und es dann wieder auf Leer (also kein bitmap) setzen.</p>
<p>Derzeit sieht das so aus:</p>
<pre><code class="language-cpp">void CTest::SetButtonColor(CButton* InBut)
{
HBITMAP bitmap;

if(InBut-&gt;GetBitmap()!= ::LoadBitmap(::AfxGetInstanceHandle(), MAKEINTRESOURCE(IDB_GRUEN)))
  bitmap = ::LoadBitmap(::AfxGetInstanceHandle(), MAKEINTRESOURCE(IDB_GRUEN)); 
else
  bitmap = ::LoadBitmap(::AfxGetInstanceHandle(), MAKEINTRESOURCE(NULL)); 

InBut-&gt;SetBitmap(bitmap);
UpdateData(FALSE);
}
</code></pre>
<p>So funktioniert aber meine IF abfrage nicht. Warum? Und was gibt mir GetBitmap() zurück?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/61977/button-mit-bitmap</link><generator>RSS for Node</generator><lastBuildDate>Wed, 03 Jun 2026 20:37:22 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/61977.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 19 Jan 2004 10:13:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Button mit Bitmap ??? on Mon, 19 Jan 2004 10:13:37 GMT]]></title><description><![CDATA[<p>Kann mir jemand sagen wie ich am die Funktion SetBitmap einsetze?<br />
Außerdem will ich abfragen können ob schon ein Bitmap vorhanden ist, und es dann wieder auf Leer (also kein bitmap) setzen.</p>
<p>Derzeit sieht das so aus:</p>
<pre><code class="language-cpp">void CTest::SetButtonColor(CButton* InBut)
{
HBITMAP bitmap;

if(InBut-&gt;GetBitmap()!= ::LoadBitmap(::AfxGetInstanceHandle(), MAKEINTRESOURCE(IDB_GRUEN)))
  bitmap = ::LoadBitmap(::AfxGetInstanceHandle(), MAKEINTRESOURCE(IDB_GRUEN)); 
else
  bitmap = ::LoadBitmap(::AfxGetInstanceHandle(), MAKEINTRESOURCE(NULL)); 

InBut-&gt;SetBitmap(bitmap);
UpdateData(FALSE);
}
</code></pre>
<p>So funktioniert aber meine IF abfrage nicht. Warum? Und was gibt mir GetBitmap() zurück?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/439642</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/439642</guid><dc:creator><![CDATA[haedfinger]]></dc:creator><pubDate>Mon, 19 Jan 2004 10:13:37 GMT</pubDate></item><item><title><![CDATA[Reply to Button mit Bitmap ??? on Mon, 19 Jan 2004 11:06:31 GMT]]></title><description><![CDATA[<p>Toll. Jetzt überleg ich schon das ganze WE wie ich das am besten mache und jetzt find ich selbst die Lösung.<br />
Nur die abfrage ist falsch.</p>
<p>Richtig:</p>
<pre><code class="language-cpp">if(!InBut-&gt;GetBitmap())
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/439669</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/439669</guid><dc:creator><![CDATA[haedfinger]]></dc:creator><pubDate>Mon, 19 Jan 2004 11:06:31 GMT</pubDate></item></channel></rss>