<?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 als button]]></title><description><![CDATA[<p>guten abend alle,</p>
<p>ich habe ein kleines problem, und ich komme nicht weiter.... (die suchfunktion funktioniert bei mir nicht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>ich will gerne statt normalen button z.b. ein auto nehmen.<br />
das auto ist als bitmap abgespeicher.</p>
<p>mein problem.... ich habe no ahnung wie es geht :|</p>
<p>das bsp. aus fqs hilft mir nicht weiter weil dar wird normaler button grafisch dargestellt und nicht eins aus bitmap geladen.</p>
<p>big thx für eure antworten im vorraus.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/120088/bitmap-als-button</link><generator>RSS for Node</generator><lastBuildDate>Sun, 05 Jul 2026 11:00:27 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/120088.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 08 Sep 2005 17:46:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to bitmap als button on Thu, 08 Sep 2005 17:46:11 GMT]]></title><description><![CDATA[<p>guten abend alle,</p>
<p>ich habe ein kleines problem, und ich komme nicht weiter.... (die suchfunktion funktioniert bei mir nicht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>ich will gerne statt normalen button z.b. ein auto nehmen.<br />
das auto ist als bitmap abgespeicher.</p>
<p>mein problem.... ich habe no ahnung wie es geht :|</p>
<p>das bsp. aus fqs hilft mir nicht weiter weil dar wird normaler button grafisch dargestellt und nicht eins aus bitmap geladen.</p>
<p>big thx für eure antworten im vorraus.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/868104</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/868104</guid><dc:creator><![CDATA[keine idee]]></dc:creator><pubDate>Thu, 08 Sep 2005 17:46:11 GMT</pubDate></item><item><title><![CDATA[Reply to bitmap als button on Thu, 08 Sep 2005 18:11:56 GMT]]></title><description><![CDATA[<p>BS_BITMAP, BM_SETIMAGE</p>
]]></description><link>https://www.c-plusplus.net/forum/post/868115</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/868115</guid><dc:creator><![CDATA[stichwörter]]></dc:creator><pubDate>Thu, 08 Sep 2005 18:11:56 GMT</pubDate></item><item><title><![CDATA[Reply to bitmap als button on Thu, 08 Sep 2005 18:16:53 GMT]]></title><description><![CDATA[<p>genau darum gings mir nicht....</p>
<p>ich will kein bild auf button zeichnen, sonder ganz neue button-form erstellen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/868123</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/868123</guid><dc:creator><![CDATA[keine idee]]></dc:creator><pubDate>Thu, 08 Sep 2005 18:16:53 GMT</pubDate></item><item><title><![CDATA[Reply to bitmap als button on Thu, 08 Sep 2005 18:50:27 GMT]]></title><description><![CDATA[<p><a href="http://www.flipcode.com/articles/article_win32skins.shtml" rel="nofollow">http://www.flipcode.com/articles/article_win32skins.shtml</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/868147</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/868147</guid><dc:creator><![CDATA[eine idee]]></dc:creator><pubDate>Thu, 08 Sep 2005 18:50:27 GMT</pubDate></item><item><title><![CDATA[Reply to bitmap als button on Thu, 08 Sep 2005 18:55:18 GMT]]></title><description><![CDATA[<p>eine idee schrieb:</p>
<blockquote>
<p><a href="http://www.flipcode.com/articles/article_win32skins.shtml" rel="nofollow">http://www.flipcode.com/articles/article_win32skins.shtml</a></p>
</blockquote>
<p>mein freund, ich glaube das regions nicht das richtige ist was ich suche...</p>
<p>Petzold hat so was änliches auf s. 360 gecodet, aber halt ohne bitmaps sondern selbst gezeichnet die buttons.</p>
<p>und ich will die buttons-form selbst bestimmen und einen bitmap drauf legen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/868152</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/868152</guid><dc:creator><![CDATA[keine idee]]></dc:creator><pubDate>Thu, 08 Sep 2005 18:55:18 GMT</pubDate></item><item><title><![CDATA[Reply to bitmap als button on Thu, 08 Sep 2005 19:32:01 GMT]]></title><description><![CDATA[<p>BS_OWNERDRAW</p>
]]></description><link>https://www.c-plusplus.net/forum/post/868195</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/868195</guid><dc:creator><![CDATA[ownerdraw]]></dc:creator><pubDate>Thu, 08 Sep 2005 19:32:01 GMT</pubDate></item><item><title><![CDATA[Reply to bitmap als button on Thu, 08 Sep 2005 19:34:02 GMT]]></title><description><![CDATA[<p>ownerdraw schrieb:</p>
<blockquote>
<p>BS_OWNERDRAW</p>
</blockquote>
<p>so weit bin ich auch bereits <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>
<p>aber wie gehts weiter?</p>
<p>plz um links auf gute seiten</p>
<p>thx</p>
]]></description><link>https://www.c-plusplus.net/forum/post/868198</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/868198</guid><dc:creator><![CDATA[keine idee]]></dc:creator><pubDate>Thu, 08 Sep 2005 19:34:02 GMT</pubDate></item><item><title><![CDATA[Reply to bitmap als button on Thu, 08 Sep 2005 19:49:03 GMT]]></title><description><![CDATA[<p>Also wenn du kein rechteckiges Fenster haben möchtest brauchst du Regions!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/868210</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/868210</guid><dc:creator><![CDATA[region]]></dc:creator><pubDate>Thu, 08 Sep 2005 19:49:03 GMT</pubDate></item><item><title><![CDATA[Reply to bitmap als button on Thu, 08 Sep 2005 20:50:40 GMT]]></title><description><![CDATA[<p>@keine idee: wo genau liegt denn dein problem? hab grad kein link zu nem kompletten tutorial, aber an sich sollte es auch nicht so schwer sein.<br />
du verpasst deinem button den stil BS_OWNERDRAW, und sobald du in der callback die nachricht <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/comboboxes/comboboxreference/comboboxmessages/wm_drawitem.asp" rel="nofollow">WM_DRAWITEM</a> bekommst, malst du deinen button.</p>
<p>die msdn ist die beste hilfe die du kriegen kannst.<br />
gehts dir überhaupt darum, dass die buttons eine andere form als ein rechteck annehmen sollen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/868261</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/868261</guid><dc:creator><![CDATA[ownerdraw]]></dc:creator><pubDate>Thu, 08 Sep 2005 20:50:40 GMT</pubDate></item><item><title><![CDATA[Reply to bitmap als button on Tue, 13 Sep 2005 07:53:13 GMT]]></title><description><![CDATA[<p>so kann das aussehen:</p>
<pre><code class="language-cpp">#define ID_UNSER_BUTTON 1

BOOL ButtonZeichnen (LPDRAWITEMSTRUCT, HBITMAP, HBITMAP, HBITMAP, int, int, int, int) ;

//in der WndProc
LPDRAWITEMSTRUCT lpItem ;
HINSTANCE	    hInstance ;
HBITMAP          hBitmapButtonAus,
                 hBitmapButtonAn,
                 hBitmapButtonFokus ;

case WM_CREATE :
    hInstance = ((LPCREATESTRUCT) lParam) -&gt; hInstance ;
    CreateWindowEx (NULL, &quot;button&quot;, 
		         &quot;&quot;, WS_CHILD | WS_VISIBLE | BS_OWNERDRAW, 
		         10, 10, 
		     	80, 25, 
			     hwnd, (HMENU) ID_UNSER_BUTTON, hInstance, NULL) ;
    // Die Bitmaps aus den Resourcen laden
    hBitmapButtonAus = LoadBitmap (hInstance, MAKEINTRESOURCE(IDB_BITMAP1)) ;
    hBitmapButtonAn = LoadBitmap (hInstance, MAKEINTRESOURCE(IDB_BITMAP2)) ;
    hBitmapButtonFokus = LoadBitmap (hInstance, MAKEINTRESOURCE(IDB_BITMAP3)) ;
return 0 ;

case WM_DRAWITEM :
	lpItem = (LPDRAWITEMSTRUCT) lParam ;
	switch (lpItem-&gt;CtlID){
		case ID_UNSER_BUTTON :
			ButtonZeichnen (lpItem, hBitmapButtonAus, hBitmapButtonAn, hBitmapButtonFokus, 0, 0, 0, 0) ;
			break ;
return 0 ;

case WM_DESTROY :
    DeleteObject (hBitmapButtonAus) ;
    DeleteObject (hBitmapButtonAn) ;
    DeleteObject (hBitmapButtonFokus) ;
    PostQuitMessage (0) ;
return 0 ;
// Ende WinProc

/* Unsere Funktion die Buttons zeichnen
lpItemS - muss übergeben werden
hBitmapAus - Bitmap wenn Button aus ist, muss übergeben werden
hBitmapAn - Bitmap wenn Button gedrückt ist, kann NULL sein, wird dann aber hBitmapAus verwendet
hBitmapFokus - Bitmap wenn Button den Fokus hat, kann NULL sein, wird dann aber hBitmapAus verwendet
xPos - x-Koordinaten, Statndartwert 0
yPos - y-Koordinaten, Statndartwert 0
iBreite - Breite des Controls, kann 0 sein, wird dann aus dem lpItemS ausgelesen
iHoche - Hoche des Controls, kann 0 sein, wird dann aus dem lpItemS ausgelesen
*/
BOOL ButtonZeichnen (LPDRAWITEMSTRUCT lpItemS, HBITMAP hBitmapAus, HBITMAP hBitmapAn, HBITMAP hBitmapFokus, int xPos, int yPos, int iBreite, int iHoche){
	HBRUSH    hbr,
			  hbrPrevious ;
	switch (lpItemS-&gt;itemAction){
		case ODA_DRAWENTIRE:
			if (!hBitmapAus){
				return FALSE ;
			}
			hbr = CreatePatternBrush (hBitmapAus) ;
			break ;
		case ODA_FOCUS :
			if (hBitmapFokus){
				hbr = CreatePatternBrush (hBitmapFokus) ;
			}
			else{
				hbr = CreatePatternBrush (hBitmapAus) ;
			}
			break ;
		case ODA_SELECT:
			if (lpItemS-&gt;itemState &amp; ODS_SELECTED){
				if (hBitmapAn){
					hbr = CreatePatternBrush (hBitmapAn) ;
				}
				else{
					hbr = CreatePatternBrush (hBitmapAus) ;
				}
			}
			else{
				hbr = CreatePatternBrush (hBitmapAus) ;
			}
			break ;
	}
	if ((hBitmapAus) || (hBitmapAn) || (hBitmapFokus)){
		if (iBreite == 0){
			iBreite = lpItemS-&gt;rcItem.right ;
		}
		if (iHoche == 0){
			iHoche = lpItemS-&gt;rcItem.bottom ;
		}
		hbrPrevious = (HBRUSH) SelectObject (lpItemS-&gt;hDC, hbr) ;
		PatBlt (lpItemS-&gt;hDC, xPos, yPos, iBreite, iHoche, PATCOPY) ;
		SelectObject (lpItemS-&gt;hDC, hbrPrevious) ;
		DeleteObject (hbr) ;
		return TRUE ;
	}
	return FALSE ;
}
</code></pre>
<p>ich glaube das ist alles...<br />
kann in die FAQs</p>
]]></description><link>https://www.c-plusplus.net/forum/post/870808</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/870808</guid><dc:creator><![CDATA[toom]]></dc:creator><pubDate>Tue, 13 Sep 2005 07:53:13 GMT</pubDate></item></channel></rss>