<?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[mit THotKey globale Hooks vergeben]]></title><description><![CDATA[<p>Hi!</p>
<p>Ich hab mir nen Systemweiten HotKey gemacht. ==&gt;<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39144" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic.php?t=39144</a></p>
<p>Jetzt hab ich mir das Eingabefeld für Hotkeys genommen (THotKey) und möchte aber nicht nur einzelne Tasten nehmen, sondern auch z.B. ein Alt davor stehen haben.</p>
<pre><code class="language-cpp">RegisterHotKey(
    Handle,
    HotKeyIdentifier_uint,
    HotKeyModifier_uint,
    HotKey-&gt;HotKey //Hier werden einzelne Buchstaben übergeben
);
</code></pre>
<p>Kann mir jemand Helfen?</p>
<p>Und wie kann ich den Wert in einer ini-Datei speichern, wieder auslesen und dann wieder ins HotKey-Feld reinschreiben?<br />
Andere Werte von dem Prog kann ich ja einfach als Text speichern.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/200511/mit-thotkey-globale-hooks-vergeben</link><generator>RSS for Node</generator><lastBuildDate>Wed, 19 Aug 2026 01:38:28 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/200511.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 16 Dec 2007 00:59:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to mit THotKey globale Hooks vergeben on Sun, 16 Dec 2007 00:59:41 GMT]]></title><description><![CDATA[<p>Hi!</p>
<p>Ich hab mir nen Systemweiten HotKey gemacht. ==&gt;<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39144" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic.php?t=39144</a></p>
<p>Jetzt hab ich mir das Eingabefeld für Hotkeys genommen (THotKey) und möchte aber nicht nur einzelne Tasten nehmen, sondern auch z.B. ein Alt davor stehen haben.</p>
<pre><code class="language-cpp">RegisterHotKey(
    Handle,
    HotKeyIdentifier_uint,
    HotKeyModifier_uint,
    HotKey-&gt;HotKey //Hier werden einzelne Buchstaben übergeben
);
</code></pre>
<p>Kann mir jemand Helfen?</p>
<p>Und wie kann ich den Wert in einer ini-Datei speichern, wieder auslesen und dann wieder ins HotKey-Feld reinschreiben?<br />
Andere Werte von dem Prog kann ich ja einfach als Text speichern.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1421207</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1421207</guid><dc:creator><![CDATA[*gt*Bocky*lt*]]></dc:creator><pubDate>Sun, 16 Dec 2007 00:59:41 GMT</pubDate></item><item><title><![CDATA[Reply to mit THotKey globale Hooks vergeben on Sun, 16 Dec 2007 02:15:36 GMT]]></title><description><![CDATA[<p>Hab mir jetzt für die Alt- und Strg-Tasten einfach ne checkbox genommen. Aber ich kriegs noch nicht hin den Wert aus der ini-Datei wieder in die HotKey-Box reinzuschreiben. In der ini-Datei steht irgendeine Zahl. Bei nem A ist es die 65. Wie kann ich das zurückschreiben?<br />
zur zeit sieht's so aus:</p>
<pre><code class="language-cpp">DWORD groesse_sc;
groesse_sc=5;
char key[5];
GetPrivateProfileString(&quot;shortcut&quot;,&quot;key&quot;,&quot;50&quot;,ref_time,groesse_ref,ini_path.c_str());
HotKey-&gt;HotKey=(int) key;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1421218</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1421218</guid><dc:creator><![CDATA[*gt*Bocky*lt*]]></dc:creator><pubDate>Sun, 16 Dec 2007 02:15:36 GMT</pubDate></item><item><title><![CDATA[Reply to mit THotKey globale Hooks vergeben on Sun, 16 Dec 2007 10:40:10 GMT]]></title><description><![CDATA[<p>Du hast ja gar nicht die Variable 'key' verwendet und einen String kannst du nicht einfach in eine Zahl per Cast umwandeln.<br />
So wäre es schon richtiger:</p>
<pre><code class="language-cpp">GetPrivateProfileString(&quot;shortcut&quot;,&quot;key&quot;,&quot;50&quot;,key,&amp;groesse_sc,ini_path.c_str());
HotKey-&gt;HotKey=StrToInt(key);
</code></pre>
<p>Aber viel eleganter geht es mit der Klasse TIniFile...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1421278</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1421278</guid><dc:creator><![CDATA[Th]]></dc:creator><pubDate>Sun, 16 Dec 2007 10:40:10 GMT</pubDate></item><item><title><![CDATA[Reply to mit THotKey globale Hooks vergeben on Sun, 16 Dec 2007 10:45:27 GMT]]></title><description><![CDATA[<p>THX, hab ich wohl übersehen, war ja auch schon spät^^</p>
<p>So gehts <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /> THX</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1421279</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1421279</guid><dc:creator><![CDATA[*gt*Bocky*lt*]]></dc:creator><pubDate>Sun, 16 Dec 2007 10:45:27 GMT</pubDate></item><item><title><![CDATA[Reply to mit THotKey globale Hooks vergeben on Sun, 16 Dec 2007 20:06:11 GMT]]></title><description><![CDATA[<p>Ich möchte jetzt 2 Hotkeys vergeben. Dazu habe ich dieses Hier erneut verwendet, jedoch mit anderen Variablennamen:</p>
<pre><code class="language-cpp">Exit_HotKeyIdentifier_uint = GlobalAddAtom(&quot;Exit-Hotkey&quot;);
Exit_HotKeyModifier_uint = MOD_ALT;
RegisterHotKey(Handle, Exit_HotKeyIdentifier_uint, Exit_HotKeyModifier_uint, 89 /* ist &quot;Y&quot; */); 

UnregisterHotKey(Handle, Exit_HotKeyIdentifier_uint);
GlobalDeleteAtom(Exit_HotKeyIdentifier_uint);
</code></pre>
<p>Jetzt möchte ich in</p>
<pre><code class="language-cpp">void __fastcall TForm1::WMHotKey(TMessage &amp;Msg)
{
    TForm::Dispatch(&amp;Msg);
}
</code></pre>
<p>Abfragen, welche Tasten nun gedrückt wurden, die vom ersten Hotkey, oder die vom zweiten. Oder kann man alle Tastendrücke dadrin überprüfen?? Dazu müsste man aus Msg die Modifiers und die andere gedrückte Taste auslesen. Aber wie? Ich hab das schon mit GetKeyNameText versucht, kriegs aber nicht hin. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>Noch ne Frage: Was tut TForm::Dispatch?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1421495</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1421495</guid><dc:creator><![CDATA[*gt*Bocky*lt*]]></dc:creator><pubDate>Sun, 16 Dec 2007 20:06:11 GMT</pubDate></item><item><title><![CDATA[Reply to mit THotKey globale Hooks vergeben on Mon, 17 Dec 2007 20:53:35 GMT]]></title><description><![CDATA[<p>hmm..., ich hätt' schon gern ne Antwort^^</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1422288</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1422288</guid><dc:creator><![CDATA[*gt*Bocky*lt*]]></dc:creator><pubDate>Mon, 17 Dec 2007 20:53:35 GMT</pubDate></item><item><title><![CDATA[Reply to mit THotKey globale Hooks vergeben on Tue, 18 Dec 2007 09:59:06 GMT]]></title><description><![CDATA[<p>Schau einfach mal in die Windows SDK-Hilfe (oder alternativ in der MSDN) zum Stichwort &quot;WM_HOTKEY&quot;.<br />
Dort sind die Parameter der Message erklärt, welche du dann nur noch abfragen müßtest.</p>
<p>Und TObject::Dispatch() leitet einfach die Botschaft (Message) an den Vorgänger des Objekts solange weiter, bis jemand die Botschaft verarbeitet, d.h. wenn du selbst die Botschaft abarbeitest, dann brauchst du Dispatch nicht aufrufen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1422447</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1422447</guid><dc:creator><![CDATA[Th]]></dc:creator><pubDate>Tue, 18 Dec 2007 09:59:06 GMT</pubDate></item><item><title><![CDATA[Reply to mit THotKey globale Hooks vergeben on Thu, 20 Dec 2007 17:03:35 GMT]]></title><description><![CDATA[<p>Also die Taste krieg ich raus, aber nicht, ob noch z.B. alt oder Strg dazu gedrückt wurde. Kann mir jemand helfen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1423966</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1423966</guid><dc:creator><![CDATA[*gt*Bocky*lt*]]></dc:creator><pubDate>Thu, 20 Dec 2007 17:03:35 GMT</pubDate></item><item><title><![CDATA[Reply to mit THotKey globale Hooks vergeben on Fri, 21 Dec 2007 12:27:22 GMT]]></title><description><![CDATA[<p>// Doppel-Post</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1424380</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1424380</guid><dc:creator><![CDATA[Th]]></dc:creator><pubDate>Fri, 21 Dec 2007 12:27:22 GMT</pubDate></item><item><title><![CDATA[Reply to mit THotKey globale Hooks vergeben on Fri, 21 Dec 2007 12:25:36 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">modifiers = (UINT)LOWORD(lParam);

if(modifiers &amp; MOD_ALT) // alt. MOD_CONTROL, MOD_SHIFT oder MOD_WIN
{

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1424379</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1424379</guid><dc:creator><![CDATA[Th]]></dc:creator><pubDate>Fri, 21 Dec 2007 12:25:36 GMT</pubDate></item><item><title><![CDATA[Reply to mit THotKey globale Hooks vergeben on Fri, 21 Dec 2007 20:23:17 GMT]]></title><description><![CDATA[<p>thx</p>
<p>//Wo ist das Problem mit &quot;Doppel-Posts&quot;??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1424603</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1424603</guid><dc:creator><![CDATA[*gt*Bocky*lt*]]></dc:creator><pubDate>Fri, 21 Dec 2007 20:23:17 GMT</pubDate></item><item><title><![CDATA[Reply to mit THotKey globale Hooks vergeben on Sat, 22 Dec 2007 10:12:10 GMT]]></title><description><![CDATA[<p>Meinen Eintrag hatte er aus Versehen doppelt eingetragen, so daß ich den zweiten gelöscht habe. Hatte nichts mit dir zu tun -)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1424728</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1424728</guid><dc:creator><![CDATA[Th]]></dc:creator><pubDate>Sat, 22 Dec 2007 10:12:10 GMT</pubDate></item></channel></rss>