<?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[Fensterhöhe + Statusbar = Statusbar verschoben ?!]]></title><description><![CDATA[<p>Hallo Leute.</p>
<p>Ich habe ein Dialog (diesmal hWnd), in den eine Statusbar integriert wird.<br />
Allerdings wird der Dialog aus der Resource geladen und ich möchte, dass die Fensterhöhe + die Statusbarhöhe addiert wird, damit der Dialog noch ganz sichtbar ist.</p>
<pre><code class="language-cpp">HWND hStatusBar;
	RECT rect;
	int nHeight;

	hStatusBar = CreateWindowEx(0, STATUSCLASSNAME, TEXT(&quot;&quot;), WS_CHILD | WS_VISIBLE, 
		0, 0, 0, 0, hWnd, 0,
		hInstance, NULL);

	// Statusbar-hoehe ermitteln
	GetWindowRect(hStatusBar, &amp;rect);
	nHeight = rect.bottom - rect.top;

	// Fenster größer machen
	GetWindowRect(hWnd, &amp;rect);
	MoveWindow(hWnd, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top + nHeight, FALSE);

	// Statusbar verschieben
	// Geht nicht!!!
	GetWindowRect(hStatusBar, &amp;rect);
	MoveWindow(hStatusBar, rect.left, rect.top + nHeight, rect.right - rect.left, rect.bottom - rect.top, TRUE);
	// !!!
</code></pre>
<p>Das Problem daran ist nur, dass die Statusbar nicht am unteren Rand des Fensters ist, sondern auf der vorherigen Position bleibt. Die Statusbar soll doch immer am unteren Fensterrand sein...</p>
<p>Danke.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/216784/fensterhöhe-statusbar-statusbar-verschoben</link><generator>RSS for Node</generator><lastBuildDate>Tue, 21 Apr 2026 08:45:35 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/216784.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 28 Jun 2008 12:45:23 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Fensterhöhe + Statusbar = Statusbar verschoben ?! on Sat, 28 Jun 2008 12:45:23 GMT]]></title><description><![CDATA[<p>Hallo Leute.</p>
<p>Ich habe ein Dialog (diesmal hWnd), in den eine Statusbar integriert wird.<br />
Allerdings wird der Dialog aus der Resource geladen und ich möchte, dass die Fensterhöhe + die Statusbarhöhe addiert wird, damit der Dialog noch ganz sichtbar ist.</p>
<pre><code class="language-cpp">HWND hStatusBar;
	RECT rect;
	int nHeight;

	hStatusBar = CreateWindowEx(0, STATUSCLASSNAME, TEXT(&quot;&quot;), WS_CHILD | WS_VISIBLE, 
		0, 0, 0, 0, hWnd, 0,
		hInstance, NULL);

	// Statusbar-hoehe ermitteln
	GetWindowRect(hStatusBar, &amp;rect);
	nHeight = rect.bottom - rect.top;

	// Fenster größer machen
	GetWindowRect(hWnd, &amp;rect);
	MoveWindow(hWnd, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top + nHeight, FALSE);

	// Statusbar verschieben
	// Geht nicht!!!
	GetWindowRect(hStatusBar, &amp;rect);
	MoveWindow(hStatusBar, rect.left, rect.top + nHeight, rect.right - rect.left, rect.bottom - rect.top, TRUE);
	// !!!
</code></pre>
<p>Das Problem daran ist nur, dass die Statusbar nicht am unteren Rand des Fensters ist, sondern auf der vorherigen Position bleibt. Die Statusbar soll doch immer am unteren Fensterrand sein...</p>
<p>Danke.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1537441</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1537441</guid><dc:creator><![CDATA[StatusBar-Verschieber]]></dc:creator><pubDate>Sat, 28 Jun 2008 12:45:23 GMT</pubDate></item><item><title><![CDATA[Reply to Fensterhöhe + Statusbar = Statusbar verschoben ?! on Sat, 28 Jun 2008 12:54:57 GMT]]></title><description><![CDATA[<p>Um die Statusbar in die richtige position zu rücken, kann man ein Move Window (hwnd, 0, 0, 0, 0, FALSE ) machen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1537447</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1537447</guid><dc:creator><![CDATA[Lösung]]></dc:creator><pubDate>Sat, 28 Jun 2008 12:54:57 GMT</pubDate></item></channel></rss>