<?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[String von WORD &amp;amp;Key]]></title><description><![CDATA[<p>RichEdit1KeyDown(TObject *Sender, WORD &amp;Key,<br />
TShiftState Shift)</p>
<p>Wer kan mir sagen, wie ich hiervon den AnsiString rauskriege, ohne dass ich jede einzelne Möglichkeit wie</p>
<p>if(Shift.Contains( ssAlt ) &amp;&amp; Key == 56)</p>
<p>extra abfragen muß.</p>
<p>Gibtes sowas wie AnsiString str = WordToAnsi(Key);</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/126515/string-von-word-amp-key</link><generator>RSS for Node</generator><lastBuildDate>Tue, 28 Jul 2026 18:49:10 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/126515.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 15 Nov 2005 22:03:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to String von WORD &amp;amp;Key on Tue, 15 Nov 2005 22:03:14 GMT]]></title><description><![CDATA[<p>RichEdit1KeyDown(TObject *Sender, WORD &amp;Key,<br />
TShiftState Shift)</p>
<p>Wer kan mir sagen, wie ich hiervon den AnsiString rauskriege, ohne dass ich jede einzelne Möglichkeit wie</p>
<p>if(Shift.Contains( ssAlt ) &amp;&amp; Key == 56)</p>
<p>extra abfragen muß.</p>
<p>Gibtes sowas wie AnsiString str = WordToAnsi(Key);</p>
]]></description><link>https://www.c-plusplus.net/forum/post/918710</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/918710</guid><dc:creator><![CDATA[Trulli]]></dc:creator><pubDate>Tue, 15 Nov 2005 22:03:14 GMT</pubDate></item><item><title><![CDATA[Reply to String von WORD &amp;amp;Key on Tue, 15 Nov 2005 22:25:12 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>im Grunde einfach zuweisen</p>
<pre><code class="language-cpp">AnsiString str = Key;
// oder
AnsiString str += Key;
</code></pre>
<p>Allerdings weiß ich nicht was du damit im OnKey... willst. Du bekommst dort immer genau ein Zeichen.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/918729</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/918729</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Tue, 15 Nov 2005 22:25:12 GMT</pubDate></item><item><title><![CDATA[Reply to String von WORD &amp;amp;Key on Wed, 16 Nov 2005 12:29:53 GMT]]></title><description><![CDATA[<p>Ich will eine Undofunktion für Texteditor bauen.<br />
Ich hab mir dafür jetzt ne eigene Key-String Funktion gebastelt.<br />
Vielleicht kann die der eine oder andere auch mal brauchen.</p>
<pre><code class="language-cpp">AnsiString MyKeyToAnsi(Word Key, TShiftState Shift)
{
    if(Key == 32) return &quot; &quot;;

    if(Shift.Empty()){
        AnsiString a1[48] ={&quot;^&quot;,&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;6&quot;,&quot;7&quot;,&quot;8&quot;,&quot;9&quot;,&quot;0&quot;,&quot;ß&quot;,&quot;´&quot;,&quot;q&quot;,&quot;w&quot;,&quot;e&quot;,&quot;r&quot;,&quot;t&quot;,&quot;z&quot;,&quot;u&quot;,&quot;i&quot;,&quot;o&quot;,&quot;p&quot;,&quot;ü&quot;,&quot;+&quot;,&quot;a&quot;,&quot;s&quot;,&quot;d&quot;,&quot;f&quot;,&quot;g&quot;,&quot;h&quot;,&quot;j&quot;,&quot;k&quot;,&quot;l&quot;,&quot;ö&quot;,&quot;ä&quot;,&quot;#&quot;,&quot;&lt;&quot;,&quot;y&quot;,&quot;x&quot;,&quot;c&quot;,&quot;v&quot;,&quot;b&quot;,&quot;n&quot;,&quot;m&quot;,&quot;,&quot;,&quot;.&quot;,&quot;-&quot;};
        Word       w1[48] ={220,49,50,51,52,53,54,55,56,57,48,219,221,81,87,69,82,84,90,85,73,79,80,186,187,65,83,68,70,71,72,74,75,76,192,222,191,226,89,88,67,86,66,78,77,188,190,189};
        for(int x=0; x&lt;48; x++)
            if(w1[x] == Key)
                return a1[x];
    }

    if(Shift.Contains( ssShift )){
    	AnsiString a2[48] ={&quot;°&quot;,&quot;!&quot;,&quot;\&quot;&quot;,&quot;§&quot;,&quot;$&quot;,&quot;%&quot;,&quot;&amp;&quot;,&quot;/&quot;,&quot;(&quot;,&quot;)&quot;,&quot;=&quot;,&quot;?&quot;,&quot;`&quot;,&quot;Q&quot;,&quot;W&quot;,&quot;E&quot;,&quot;R&quot;,&quot;T&quot;,&quot;Z&quot;,&quot;U&quot;,&quot;I&quot;,&quot;O&quot;,&quot;P&quot;,&quot;Ü&quot;,&quot;*&quot;,&quot;A&quot;,&quot;S&quot;,&quot;D&quot;,&quot;F&quot;,&quot;G&quot;,&quot;H&quot;,&quot;J&quot;,&quot;K&quot;,&quot;L&quot;,&quot;Ö&quot;,&quot;Ä&quot;,&quot;'&quot;,&quot;&gt;&quot;,&quot;Y&quot;,&quot;X&quot;,&quot;C&quot;,&quot;V&quot;,&quot;B&quot;,&quot;N&quot;,&quot;M&quot;,&quot;;&quot;,&quot;:&quot;,&quot;_&quot;};
    	Word       w2[48] ={220,49,50,51,52,53,54,55,56,57,48,219,221,81,87,69,82,84,90,85,73,79,80,186,187,65,83,68,70,71,72,74,75,76,192,222,191,226,89,88,67,86,66,78,77,188,190,189};
    	for(int x=0; x&lt;48; x++)
        	if(w2[x] == Key)
            	return a2[x];
    }

    if(Shift.Contains( ssAlt )){
        AnsiString a3[11] ={&quot;²&quot;,&quot;³&quot;,&quot;{&quot;,&quot;[&quot;,&quot;]&quot;,&quot;}&quot;,&quot;\\&quot;,&quot;@&quot;,&quot;€&quot;,&quot;~&quot;,&quot;|&quot;};
        Word       w3[11] ={50,51,55,56,57,48,219,81,69,187,226};
        for(int x=0; x&lt;11; x++)
            if(w3[x] == Key)
                return a3[x];
    }

    //Rückgabewerte sind nur zur Veranschaulichung
    //Sollten für die persönlichen Bedürfnisse
    //angepasst werden
    if(Shift.Contains(ssCtrl)){
        if(Key == 88) return &quot;Ausschneiden&quot;;
        if(Key == 67) return &quot;Kopieren&quot;;
        if(Key == 86) return &quot;Einfügen&quot;;
    }

    if(Key == 13) return &quot;\r\n&quot;;
    if(Key == 8)  return &quot;Delete&quot;;
    if(Key == 46) return &quot;Entfernen&quot;;
    if(Key == 36) return &quot;Pos1&quot;;
    if(Key == 35) return &quot;Zeilen Ende&quot;;
    if(Key == 33) return &quot;Bild up&quot;;
    if(Key == 34) return &quot;Bild down&quot;;
    if(Key == 38) return &quot;Up Arrow&quot;;
    if(Key == 37) return &quot;Left Arrow&quot;;
    if(Key == 39) return &quot;Right Arrow&quot;;
    if(Key == 40) return &quot;Down Arrow&quot;;

    /*Unrelevant zum editieren*/
    //if(Key == 16) return &quot;Umschalten&quot;;
    //if(Key == 20) return &quot;Umschalten groß&quot;;
    //if(Key == 18) return &quot;Alt&quot;;
    //if(Key == 17) return &quot;Steuerung&quot;;
    //if(Key == 91) return &quot;Windowstaste&quot;;
    //if(Key == 45) return &quot;Einfügen&quot;;
    //if(Key == 144)return &quot;Num&quot;;

    //Die Rechnerseite der Tastatur
    //Falls Num an ist
    //Falls nicht werden weiter oben stehende
    //Ergebnisse zurückgegeben
    AnsiString a4[15] ={&quot;0&quot;,&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;6&quot;,&quot;7&quot;,&quot;8&quot;,&quot;9&quot;,&quot;/&quot;,&quot;*&quot;,&quot;-&quot;,&quot;+&quot;,&quot;,&quot;};
    Word       w4[15] ={96,97,98,99,100,101,102,103,104,105,111,106,109,107,110};
    for(int x=0; x&lt;15; x++)
        if(w4[x] == Key)
            return a4[x];

    return &quot;&quot;;
}
</code></pre>
<p>Viel spaß</p>
]]></description><link>https://www.c-plusplus.net/forum/post/919065</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/919065</guid><dc:creator><![CDATA[Trulli]]></dc:creator><pubDate>Wed, 16 Nov 2005 12:29:53 GMT</pubDate></item></channel></rss>