<?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[high-order bit einer Shortvariable auslesen]]></title><description><![CDATA[<p>Hi @ all<br />
Wie kann ich das<br />
high-order bit einer Shortvariable auslesen,<br />
bessergesagt ich will prüfen ob das Bit gesetzt ist oder nicht.<br />
Grund ist die WinAPI Funktion GetKeyState.</p>
<blockquote>
<p>If the high-order bit is 1, the key is down; otherwise, it is up.</p>
</blockquote>
<p>Schon mal vielen Dank,<br />
Max</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/137570/high-order-bit-einer-shortvariable-auslesen</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Jul 2026 19:38:30 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/137570.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 18 Feb 2006 16:59:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to high-order bit einer Shortvariable auslesen on Sat, 18 Feb 2006 16:59:38 GMT]]></title><description><![CDATA[<p>Hi @ all<br />
Wie kann ich das<br />
high-order bit einer Shortvariable auslesen,<br />
bessergesagt ich will prüfen ob das Bit gesetzt ist oder nicht.<br />
Grund ist die WinAPI Funktion GetKeyState.</p>
<blockquote>
<p>If the high-order bit is 1, the key is down; otherwise, it is up.</p>
</blockquote>
<p>Schon mal vielen Dank,<br />
Max</p>
]]></description><link>https://www.c-plusplus.net/forum/post/997357</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/997357</guid><dc:creator><![CDATA[Max_]]></dc:creator><pubDate>Sat, 18 Feb 2006 16:59:38 GMT</pubDate></item><item><title><![CDATA[Reply to high-order bit einer Shortvariable auslesen on Sat, 18 Feb 2006 17:56:20 GMT]]></title><description><![CDATA[<p>Also plattformunabhängig macht man das so:</p>
<pre><code class="language-cpp">short x = /*...*/;
bool result = (x &amp; (1u &lt;&lt; (sizeof(short) * CHAR_BIT - 1))) != 0;
</code></pre>
<p>Da du aber WinAPI verwendest (und im falschen Forum bist), kannst du das auch kurz schreiben:</p>
<pre><code class="language-cpp">short x = /*...*/;
bool result = (x &amp; 0x8000) != 0;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/997403</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/997403</guid><dc:creator><![CDATA[groovemaster]]></dc:creator><pubDate>Sat, 18 Feb 2006 17:56:20 GMT</pubDate></item><item><title><![CDATA[Reply to high-order bit einer Shortvariable auslesen on Sat, 18 Feb 2006 18:10:27 GMT]]></title><description><![CDATA[<p>Ok,funzt <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /><br />
Aber nur wenn mein Programm den Fokus hat,ich würde aber gerne auch prüfen wenn es nicht den Fokus hat,iwe mach ich das?</p>
<p>MFG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/997425</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/997425</guid><dc:creator><![CDATA[Max_]]></dc:creator><pubDate>Sat, 18 Feb 2006 18:10:27 GMT</pubDate></item><item><title><![CDATA[Reply to high-order bit einer Shortvariable auslesen on Sat, 18 Feb 2006 18:22:24 GMT]]></title><description><![CDATA[<p>Wieso willst du denn das? Tastendrücke werden doch sowieso nur an das Fenster weitergereicht, welches den Fokus hat. Wenn dein Programm alle Tastendrücke mitbekommen soll, dann musst du wahrscheinlich einen globalen Hook verwenden und dann alle Tastendrücke an dein Programm weiterleiten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/997438</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/997438</guid><dc:creator><![CDATA[groovemaster]]></dc:creator><pubDate>Sat, 18 Feb 2006 18:22:24 GMT</pubDate></item><item><title><![CDATA[Reply to high-order bit einer Shortvariable auslesen on Sat, 18 Feb 2006 18:33:09 GMT]]></title><description><![CDATA[<p>Ich will das damit ich imer wenn ich F1 drücke zu meinem Programm komme <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /><br />
Ein hook?ok mal googlen :d</p>
<p>MFG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/997445</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/997445</guid><dc:creator><![CDATA[Max_]]></dc:creator><pubDate>Sat, 18 Feb 2006 18:33:09 GMT</pubDate></item><item><title><![CDATA[Reply to high-order bit einer Shortvariable auslesen on Sat, 18 Feb 2006 18:52:55 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile.php?mode=viewprofile&amp;u=403" rel="nofollow">HumeSikkins</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=15" rel="nofollow">C++</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=4" rel="nofollow">WinAPI</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39405" 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/997465</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/997465</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Sat, 18 Feb 2006 18:52:55 GMT</pubDate></item><item><title><![CDATA[Reply to high-order bit einer Shortvariable auslesen on Sat, 18 Feb 2006 20:34:34 GMT]]></title><description><![CDATA[<p>Achso, sowas hast du vor. Naja, vielleicht ist dann ein Hook doch etwas zu viel. Evtl. kann man da auch irgendwas mit globalen Hotkeys machen. Ich habe selbst schon mal ein Tool gemacht, wo ich sowas verwendet habe. Dazu solltest du dir mal die Funktion RegisterHotKey anschauen. Dort kannst du dann ja das Fenster deines Programmes angeben, und bei Erhalt der Nachricht dich selbst aktivieren. Das sollte eigentlich funktionieren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/997535</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/997535</guid><dc:creator><![CDATA[groovemaster]]></dc:creator><pubDate>Sat, 18 Feb 2006 20:34:34 GMT</pubDate></item><item><title><![CDATA[Reply to high-order bit einer Shortvariable auslesen on Sat, 18 Feb 2006 20:50:48 GMT]]></title><description><![CDATA[<p>Ok danke <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<p>Max</p>
]]></description><link>https://www.c-plusplus.net/forum/post/997541</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/997541</guid><dc:creator><![CDATA[Max_]]></dc:creator><pubDate>Sat, 18 Feb 2006 20:50:48 GMT</pubDate></item></channel></rss>