<?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[Bei OnKeypress Event Fkt aufrufen]]></title><description><![CDATA[<p>Hi,</p>
<p>kann mir einer sagen wie ich bei einem OnKeyPress eine Fkt aufrufen und am besten noch den &quot;Key&quot; übergeben kann?<br />
Hab das ganze bisher so versucht aber es will nicht:</p>
<pre><code>1  feld = new TEdit(parent);
2  feld-&gt;OnKeyPress = fkt1(Key);
</code></pre>
<p>p.s. die Felder werden dynamisch erstellt also kann ich nicht einfach mit dem Objektinspektor arbeiten <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":/"
      alt="😕"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/topic/190191/bei-onkeypress-event-fkt-aufrufen</link><generator>RSS for Node</generator><lastBuildDate>Mon, 17 Aug 2026 13:03:48 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/190191.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 20 Aug 2007 14:45:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Bei OnKeypress Event Fkt aufrufen on Mon, 20 Aug 2007 14:45:25 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>kann mir einer sagen wie ich bei einem OnKeyPress eine Fkt aufrufen und am besten noch den &quot;Key&quot; übergeben kann?<br />
Hab das ganze bisher so versucht aber es will nicht:</p>
<pre><code>1  feld = new TEdit(parent);
2  feld-&gt;OnKeyPress = fkt1(Key);
</code></pre>
<p>p.s. die Felder werden dynamisch erstellt also kann ich nicht einfach mit dem Objektinspektor arbeiten <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":/"
      alt="😕"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1348368</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1348368</guid><dc:creator><![CDATA[neffetS]]></dc:creator><pubDate>Mon, 20 Aug 2007 14:45:25 GMT</pubDate></item><item><title><![CDATA[Reply to Bei OnKeypress Event Fkt aufrufen on Mon, 20 Aug 2007 14:51:24 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>dein Ansatz stimmt schon, aber übergeben musst du gar nix :)!</p>
<pre><code class="language-cpp">void __fastcall TForm1::OwnKeyPress(TObject *Sender, char &amp;Key)
{
   //DoSomething();
}
//------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
   // feld erzeugen
   feld-&gt;OnKeyPress = OwnKeyPress;
}
//------------------------------------------------------------------
</code></pre>
<p>mfg, Micha!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1348376</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1348376</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Mon, 20 Aug 2007 14:51:24 GMT</pubDate></item><item><title><![CDATA[Reply to Bei OnKeypress Event Fkt aufrufen on Mon, 20 Aug 2007 14:55:41 GMT]]></title><description><![CDATA[<p>öhmn also bei mir spuckt er dann das aus:</p>
<p>[C++ Fehler] Column.cpp(55): E2034 Konvertierung von 'void (* (_closure )())()' nach 'TKeyPressEvent' nicht möglich</p>
<p>edit:</p>
<p>die methode ist in der selben klasse richtig definiert und deklariert. Tut aber dennoch nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1348380</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1348380</guid><dc:creator><![CDATA[neffetS]]></dc:creator><pubDate>Mon, 20 Aug 2007 14:55:41 GMT</pubDate></item><item><title><![CDATA[Reply to Bei OnKeypress Event Fkt aufrufen on Mon, 20 Aug 2007 14:58:21 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Die Fehlermeldung besagt das deine Methode OwnKeyPress parameterlos ist, obwohl dort die ganzen Parameter sein sollten wie es der TKeyPressEvent verlangt.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1348381</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1348381</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Mon, 20 Aug 2007 14:58:21 GMT</pubDate></item><item><title><![CDATA[Reply to Bei OnKeypress Event Fkt aufrufen on Mon, 20 Aug 2007 15:03:15 GMT]]></title><description><![CDATA[<p>selbes Spiel mit eingefügten Parametern:</p>
<p>[C++ Fehler] Column.cpp(59): E2034 Konvertierung von 'void (* (_closure )(TObject *,char &amp;))(TObject *,char &amp;)' nach 'TKeyPressEvent' nicht möglich</p>
<p>Ich glaub ich mach irgendwas grundlegend falsch.<br />
Also biser siehts so aus: (&quot;wert&quot; ist ein Edit Feld)</p>
<pre><code>//Methode zum aufrufen
void Column::write(TObject *Sender, char &amp;Key){// was tun usw}

// Zuweisung
wert-&gt;OnKeyPress = write;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1348386</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1348386</guid><dc:creator><![CDATA[neffetS]]></dc:creator><pubDate>Mon, 20 Aug 2007 15:03:15 GMT</pubDate></item><item><title><![CDATA[Reply to Bei OnKeypress Event Fkt aufrufen on Mon, 20 Aug 2007 15:05:08 GMT]]></title><description><![CDATA[<p>ok, &quot;__fastcall&quot; hat das problem gelöst</p>
<p>Vielen Dank!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1348388</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1348388</guid><dc:creator><![CDATA[neffetS]]></dc:creator><pubDate>Mon, 20 Aug 2007 15:05:08 GMT</pubDate></item></channel></rss>