<?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[exakte Größe meines Fensters]]></title><description><![CDATA[<p>Hallo.</p>
<p>Ich habe mittels MFC eine SDI-Anwendung erstellt, und möchte darin ein BMP-Bild (768*1024) laden.</p>
<p>Wenn ich allerdings die Fenstergröße wie folgt festlege:</p>
<pre><code class="language-cpp">BOOL CMainFrame::PreCreateWindow(CREATESTRUCT&amp; cs)
{
	cs.cx = 1024;
	cs.cy = 768;
	cs.style = WS_OVERLAPPED | WS_SYSMENU | WS_BORDER;
	cs.dwExStyle = WS_EX_RIGHTSCROLLBAR;
	if( !CFrameWnd::PreCreateWindow(cs) )
		return FALSE;
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs

	return TRUE;
}
</code></pre>
<p>dann ist nicht genug Platz für das Bild, da es ja auch noch Menüleiste und Toolbar gibt, die von <a href="http://cs.cx" rel="nofollow">cs.cx</a> und <a href="http://cs.cy" rel="nofollow">cs.cy</a> abgezogen werden.</p>
<p>Wie bekomme ich nun heraus, wie 'groß' ich die beiden Parameter <a href="http://cs.cx" rel="nofollow">cs.cx</a> und <a href="http://cs.cy" rel="nofollow">cs.cy</a> wählen muss, damit das gesamte Bild zu sehen ist?</p>
<p>DANKE.<br />
H.W.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/171043/exakte-größe-meines-fensters</link><generator>RSS for Node</generator><lastBuildDate>Mon, 27 Apr 2026 15:21:16 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/171043.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 22 Jan 2007 07:46:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to exakte Größe meines Fensters on Mon, 22 Jan 2007 07:46:11 GMT]]></title><description><![CDATA[<p>Hallo.</p>
<p>Ich habe mittels MFC eine SDI-Anwendung erstellt, und möchte darin ein BMP-Bild (768*1024) laden.</p>
<p>Wenn ich allerdings die Fenstergröße wie folgt festlege:</p>
<pre><code class="language-cpp">BOOL CMainFrame::PreCreateWindow(CREATESTRUCT&amp; cs)
{
	cs.cx = 1024;
	cs.cy = 768;
	cs.style = WS_OVERLAPPED | WS_SYSMENU | WS_BORDER;
	cs.dwExStyle = WS_EX_RIGHTSCROLLBAR;
	if( !CFrameWnd::PreCreateWindow(cs) )
		return FALSE;
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs

	return TRUE;
}
</code></pre>
<p>dann ist nicht genug Platz für das Bild, da es ja auch noch Menüleiste und Toolbar gibt, die von <a href="http://cs.cx" rel="nofollow">cs.cx</a> und <a href="http://cs.cy" rel="nofollow">cs.cy</a> abgezogen werden.</p>
<p>Wie bekomme ich nun heraus, wie 'groß' ich die beiden Parameter <a href="http://cs.cx" rel="nofollow">cs.cx</a> und <a href="http://cs.cy" rel="nofollow">cs.cy</a> wählen muss, damit das gesamte Bild zu sehen ist?</p>
<p>DANKE.<br />
H.W.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1214200</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1214200</guid><dc:creator><![CDATA[Hans Wurst]]></dc:creator><pubDate>Mon, 22 Jan 2007 07:46:11 GMT</pubDate></item><item><title><![CDATA[Reply to exakte Größe meines Fensters on Mon, 22 Jan 2007 07:51:48 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">CRect r;
SystemParametersInfo(SPI_GETWORKAREA, 0, &amp;r, 0);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1214206</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1214206</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Mon, 22 Jan 2007 07:51:48 GMT</pubDate></item><item><title><![CDATA[Reply to exakte Größe meines Fensters on Mon, 22 Jan 2007 08:11:55 GMT]]></title><description><![CDATA[<p>Martin Richter schrieb:</p>
<blockquote>
<pre><code class="language-cpp">CRect r;
SystemParametersInfo(SPI_GETWORKAREA, 0, &amp;r, 0);
</code></pre>
</blockquote>
<p>DANKE für die antwort, aber das scheint ja nur die parameter für meinen bildschirm wiederzugeben? Ich brauche doch aber die Parameter nur für das Mainwindow der SDI-Anwendung.</p>
<p>DANKE.<br />
H.W.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1214210</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1214210</guid><dc:creator><![CDATA[Hans Wurst]]></dc:creator><pubDate>Mon, 22 Jan 2007 08:11:55 GMT</pubDate></item><item><title><![CDATA[Reply to exakte Größe meines Fensters on Mon, 22 Jan 2007 08:15:55 GMT]]></title><description><![CDATA[<p>Schau dir mal GetSystemMetrics an. <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>
]]></description><link>https://www.c-plusplus.net/forum/post/1214214</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1214214</guid><dc:creator><![CDATA[estartu]]></dc:creator><pubDate>Mon, 22 Jan 2007 08:15:55 GMT</pubDate></item><item><title><![CDATA[Reply to exakte Größe meines Fensters on Mon, 22 Jan 2007 08:20:38 GMT]]></title><description><![CDATA[<p>[quote=&quot;Hans WurstDANKE für die antwort, aber das scheint ja nur die parameter für meinen bildschirm wiederzugeben? Ich brauche doch aber die Parameter nur für das Mainwindow der SDI-Anwendung.[/quote]</p>
<p>Eben verstehe ich es:<br />
Schau Dir mal AdjustWindowRectEx an. Dort übergibst Du die Größe der Cleint-Area in einem CRect und den Fensterstil und ein Flag ob ein Menu vorhanden ist und bekommst dann die benötigte Größe.</p>
<p>Intern wurde CalcWindowRect für die MFC eingebaut. Die kannst Du direkt verwenden <strong>wenn</strong> das Fenster schon existiert!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1214216</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1214216</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Mon, 22 Jan 2007 08:20:38 GMT</pubDate></item></channel></rss>