<?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[Toolbars: Man sieht nix]]></title><description><![CDATA[<p>Hallo ich habe grade versucht, eine Toolbar zu erstellen. Die Toolbar ist nicht ziemlich groß, enthällt bisher nur ein Probeelement. Vielleicht kann ja einer mal rübergucken und mir sagen was ich falsch mache. Ich habe den Code aus MSDN und Tutorials aus dem Internet zusammengebastelt und habe keine Ahnung was ich da überhaupt mache. Vielleicht liegt es ja an der Reihenfolge....</p>
<pre><code class="language-cpp">void CreateToolbar (void)
{
	TBADDBITMAP bmp;
	memset (&amp;bmp, 0, sizeof (TBADDBITMAP));

	bmp.hInst = HINST_COMMCTRL;
    bmp.nID   = IDB_STD_LARGE_COLOR;

	static TBBUTTON buttons[]=
	{
        { STD_FILENEW, IDM_FILE_NEW,TBSTATE_ENABLED,TBSTYLE_BUTTON  , 0, 0},

	};

	hTool = CreateWindowEx (NULL,
							TOOLBARCLASSNAME,
							NULL,
							WS_CHILD | TBSTYLE_TOOLTIPS | CCS_ADJUSTABLE,
							0,0,
							0,0,
							hWindow,
							(HMENU) 2,
							hGlobInstance,
							NULL);

	if (!hTool)
	{
		MessageBox (hWindow, &quot;Toolbar Error&quot;, 
			        &quot;Error regarding to building the toolbar&quot;, MB_OK | MB_ICONINFORMATION);
		PostQuitMessage (-1);
	}

	SendMessage( hTool, TB_BUTTONSTRUCTSIZE,(WPARAM) sizeof (TBBUTTON), (LPARAM) 0);

	/* Send the TB_BUTTONSTRUCTSIZE message, which is required for backward compatibility. */ 
    SendMessage((HWND) hTool, TB_BUTTONSTRUCTSIZE, (WPARAM) sizeof(TBBUTTON), (LPARAM) 0); 

	/*Add Button to toolbar*/
	SendMessage( hTool, TB_ADDBUTTONS, sizeof(buttons)/sizeof(TBBUTTON), (LPARAM)&amp;buttons );

}
</code></pre>
<p>Gruß Sebastian</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/64416/toolbars-man-sieht-nix</link><generator>RSS for Node</generator><lastBuildDate>Tue, 07 Apr 2026 11:42:27 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/64416.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 10 Feb 2004 16:56:22 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Toolbars: Man sieht nix on Tue, 10 Feb 2004 16:56:22 GMT]]></title><description><![CDATA[<p>Hallo ich habe grade versucht, eine Toolbar zu erstellen. Die Toolbar ist nicht ziemlich groß, enthällt bisher nur ein Probeelement. Vielleicht kann ja einer mal rübergucken und mir sagen was ich falsch mache. Ich habe den Code aus MSDN und Tutorials aus dem Internet zusammengebastelt und habe keine Ahnung was ich da überhaupt mache. Vielleicht liegt es ja an der Reihenfolge....</p>
<pre><code class="language-cpp">void CreateToolbar (void)
{
	TBADDBITMAP bmp;
	memset (&amp;bmp, 0, sizeof (TBADDBITMAP));

	bmp.hInst = HINST_COMMCTRL;
    bmp.nID   = IDB_STD_LARGE_COLOR;

	static TBBUTTON buttons[]=
	{
        { STD_FILENEW, IDM_FILE_NEW,TBSTATE_ENABLED,TBSTYLE_BUTTON  , 0, 0},

	};

	hTool = CreateWindowEx (NULL,
							TOOLBARCLASSNAME,
							NULL,
							WS_CHILD | TBSTYLE_TOOLTIPS | CCS_ADJUSTABLE,
							0,0,
							0,0,
							hWindow,
							(HMENU) 2,
							hGlobInstance,
							NULL);

	if (!hTool)
	{
		MessageBox (hWindow, &quot;Toolbar Error&quot;, 
			        &quot;Error regarding to building the toolbar&quot;, MB_OK | MB_ICONINFORMATION);
		PostQuitMessage (-1);
	}

	SendMessage( hTool, TB_BUTTONSTRUCTSIZE,(WPARAM) sizeof (TBBUTTON), (LPARAM) 0);

	/* Send the TB_BUTTONSTRUCTSIZE message, which is required for backward compatibility. */ 
    SendMessage((HWND) hTool, TB_BUTTONSTRUCTSIZE, (WPARAM) sizeof(TBBUTTON), (LPARAM) 0); 

	/*Add Button to toolbar*/
	SendMessage( hTool, TB_ADDBUTTONS, sizeof(buttons)/sizeof(TBBUTTON), (LPARAM)&amp;buttons );

}
</code></pre>
<p>Gruß Sebastian</p>
]]></description><link>https://www.c-plusplus.net/forum/post/456297</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/456297</guid><dc:creator><![CDATA[Parapiler]]></dc:creator><pubDate>Tue, 10 Feb 2004 16:56:22 GMT</pubDate></item><item><title><![CDATA[Reply to Toolbars: Man sieht nix on Tue, 10 Feb 2004 19:01:48 GMT]]></title><description><![CDATA[<p>Hast Du InitCommonControls[Ex] vorher aufgerufen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/456407</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/456407</guid><dc:creator><![CDATA[Hepi]]></dc:creator><pubDate>Tue, 10 Feb 2004 19:01:48 GMT</pubDate></item><item><title><![CDATA[Reply to Toolbars: Man sieht nix on Thu, 12 Feb 2004 10:28:21 GMT]]></title><description><![CDATA[<p>ja habe ich gemacht allerdings habe ich das Problem schon gelöst. Aber kann mir vielleicht einer sagen, was ich beachten muss, wenn ich eigene buttons noch hinzufügen will?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/457573</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/457573</guid><dc:creator><![CDATA[Parapiler_unregistriert]]></dc:creator><pubDate>Thu, 12 Feb 2004 10:28:21 GMT</pubDate></item></channel></rss>