<?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[Probleme bei ermittlung der Fenstergröße]]></title><description><![CDATA[<p>Guten Morgen, ich möchte mit</p>
<pre><code class="language-cpp">CRect window;
AfxGetMainWnd()-&gt;GetWindowRect(&amp;window);
TRACE(&quot;Fenster = %i %i %i %i\n&quot;,window.left, window.right, window.top, window.bottom);
</code></pre>
<p>die größe meines Fensters bei einer SDI Anwendung ermitteln. Lieder bekomme ich immer unterschiedliche Werte und weis nicht warum. Kann mir jemand helfen ?</p>
<p>Vielen Dank</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/157365/probleme-bei-ermittlung-der-fenstergröße</link><generator>RSS for Node</generator><lastBuildDate>Sun, 26 Jul 2026 22:02:06 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/157365.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 25 Aug 2006 05:17:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Probleme bei ermittlung der Fenstergröße on Fri, 25 Aug 2006 05:17:49 GMT]]></title><description><![CDATA[<p>Guten Morgen, ich möchte mit</p>
<pre><code class="language-cpp">CRect window;
AfxGetMainWnd()-&gt;GetWindowRect(&amp;window);
TRACE(&quot;Fenster = %i %i %i %i\n&quot;,window.left, window.right, window.top, window.bottom);
</code></pre>
<p>die größe meines Fensters bei einer SDI Anwendung ermitteln. Lieder bekomme ich immer unterschiedliche Werte und weis nicht warum. Kann mir jemand helfen ?</p>
<p>Vielen Dank</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1124185</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1124185</guid><dc:creator><![CDATA[basti_1984]]></dc:creator><pubDate>Fri, 25 Aug 2006 05:17:49 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme bei ermittlung der Fenstergröße on Fri, 25 Aug 2006 05:27:16 GMT]]></title><description><![CDATA[<p>Schieb das Fenster doch mal auf dem Bildschirm rum und beobachte, was die Werte machen. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>Oder schau mal in die MSDN:</p>
<blockquote>
<pre><code class="language-cpp">void GetWindowRect( LPRECT lpRect ) const;
</code></pre>
<p><strong>Parameters</strong></p>
<p><em>lpRect</em></p>
<p>Points to a CRect object or a RECT structure that will receive the screen coordinates of the upper-left and lower-right corners.</p>
<p><strong>Remarks</strong></p>
<p>Copies the dimensions of the bounding rectangle of the CWnd object to the structure pointed to by lpRect. The dimensions are given in screen coordinates relative to the upper-left corner of the display screen. The dimensions of the caption, border, and scroll bars, if present, are included.</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1124188</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1124188</guid><dc:creator><![CDATA[estartu]]></dc:creator><pubDate>Fri, 25 Aug 2006 05:27:16 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme bei ermittlung der Fenstergröße on Fri, 25 Aug 2006 05:38:21 GMT]]></title><description><![CDATA[<p>Die Werte ändern sich.<br />
Wo ist eigentlich der Unterschied zwischen</p>
<pre><code class="language-cpp">GetWindowRect(&amp;window);
</code></pre>
<p>und</p>
<pre><code class="language-cpp">AfxGetMainWnd()-&gt;GetWindowRect(&amp;window);
</code></pre>
<p>beide liefern identische werte bis auf die top variable sind alle werte gleich.</p>
<p>ich hab</p>
<pre><code class="language-cpp">AfxGetMainWnd()-&gt;GetWindowRect(&amp;window);
</code></pre>
<p>in OninitUpdate reingetan ist das ein fehler gewesen ?</p>
<p>Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1124189</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1124189</guid><dc:creator><![CDATA[basti_1984]]></dc:creator><pubDate>Fri, 25 Aug 2006 05:38:21 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme bei ermittlung der Fenstergröße on Fri, 25 Aug 2006 06:17:25 GMT]]></title><description><![CDATA[<p>basti_1984 schrieb:</p>
<blockquote>
<p>Die Werte ändern sich.<br />
Wo ist eigentlich der Unterschied zwischen</p>
<pre><code class="language-cpp">GetWindowRect(&amp;window);
</code></pre>
<p>und</p>
<pre><code class="language-cpp">AfxGetMainWnd()-&gt;GetWindowRect(&amp;window);
</code></pre>
</blockquote>
<p>Der Unterschied ist, für welches Fenster dir die Werte gegeben werden.<br />
Von wo aus rufst du das obere denn auf? Aus welcher Klasse?</p>
<p>Das untere gibt dir jedenfalls die Koordinaten des Hauptfensters. Welches das ist, hängt von deiner Anwendung ab (Dialog oder SDI oder MDI).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1124196</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1124196</guid><dc:creator><![CDATA[estartu]]></dc:creator><pubDate>Fri, 25 Aug 2006 06:17:25 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme bei ermittlung der Fenstergröße on Fri, 25 Aug 2006 06:29:31 GMT]]></title><description><![CDATA[<p>Greife von der CView Klasse drauf zu</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1124202</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1124202</guid><dc:creator><![CDATA[basti_1984]]></dc:creator><pubDate>Fri, 25 Aug 2006 06:29:31 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme bei ermittlung der Fenstergröße on Fri, 25 Aug 2006 06:59:55 GMT]]></title><description><![CDATA[<p>Dann ist das beim View (also der obere Aufruf) vermutlich nur der Clientbereich, also ohne Titelzeile.<br />
Beim unteren ist die dann mit dabei.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1124216</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1124216</guid><dc:creator><![CDATA[estartu]]></dc:creator><pubDate>Fri, 25 Aug 2006 06:59:55 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme bei ermittlung der Fenstergröße on Fri, 25 Aug 2006 07:02:38 GMT]]></title><description><![CDATA[<p>So wir es sein<br />
Danke <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f60b.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_savoring_food"
      title=":yum:"
      alt="😋"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1124217</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1124217</guid><dc:creator><![CDATA[basti_1984]]></dc:creator><pubDate>Fri, 25 Aug 2006 07:02:38 GMT</pubDate></item></channel></rss>