<?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[Desktop fokussiert?]]></title><description><![CDATA[<p>Wie kann ich am einfachsten abfragen, ob der Benutzer den Desktop fokussiert hat (bzw. den Desktop sieht) oder ob eine andere Anwendung im Vordergrund ist?</p>
<p>Ein Programm, dass im Tray sitzt soll auf Tastendruck (mittels RegisterHotkey) der Leertaste seine Form anzeigen. Wenn nun aber z.B. Word oder ICQ etc. im Vordergrund ist, soll nicht bei jedem Drücken der Leertaste die Form erscheinen, würde ja auch ziemlich nerven. Ich benötige also eine Abfrage, die mir sagt, ob der Desktop fokussiert ist, oder eine andere Anwendung (egal welche) im Vordergrund ist.</p>
<pre><code>HWND GetForegroundWindow(VOID);
</code></pre>
<pre><code>Return Value

The return value is a handle to the foreground window. The foreground window can be NULL in certain circumstances, such as when a window is losing activation.
</code></pre>
<p>Was sind denn alles &quot;Umstände&quot; (circumstances)? Vielleicht wenn der Desktop zu sehen ist?</p>
<p>Vielen Dank schonmal<br />
cb</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/181297/desktop-fokussiert</link><generator>RSS for Node</generator><lastBuildDate>Tue, 07 Jul 2026 20:20:13 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/181297.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 12 May 2007 09:48:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Desktop fokussiert? on Sat, 12 May 2007 09:50:58 GMT]]></title><description><![CDATA[<p>Wie kann ich am einfachsten abfragen, ob der Benutzer den Desktop fokussiert hat (bzw. den Desktop sieht) oder ob eine andere Anwendung im Vordergrund ist?</p>
<p>Ein Programm, dass im Tray sitzt soll auf Tastendruck (mittels RegisterHotkey) der Leertaste seine Form anzeigen. Wenn nun aber z.B. Word oder ICQ etc. im Vordergrund ist, soll nicht bei jedem Drücken der Leertaste die Form erscheinen, würde ja auch ziemlich nerven. Ich benötige also eine Abfrage, die mir sagt, ob der Desktop fokussiert ist, oder eine andere Anwendung (egal welche) im Vordergrund ist.</p>
<pre><code>HWND GetForegroundWindow(VOID);
</code></pre>
<pre><code>Return Value

The return value is a handle to the foreground window. The foreground window can be NULL in certain circumstances, such as when a window is losing activation.
</code></pre>
<p>Was sind denn alles &quot;Umstände&quot; (circumstances)? Vielleicht wenn der Desktop zu sehen ist?</p>
<p>Vielen Dank schonmal<br />
cb</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1283336</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1283336</guid><dc:creator><![CDATA[carstenbauer]]></dc:creator><pubDate>Sat, 12 May 2007 09:50:58 GMT</pubDate></item><item><title><![CDATA[Reply to Desktop fokussiert? on Sat, 12 May 2007 11:48:12 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Da hilft dir der Builder nicht weiter, du must dich im WinAPI-Forum umsehen.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1283410</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1283410</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Sat, 12 May 2007 11:48:12 GMT</pubDate></item><item><title><![CDATA[Reply to Desktop fokussiert? on Sat, 12 May 2007 11:48:20 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile-var-mode-is-viewprofile-and-u-is-14774.html" rel="nofollow">akari</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-2.html" rel="nofollow">VCL/CLX (Borland C++ Builder)</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-4.html" rel="nofollow">WinAPI</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-39405.html" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1283411</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1283411</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Sat, 12 May 2007 11:48:20 GMT</pubDate></item><item><title><![CDATA[Reply to Desktop fokussiert? on Sat, 12 May 2007 14:27:43 GMT]]></title><description><![CDATA[<p>GetFocus ?!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1283500</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1283500</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Sat, 12 May 2007 14:27:43 GMT</pubDate></item><item><title><![CDATA[Reply to Desktop fokussiert? on Sat, 12 May 2007 20:46:04 GMT]]></title><description><![CDATA[<p>Also ich hab mir das mit GetFocus() nun mal angeschaut und mit Hilfe von diesem Thread ( <a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-157355-and-highlight-is-%2Agetfocus%2A.html" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic-var-t-is-157355-and-highlight-is-*getfocus*.html</a> ) angewendet (Den Fenstertext ausgelesen). Dadurch, dass ich aber beim Drücken des Hotkeys in mein Programmcode gelange, da meine Anwendung ja den Ablauf für das Drücken dieser Taste bereitstellt, ist der Fenstertext immer gleich dem Namen meiner Anwendung. Ich verfälsche also quasi das Ergebnis dadurch, dass ich die Hotkeyaktion bestimme.</p>
<p>Hat einer eine Idee, wie ich das anders umgehen kann?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1283742</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1283742</guid><dc:creator><![CDATA[carstenbauer]]></dc:creator><pubDate>Sat, 12 May 2007 20:46:04 GMT</pubDate></item><item><title><![CDATA[Reply to Desktop fokussiert? on Sun, 13 May 2007 14:40:05 GMT]]></title><description><![CDATA[<p>Wäre es nicht einfacher und sinnvoller eine andere Taste zu nehmen. Zum Beispiel eine Funktionstaste, die auch dafür gedacht sind?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1284064</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1284064</guid><dc:creator><![CDATA[[[global:former_user]]]]></dc:creator><pubDate>Sun, 13 May 2007 14:40:05 GMT</pubDate></item><item><title><![CDATA[Reply to Desktop fokussiert? on Sun, 13 May 2007 17:44:47 GMT]]></title><description><![CDATA[<p>Vielleicht, aber die Funktionstasten sind nicht so leicht erreichbar wie die Leertaste, zumahl diese z.B. im Builder benutzt werden, also das selbe Problem auftritt</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1284181</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1284181</guid><dc:creator><![CDATA[carstenbauer]]></dc:creator><pubDate>Sun, 13 May 2007 17:44:47 GMT</pubDate></item><item><title><![CDATA[Reply to Desktop fokussiert? on Mon, 14 May 2007 07:02:09 GMT]]></title><description><![CDATA[<p>hat niemand eine idee? Eigentlich brauch ich nur eine GetLastForegroundWindow() um eben das Handle des Fensters zu ermitteln, das vor meiner Anwendung den Fokus hatte.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1284387</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1284387</guid><dc:creator><![CDATA[carstenbauer]]></dc:creator><pubDate>Mon, 14 May 2007 07:02:09 GMT</pubDate></item><item><title><![CDATA[Reply to Desktop fokussiert? on Mon, 14 May 2007 08:49:42 GMT]]></title><description><![CDATA[<p>IMHO bekommst Du das Desktop Window über GetForeGroundWindow wenn es das aktive Window ist.<br />
NULL kann zurückgegeben werden, aber die Umstände sind eher dann gegeben wenn das System in einem nicht unbedingt definiertem Stadium ist (Startphase, Shutdown, evtl. gesperrter Desktop, etc.)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1284450</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1284450</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Mon, 14 May 2007 08:49:42 GMT</pubDate></item><item><title><![CDATA[Reply to Desktop fokussiert? on Mon, 14 May 2007 19:12:13 GMT]]></title><description><![CDATA[<p>Also ich habe jetzt einfach als Hotkey die Kombination STRG+SPACE gewählt. Zwar nicht das was ich wollte, aber auch akzeptabel!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1284910</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1284910</guid><dc:creator><![CDATA[carstenbauer]]></dc:creator><pubDate>Mon, 14 May 2007 19:12:13 GMT</pubDate></item></channel></rss>