<?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[Fokus?]]></title><description><![CDATA[<p>wie kann ich überprüfen ob meine anwendung also das fenster den fokus hat und nich minimiert oder von anderen fenstern überdeckt ist?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/138676/fokus</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Jul 2026 03:29:46 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/138676.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 28 Feb 2006 13:46:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Fokus? on Tue, 28 Feb 2006 13:46:24 GMT]]></title><description><![CDATA[<p>wie kann ich überprüfen ob meine anwendung also das fenster den fokus hat und nich minimiert oder von anderen fenstern überdeckt ist?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1005050</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1005050</guid><dc:creator><![CDATA[N1dda]]></dc:creator><pubDate>Tue, 28 Feb 2006 13:46:24 GMT</pubDate></item><item><title><![CDATA[Reply to Fokus? on Tue, 28 Feb 2006 15:16:07 GMT]]></title><description><![CDATA[<p>Ich bin mir nicht sicher, was Du tatsächlich bewirken möchtest, aber ich kann es mal versuchen, zu erläutern.</p>
<p>Mit GetActiveWindow bekommst Du das aktive Fenster. Dieses kannst Du mit Deinem Eigenen vergleichen. Wenn Deine Anwendung allerdings eine Dialogbox offen hat und diese aktiv ist, dann liefert GetActiveWindow diese Dialogbox als aktives Fenster.</p>
<p>Deshalb glaube ich auch, dass es sinnvoller ist, nicht mit dem Kriterium &quot;aktives Fenster&quot; zu arbeiten. Um aber ein besseres Kriterium zu finden, müsste man das tatsächliche Vorhaben kennen, wie ich anfangs erwähnt habe.</p>
<p>Gruß André</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1005137</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1005137</guid><dc:creator><![CDATA[av_privat]]></dc:creator><pubDate>Tue, 28 Feb 2006 15:16:07 GMT</pubDate></item><item><title><![CDATA[Reply to Fokus? on Tue, 28 Feb 2006 17:05:16 GMT]]></title><description><![CDATA[<p>mit fokus meinte ich einfach, dass das fenster gerade im vordergrund is.</p>
<p>oder anders das programm wesen task gerade in der leiste eingedrückt is und desen titelleiste farbig und nich grau...<br />
ich hoffe ihr wisst jetzt was ich meine.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1005286</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1005286</guid><dc:creator><![CDATA[N1dda]]></dc:creator><pubDate>Tue, 28 Feb 2006 17:05:16 GMT</pubDate></item><item><title><![CDATA[Reply to Fokus? on Tue, 28 Feb 2006 17:26:31 GMT]]></title><description><![CDATA[<p>Also ist die eigentliche Frage, ob die Applikation aktiv ist.<br />
Stellt sich die nächste Frage: Reicht es aus, wenn Du bemerkst, wann jemand die Applikation aktiviert, oder musst Du es ständig wissen/abfragen können?</p>
<p>Für den ersten Fall gibt es die Möglichkeit, die Message WM_ACTIVATE. Mit dieser Nachricht erfährt man, ob man den Fokus erhält oder gerade verliert. Ich bin mir nicht sicher, aber ich glaube, das wird jeweils an die Parent-Fenster weitergereicht, bis es jemand auswertet.</p>
<p>Wenn Du MFC verwdnen kannst, ist es noch einfacher. Dort kannst Du OnActivateApp oder OnActivate abfangen.</p>
<p>Gruß André</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1005296</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1005296</guid><dc:creator><![CDATA[av_privat]]></dc:creator><pubDate>Tue, 28 Feb 2006 17:26:31 GMT</pubDate></item><item><title><![CDATA[Reply to Fokus? on Tue, 28 Feb 2006 18:13:15 GMT]]></title><description><![CDATA[<p>also am besten wäre es wenn ich es abfragen könnte!<br />
ich arbeite nich mit dem mfc.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1005323</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1005323</guid><dc:creator><![CDATA[N1dda]]></dc:creator><pubDate>Tue, 28 Feb 2006 18:13:15 GMT</pubDate></item><item><title><![CDATA[Reply to Fokus? on Wed, 01 Mar 2006 08:20:37 GMT]]></title><description><![CDATA[<p>In dem Fall kannst du dir auch einfach den letzten Aktiv-Status merken:</p>
<pre><code class="language-cpp">bool istact=true;

//in der Message-Auwertung:
  ...
  case WM_ACTIVATE:
  {
    BYTE act=msg.wParam &amp; 0xFF;
    istact= (act!=WA_INACTIVE);
    break;
  }

//irgendwo anders:
if(istact) TRACE(&quot;Funktion XYZ - ich bin aktiv\n&quot;);
</code></pre>
<p>(PS zur Erklärung: <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputmessages/wm_activate.asp" rel="nofollow">WM_ACTIVATE Nachricht</a>)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1005671</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1005671</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Wed, 01 Mar 2006 08:20:37 GMT</pubDate></item><item><title><![CDATA[Reply to Fokus? on Wed, 01 Mar 2006 16:27:00 GMT]]></title><description><![CDATA[<p>ja an sowas hatte ich auch schon gedacht,<br />
danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1006054</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1006054</guid><dc:creator><![CDATA[N1dda]]></dc:creator><pubDate>Wed, 01 Mar 2006 16:27:00 GMT</pubDate></item></channel></rss>