<?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[Standard Button wird nicht angezeigt]]></title><description><![CDATA[<p>Hoi,</p>
<p>Hab ein Problem mit dem Anzeigen eines Buttons als Child-Window. Das Hauptfenster erscheint zwar, aber der Button wird scheinbar nicht erstellt.</p>
<pre><code>[...]

ATOM MyRegisterClass(HINSTANCE hInstance)
{
	WNDCLASSEX wcex;

	wcex.cbSize = sizeof(WNDCLASSEX); 

	wcex.style			= CS_HREDRAW | CS_VREDRAW;//CS_OWNDC
	wcex.lpfnWndProc	= (WNDPROC)WndProc;
	wcex.cbClsExtra		= 0;
	wcex.cbWndExtra		= 0;
	wcex.hInstance		= hInstance;
	wcex.hIcon			= LoadIcon(hInstance, (LPCTSTR)IDI_TEST4);
	wcex.hCursor		= LoadCursor(NULL, IDC_ARROW);
	wcex.hbrBackground	= (HBRUSH)(COLOR_WINDOW+1);
	wcex.lpszMenuName	= (LPCSTR)IDC_TEST4;
	wcex.lpszClassName	= szWindowClass;
	wcex.hIconSm		= LoadIcon(wcex.hInstance, (LPCTSTR)IDI_SMALL);

	return RegisterClassEx(&amp;wcex);
}

BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
   hInst = hInstance; // Store instance handle in our global variable

   hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
      CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);

	if (!hWnd)
	{
		return FALSE;
	}

	ShowWindow(hWnd, nCmdShow);
   UpdateWindow(hWnd);

   return TRUE;
}

LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
	int wmId, wmEvent;
	TCHAR szHello[MAX_LOADSTRING];
	LoadString(hInst, IDS_HELLO, szHello, MAX_LOADSTRING);
	HWND hButton;

	switch (message) 
	{
		case WM_CREATE:
			{
			hButton = CreateWindow(  &quot;button&quot;,
									&quot;Knopf&quot;,
									WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
									0, 0, 0, 0,
									hWnd,
									NULL,
									((LPCREATESTRUCT) lParam) -&gt; hInstance,
									NULL);
			return 0 ;
			}

[...]
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/123637/standard-button-wird-nicht-angezeigt</link><generator>RSS for Node</generator><lastBuildDate>Mon, 06 Jul 2026 23:55:37 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/123637.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 18 Oct 2005 16:31:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Standard Button wird nicht angezeigt on Tue, 18 Oct 2005 16:31:54 GMT]]></title><description><![CDATA[<p>Hoi,</p>
<p>Hab ein Problem mit dem Anzeigen eines Buttons als Child-Window. Das Hauptfenster erscheint zwar, aber der Button wird scheinbar nicht erstellt.</p>
<pre><code>[...]

ATOM MyRegisterClass(HINSTANCE hInstance)
{
	WNDCLASSEX wcex;

	wcex.cbSize = sizeof(WNDCLASSEX); 

	wcex.style			= CS_HREDRAW | CS_VREDRAW;//CS_OWNDC
	wcex.lpfnWndProc	= (WNDPROC)WndProc;
	wcex.cbClsExtra		= 0;
	wcex.cbWndExtra		= 0;
	wcex.hInstance		= hInstance;
	wcex.hIcon			= LoadIcon(hInstance, (LPCTSTR)IDI_TEST4);
	wcex.hCursor		= LoadCursor(NULL, IDC_ARROW);
	wcex.hbrBackground	= (HBRUSH)(COLOR_WINDOW+1);
	wcex.lpszMenuName	= (LPCSTR)IDC_TEST4;
	wcex.lpszClassName	= szWindowClass;
	wcex.hIconSm		= LoadIcon(wcex.hInstance, (LPCTSTR)IDI_SMALL);

	return RegisterClassEx(&amp;wcex);
}

BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
   hInst = hInstance; // Store instance handle in our global variable

   hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
      CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);

	if (!hWnd)
	{
		return FALSE;
	}

	ShowWindow(hWnd, nCmdShow);
   UpdateWindow(hWnd);

   return TRUE;
}

LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
	int wmId, wmEvent;
	TCHAR szHello[MAX_LOADSTRING];
	LoadString(hInst, IDS_HELLO, szHello, MAX_LOADSTRING);
	HWND hButton;

	switch (message) 
	{
		case WM_CREATE:
			{
			hButton = CreateWindow(  &quot;button&quot;,
									&quot;Knopf&quot;,
									WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
									0, 0, 0, 0,
									hWnd,
									NULL,
									((LPCREATESTRUCT) lParam) -&gt; hInstance,
									NULL);
			return 0 ;
			}

[...]
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/895320</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/895320</guid><dc:creator><![CDATA[Kone]]></dc:creator><pubDate>Tue, 18 Oct 2005 16:31:54 GMT</pubDate></item><item><title><![CDATA[Reply to Standard Button wird nicht angezeigt on Tue, 18 Oct 2005 16:50:38 GMT]]></title><description><![CDATA[<p>Wie soll man den Button denn sehen? Die Größe des Buttons ist ja 0 x 0. Kein Wunder wenn man ihn nicht sieht. Einfach die Werte für die Größe mal auf ein paar andere Werte setzen:</p>
<pre><code class="language-cpp">CreateWindow(  &quot;button&quot;,
               &quot;Knopf&quot;,
               WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
               0, 0, 100, 100, // &lt;--- Werte für die Größe geändert
               hWnd,
               NULL,
               ((LPCREATESTRUCT) lParam) -&gt; hInstance,
               NULL);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/895340</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/895340</guid><dc:creator><![CDATA[freaked]]></dc:creator><pubDate>Tue, 18 Oct 2005 16:50:38 GMT</pubDate></item><item><title><![CDATA[Reply to Standard Button wird nicht angezeigt on Tue, 18 Oct 2005 17:23:54 GMT]]></title><description><![CDATA[<p>Hups, das war jetzt zu billig <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /><br />
Da hatte ich wohl n Brett vorm Kopf, danke jedenfalls <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/895367</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/895367</guid><dc:creator><![CDATA[Kone]]></dc:creator><pubDate>Tue, 18 Oct 2005 17:23:54 GMT</pubDate></item></channel></rss>