<?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[Mitte des Fensters]]></title><description><![CDATA[<p>Ich möchte die Mitte meines Fensters ermitteln im Bezug auf das Desktop Fenster.</p>
<p>Hier mit aheb ich es probiert... vergeblich...</p>
<p>RECT rect;<br />
::GetWindowRect(hwnd, &amp;rect);<br />
long center_x = ::GetSystemMetrics(SM_CXFULLSCREEN)/2-(abs&lt;long&gt;(rect.left)+rect.right)/2;<br />
long center_y = ::GetSystemMetrics(SM_CYFULLSCREEN)/2-(abs&lt;long&gt;(rect.top)+rect.bottom)/2;<br />
::SetCursorPos(center_x, center_y);</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/180150/mitte-des-fensters</link><generator>RSS for Node</generator><lastBuildDate>Thu, 09 Jul 2026 13:32:50 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/180150.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 29 Apr 2007 15:06:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Mitte des Fensters on Sun, 29 Apr 2007 15:06:56 GMT]]></title><description><![CDATA[<p>Ich möchte die Mitte meines Fensters ermitteln im Bezug auf das Desktop Fenster.</p>
<p>Hier mit aheb ich es probiert... vergeblich...</p>
<p>RECT rect;<br />
::GetWindowRect(hwnd, &amp;rect);<br />
long center_x = ::GetSystemMetrics(SM_CXFULLSCREEN)/2-(abs&lt;long&gt;(rect.left)+rect.right)/2;<br />
long center_y = ::GetSystemMetrics(SM_CYFULLSCREEN)/2-(abs&lt;long&gt;(rect.top)+rect.bottom)/2;<br />
::SetCursorPos(center_x, center_y);</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1275727</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1275727</guid><dc:creator><![CDATA[muh80]]></dc:creator><pubDate>Sun, 29 Apr 2007 15:06:56 GMT</pubDate></item><item><title><![CDATA[Reply to Mitte des Fensters on Sun, 29 Apr 2007 15:28:35 GMT]]></title><description><![CDATA[<p>Sowas ? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/27a1.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--right_arrow"
      title=":arrow_right:"
      alt="➡"
    /></p>
<pre><code class="language-cpp">RECT rcWnd;
GetWindowRect(hWnd, &amp;rcWnd);
int iXCenter = (GetSystemMetrics(SM_CXSCREEN) - (rcWnd.right - rcWnd.left)) / 2;
int iYCenter = (GetSystemMetrics(SM_CYSCREEN) - (rcWnd.bottom - rcWnd.top)) / 2;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1275747</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1275747</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Sun, 29 Apr 2007 15:28:35 GMT</pubDate></item></channel></rss>