<?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[Key in ... [done]]]></title><description><![CDATA[<p>High<br />
aus Delphi kenne ich folgendes:</p>
<pre><code>if not (key in['0'..'9',#8,#13]) 
  then key:=#0;
</code></pre>
<p>Wie kann ich das in C++ übersetzen??<br />
Für einzelne Werte geht das ja noch... aber für mehrere wie in meinem Delphi Beispiel...?</p>
<pre><code class="language-cpp">void __fastcall TForm1::Memo1KeyPress(TObject *Sender, char &amp;Key)
{
  if ((Key != 48) Key=0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/138622/key-in-done</link><generator>RSS for Node</generator><lastBuildDate>Sun, 02 Aug 2026 13:00:08 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/138622.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 27 Feb 2006 20:19:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Key in ... [done] on Mon, 27 Feb 2006 20:32:39 GMT]]></title><description><![CDATA[<p>High<br />
aus Delphi kenne ich folgendes:</p>
<pre><code>if not (key in['0'..'9',#8,#13]) 
  then key:=#0;
</code></pre>
<p>Wie kann ich das in C++ übersetzen??<br />
Für einzelne Werte geht das ja noch... aber für mehrere wie in meinem Delphi Beispiel...?</p>
<pre><code class="language-cpp">void __fastcall TForm1::Memo1KeyPress(TObject *Sender, char &amp;Key)
{
  if ((Key != 48) Key=0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1004640</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1004640</guid><dc:creator><![CDATA[Horschdware]]></dc:creator><pubDate>Mon, 27 Feb 2006 20:32:39 GMT</pubDate></item><item><title><![CDATA[Reply to Key in ... [done] on Mon, 27 Feb 2006 20:30:36 GMT]]></title><description><![CDATA[<p>Hallo</p>
<pre><code class="language-cpp">AnsiString Keys = &quot;0123456789\r\n\b&quot;; // \r\n entsrpicht Enter, \b Backspace
  if (Keys.Pos(Key) &lt; 1)
    Key = 0;
</code></pre>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1004653</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1004653</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Mon, 27 Feb 2006 20:30:36 GMT</pubDate></item><item><title><![CDATA[Reply to Key in ... [done] on Mon, 27 Feb 2006 20:32:06 GMT]]></title><description><![CDATA[<p>Joa, klar..<br />
macht Sinn.<br />
Merci</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1004654</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1004654</guid><dc:creator><![CDATA[Horschdware]]></dc:creator><pubDate>Mon, 27 Feb 2006 20:32:06 GMT</pubDate></item></channel></rss>