<?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[GetAsyncKeyState]]></title><description><![CDATA[<p>Hey ho, also folgendes:</p>
<p>in nem c/c++ Programm ohne gui kann man ja einfach mit:</p>
<pre><code class="language-cpp">if(GetAsyncKeyState(VK_F1)) {
    // machwas();
}
</code></pre>
<p><strong>Systemweit</strong> das Drücken von F1 erkennen, wenn ich das aber nun in nen c/c++ Programm mit Gui einbaue:</p>
<pre><code class="language-cpp">LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    if(GetAsyncKeyState(VK_F1)) {
        // machwas();
    }
</code></pre>
<p>(ich weis nicht genau wo <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":/"
      alt="😕"
    /> reagiert er nur, wenn das Fenster im Vordergrund ist, es soll aber <strong>Systemweit</strong> merken, wenn die Taste (Hotkey) gedrückt wurde.</p>
<p>Was mache ich Falsch? Brauche Hilfe!</p>
<p>Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/184812/getasynckeystate</link><generator>RSS for Node</generator><lastBuildDate>Sun, 05 Jul 2026 17:09:25 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/184812.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 19 Jun 2007 12:25:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to GetAsyncKeyState on Tue, 19 Jun 2007 12:25:36 GMT]]></title><description><![CDATA[<p>Hey ho, also folgendes:</p>
<p>in nem c/c++ Programm ohne gui kann man ja einfach mit:</p>
<pre><code class="language-cpp">if(GetAsyncKeyState(VK_F1)) {
    // machwas();
}
</code></pre>
<p><strong>Systemweit</strong> das Drücken von F1 erkennen, wenn ich das aber nun in nen c/c++ Programm mit Gui einbaue:</p>
<pre><code class="language-cpp">LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    if(GetAsyncKeyState(VK_F1)) {
        // machwas();
    }
</code></pre>
<p>(ich weis nicht genau wo <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":/"
      alt="😕"
    /> reagiert er nur, wenn das Fenster im Vordergrund ist, es soll aber <strong>Systemweit</strong> merken, wenn die Taste (Hotkey) gedrückt wurde.</p>
<p>Was mache ich Falsch? Brauche Hilfe!</p>
<p>Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1309091</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1309091</guid><dc:creator><![CDATA[Dr!v3r]]></dc:creator><pubDate>Tue, 19 Jun 2007 12:25:36 GMT</pubDate></item><item><title><![CDATA[Reply to GetAsyncKeyState on Tue, 19 Jun 2007 14:03:17 GMT]]></title><description><![CDATA[<p>*push* brauche hilfe!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1309182</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1309182</guid><dc:creator><![CDATA[Dr!v3r]]></dc:creator><pubDate>Tue, 19 Jun 2007 14:03:17 GMT</pubDate></item><item><title><![CDATA[Reply to GetAsyncKeyState on Tue, 19 Jun 2007 14:34:46 GMT]]></title><description><![CDATA[<p>Dr!v3r schrieb:</p>
<blockquote>
<p>Was mache ich Falsch?</p>
</blockquote>
<p>was du da falsch machst ist, dass du die abfrage mit <a href="http://msdn2.microsoft.com/en-us/library/ms646293.aspx" rel="nofollow">GetAsyncKeyState()</a> in die WndProc schreibst. die wird aber nur aufgerufen wenn dein fenster eine nachricht bekommt...</p>
<p>btw: richtiger wäre es eigentlich so</p>
<pre><code class="language-cpp">if( GetAsyncKeyState(VK_F1) &amp; 0x8000 )
  // mach was
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1309197</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1309197</guid><dc:creator><![CDATA[dot]]></dc:creator><pubDate>Tue, 19 Jun 2007 14:34:46 GMT</pubDate></item><item><title><![CDATA[Reply to GetAsyncKeyState on Tue, 19 Jun 2007 14:37:12 GMT]]></title><description><![CDATA[<p>oha, stimmt.</p>
<p>Wo setze ich es sonst hin? Weiter oben wo das Fenster erstellt wird?</p>
<p>mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1309203</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1309203</guid><dc:creator><![CDATA[Dr!v3r]]></dc:creator><pubDate>Tue, 19 Jun 2007 14:37:12 GMT</pubDate></item><item><title><![CDATA[Reply to GetAsyncKeyState on Tue, 19 Jun 2007 15:11:20 GMT]]></title><description><![CDATA[<p>Heut ist net mein Tag^^ habs schonwieder selbst gelöst, einfach nen Thread gemacht und da die funktion aufgerufen.. passt scho!</p>
<p>mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1309229</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1309229</guid><dc:creator><![CDATA[Dr!v3r]]></dc:creator><pubDate>Tue, 19 Jun 2007 15:11:20 GMT</pubDate></item></channel></rss>