<?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[[CLOSED] Frage zu GetAsyncKeyState() ?! WICHTIG:&#x2F;]]></title><description><![CDATA[<p>hallo,<br />
ich habe vor in einem bestimmten fenster die mausklicks zu ermitteln und das wollte ich am besten mit GetAsyncKeyState machen, so:</p>
<pre><code class="language-cpp">if( ( hWnd == GetForegroundWindow( ) ) ) {

    if( ( GetAsyncKeyState( VK_LBUTTON ) ) ||
        ( GetAsyncKeyState( VK_RBUTTON ) ) ) {

        clicks++;
    }
}
</code></pre>
<p>das PROBLEM ist: wenn man die mausteste gedrueckt haellt zaehlt das programm trotzdem weiter. das will ich aber nicht. wie kann ich das abstellen? also das er prüft ob die taste gedrueckt gehalten wird?</p>
<p>Gruß Tobi.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/186827/closed-frage-zu-getasynckeystate-wichtig</link><generator>RSS for Node</generator><lastBuildDate>Sat, 04 Jul 2026 22:55:15 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/186827.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 12 Jul 2007 19:09:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [CLOSED] Frage zu GetAsyncKeyState() ?! WICHTIG:&#x2F; on Thu, 12 Jul 2007 19:29:02 GMT]]></title><description><![CDATA[<p>hallo,<br />
ich habe vor in einem bestimmten fenster die mausklicks zu ermitteln und das wollte ich am besten mit GetAsyncKeyState machen, so:</p>
<pre><code class="language-cpp">if( ( hWnd == GetForegroundWindow( ) ) ) {

    if( ( GetAsyncKeyState( VK_LBUTTON ) ) ||
        ( GetAsyncKeyState( VK_RBUTTON ) ) ) {

        clicks++;
    }
}
</code></pre>
<p>das PROBLEM ist: wenn man die mausteste gedrueckt haellt zaehlt das programm trotzdem weiter. das will ich aber nicht. wie kann ich das abstellen? also das er prüft ob die taste gedrueckt gehalten wird?</p>
<p>Gruß Tobi.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1324110</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1324110</guid><dc:creator><![CDATA[T0bi]]></dc:creator><pubDate>Thu, 12 Jul 2007 19:29:02 GMT</pubDate></item><item><title><![CDATA[Reply to [CLOSED] Frage zu GetAsyncKeyState() ?! WICHTIG:&#x2F; on Thu, 12 Jul 2007 19:29:09 GMT]]></title><description><![CDATA[<p>Schalter einbauen :</p>
<pre><code class="language-cpp">int schalter = 0;
...
if ( GetAsyncKeyState (VK_LBUTTON) ) {
 if ( schalter == 0 ) {
  schalter = 1;
  clicks++;
 }
} else {
 schalter = 0;
}
...
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1324122</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1324122</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Thu, 12 Jul 2007 19:29:09 GMT</pubDate></item><item><title><![CDATA[Reply to [CLOSED] Frage zu GetAsyncKeyState() ?! WICHTIG:&#x2F; on Thu, 12 Jul 2007 19:28:30 GMT]]></title><description><![CDATA[<p>ok sorry,<br />
habs selber gefunden <a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-176751-and-highlight-is-getasynckeystate.html" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic-var-t-is-176751-and-highlight-is-getasynckeystate.html</a></p>
<p>trotzdem danke.</p>
<p>Gruß Tobi.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1324125</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1324125</guid><dc:creator><![CDATA[T0bi]]></dc:creator><pubDate>Thu, 12 Jul 2007 19:28:30 GMT</pubDate></item><item><title><![CDATA[Reply to [CLOSED] Frage zu GetAsyncKeyState() ?! WICHTIG:&#x2F; on Thu, 12 Jul 2007 19:28:43 GMT]]></title><description><![CDATA[<p>Äh... statt VL_LBUTTON einfach VK_LBUTTONDOWN?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1324126</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1324126</guid><dc:creator><![CDATA[Professor Schlurmann]]></dc:creator><pubDate>Thu, 12 Jul 2007 19:28:43 GMT</pubDate></item></channel></rss>