<?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[Ereignis Keydown]]></title><description><![CDATA[<p>Ich habe ein Problem beim abfangen von Tastatureingaben.<br />
Ich will, das bei &quot;F1&quot;,&quot;F2&quot; und &quot;1&quot; eine Funktion ausgeführt wird, aber be &quot;1&quot; klappt es nicht VK_1 wird nicht als Konstante erskannt. WARUM?</p>
<p>Hier der Code</p>
<pre><code class="language-cpp">BOOL CTestDlg::PreTranslateMessage(MSG* pMsg) 
{

	if( uMessage==WM_KEYDOWN || uMessage==WM_KEYUP )
	{
		if((pMsg-&gt;lParam &amp; 0xFFFF) &lt;= 1)// die ersten 16 Bits des lParam's enthalten die Anzahl der Wiederholungen,
		{								// ich brauche nur einmaliges Drücken	

			switch( (int)pMsg-&gt;wParam )
			{// wParam enthält das virtuelle Tastenkode

			case VK_F2: // F2 &lt;-- klappt
				OnF2();
				return 1;
			case VK_F3: // F3 &lt;-- klappt
				OnF3();
				return 1;
			case VK_1: // Taste &quot;1&quot; &lt;-- klappt nicht
				On1() ;
				return 1;
			}
		}
	}
</code></pre>
<p>return CDialog::PreTranslateMessage(pMsg);<br />
}</p>
<p>Jemand eine Idee?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/79985/ereignis-keydown</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Apr 2026 16:57:33 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/79985.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 16 Jul 2004 08:07:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Ereignis Keydown on Fri, 16 Jul 2004 08:07:00 GMT]]></title><description><![CDATA[<p>Ich habe ein Problem beim abfangen von Tastatureingaben.<br />
Ich will, das bei &quot;F1&quot;,&quot;F2&quot; und &quot;1&quot; eine Funktion ausgeführt wird, aber be &quot;1&quot; klappt es nicht VK_1 wird nicht als Konstante erskannt. WARUM?</p>
<p>Hier der Code</p>
<pre><code class="language-cpp">BOOL CTestDlg::PreTranslateMessage(MSG* pMsg) 
{

	if( uMessage==WM_KEYDOWN || uMessage==WM_KEYUP )
	{
		if((pMsg-&gt;lParam &amp; 0xFFFF) &lt;= 1)// die ersten 16 Bits des lParam's enthalten die Anzahl der Wiederholungen,
		{								// ich brauche nur einmaliges Drücken	

			switch( (int)pMsg-&gt;wParam )
			{// wParam enthält das virtuelle Tastenkode

			case VK_F2: // F2 &lt;-- klappt
				OnF2();
				return 1;
			case VK_F3: // F3 &lt;-- klappt
				OnF3();
				return 1;
			case VK_1: // Taste &quot;1&quot; &lt;-- klappt nicht
				On1() ;
				return 1;
			}
		}
	}
</code></pre>
<p>return CDialog::PreTranslateMessage(pMsg);<br />
}</p>
<p>Jemand eine Idee?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/561884</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/561884</guid><dc:creator><![CDATA[haedfinger]]></dc:creator><pubDate>Fri, 16 Jul 2004 08:07:00 GMT</pubDate></item><item><title><![CDATA[Reply to Ereignis Keydown on Fri, 16 Jul 2004 09:01:37 GMT]]></title><description><![CDATA[<p>versuch domal herrauszubekommmen, welchen Code &quot;1&quot; überhaupt hat</p>
<p>also schreib in die PreTranselateMessage() funktion:</p>
<pre><code class="language-cpp">CString s;
s.Format(&quot;%d&quot;,  (int)pMsg-&gt;wParam);
AfxMessageBox(s);
</code></pre>
<p>und das was die MessageBox anzeigt musst du dann einfach einsetzten</p>
<p>mfg Emperor_L0ser</p>
]]></description><link>https://www.c-plusplus.net/forum/post/561939</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/561939</guid><dc:creator><![CDATA[Emperor_L0ser]]></dc:creator><pubDate>Fri, 16 Jul 2004 09:01:37 GMT</pubDate></item></channel></rss>