<?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[Tastatureingaben abfangen]]></title><description><![CDATA[<p>Hi,</p>
<p>könnte mir jemand einen Tipp geben wie ich Tastatureingaben global abfangen kann?</p>
<p>Danke</p>
<p>McK</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/71971/tastatureingaben-abfangen</link><generator>RSS for Node</generator><lastBuildDate>Thu, 09 Apr 2026 21:59:20 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/71971.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 23 Apr 2004 16:09:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Tastatureingaben abfangen on Fri, 23 Apr 2004 16:09:46 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>könnte mir jemand einen Tipp geben wie ich Tastatureingaben global abfangen kann?</p>
<p>Danke</p>
<p>McK</p>
]]></description><link>https://www.c-plusplus.net/forum/post/507551</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/507551</guid><dc:creator><![CDATA[McKembley]]></dc:creator><pubDate>Fri, 23 Apr 2004 16:09:46 GMT</pubDate></item><item><title><![CDATA[Reply to Tastatureingaben abfangen on Fri, 23 Apr 2004 16:18:30 GMT]]></title><description><![CDATA[<p>Suchfunktion benutzen,<br />
FAQs gucken,<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39383" rel="nofollow">DAS</a> finden!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/507554</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/507554</guid><dc:creator><![CDATA[nirsaja]]></dc:creator><pubDate>Fri, 23 Apr 2004 16:18:30 GMT</pubDate></item><item><title><![CDATA[Reply to Tastatureingaben abfangen on Sat, 24 Apr 2004 22:01:49 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>erstmal danke für den Link. Ich hab jetzt mal die hookdll.dll erstellt und lass sie im Hauptprogramm mit LoadLibrary laden. Wenn mich jetzt nicht alles täuscht muss ich jetzt die funktion SetupHook per GetProcAddress aufrufen oder?<br />
Wo und wie muss das GetProcAddress jetzt genau hin?</p>
<p>Mein Code sieht im Moment so aus:</p>
<pre><code>#include &lt;windows.h&gt;

LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM);

int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)
{

	HINSTANCE hLib = LoadLibrary(&quot;hookdll.dll&quot;); 

	if(hLib == NULL) 
	{ 
		MessageBox(NULL,&quot;Fehler: hookdll.dll konnte nicht geladen werden !&quot;,&quot;error&quot;, 0); 
		return 0; 
	}

	static TCHAR szAppName[] = TEXT (&quot;Klassenname&quot;);
	HWND         hwnd;
	MSG          msg;
	WNDCLASSEX   wndclassex = {0};

	wndclassex.cbSize        = sizeof(WNDCLASSEX);
	wndclassex.style         = CS_HREDRAW | CS_VREDRAW;
	wndclassex.lpfnWndProc   = WndProc;
	wndclassex.cbClsExtra    = 0;
	wndclassex.cbWndExtra    = 0;
	wndclassex.hInstance     = hInstance;
	wndclassex.hIcon         = LoadIcon (NULL, IDI_APPLICATION);
	wndclassex.hCursor       = LoadCursor (NULL, IDC_ARROW);
	wndclassex.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH);
	wndclassex.lpszMenuName  = NULL;
	wndclassex.lpszClassName = szAppName;
	wndclassex.hIconSm       = wndclassex.hIcon;

	if (!RegisterClassEx (&amp;wndclassex))
	{
		MessageBox (NULL, TEXT (&quot;RegisterClassEx fehlgeschlagen!&quot;), szAppName, MB_ICONERROR);
		return 0;
	}

	hwnd = CreateWindowEx (WS_EX_OVERLAPPEDWINDOW, // erweiterter Fensterstil
						szAppName, // Name der Fensterklasse
						TEXT (&quot;Fenstertitel&quot;), // Fenstertitel
						WS_OVERLAPPEDWINDOW, // Fensterstil
						CW_USEDEFAULT, // X-Position des Fensters                      
						CW_USEDEFAULT, // Y-Position des Fensters       
						CW_USEDEFAULT, // Fensterbreite                 
						CW_USEDEFAULT, // Fensterhöhe                
						NULL, // übergeordnetes Fenster
						NULL, // Menü
						hInstance, // Programm-Kopiezähler (Programm-ID)            
						NULL); // zusätzliche Parameter

	ShowWindow (hwnd, iCmdShow);
	UpdateWindow (hwnd);

	while (GetMessage (&amp;msg, NULL, 0, 0))
	{
		TranslateMessage (&amp;msg);
		DispatchMessage (&amp;msg);
	}

	return msg.wParam;

}

// Die Hauptnachrichtenschleife
LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
   HDC hdc;
   PAINTSTRUCT ps;

   switch (message)
   {
   case WM_CREATE:
      return (0);

   case WM_USER + 2:
	   MessageBox(NULL, &quot;ja&quot;, &quot;ja&quot;, MB_OK);

   case WM_PAINT:
      hdc = BeginPaint (hwnd, &amp;ps);
      TextOut (hdc, 0, 0, &quot;hallo &quot;, 5);
      EndPaint (hwnd, &amp;ps);
      return (0);

   case WM_DESTROY:
      PostQuitMessage (0);
      return (0);

   }

   return DefWindowProc (hwnd, message, wParam, lParam);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/508152</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/508152</guid><dc:creator><![CDATA[McKembley]]></dc:creator><pubDate>Sat, 24 Apr 2004 22:01:49 GMT</pubDate></item><item><title><![CDATA[Reply to Tastatureingaben abfangen on Sun, 25 Apr 2004 07:50:58 GMT]]></title><description><![CDATA[<p>Da du das Handle deines Fensters brauchst würde sich wohl WM_CREATE anbieten <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/508251</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/508251</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Sun, 25 Apr 2004 07:50:58 GMT</pubDate></item><item><title><![CDATA[Reply to Tastatureingaben abfangen on Sun, 25 Apr 2004 08:38:01 GMT]]></title><description><![CDATA[<p>Hi flenders,</p>
<p>könntest du mir eventuell helfen das getProcAddress einzubauen? habs gestern die ganze nacht noch versuch bin aber auf keinen grünen zweig gekommen.</p>
<p>McK</p>
]]></description><link>https://www.c-plusplus.net/forum/post/508277</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/508277</guid><dc:creator><![CDATA[McKembley]]></dc:creator><pubDate>Sun, 25 Apr 2004 08:38:01 GMT</pubDate></item><item><title><![CDATA[Reply to Tastatureingaben abfangen on Sun, 25 Apr 2004 09:56:11 GMT]]></title><description><![CDATA[<p>Du könntest auch einfach den lib-File, der Hook-DLL mitlinken, dann sparst du dir das ganze mit LoadLibrary und GetProcAddress und kannst die Funktion direkt verwenden <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<p>Ansonsten hilft dir vielleicht <a href="http://www.c-plusplus.net/forum/viewtopic.php?t=60061" rel="nofollow">das hier</a> oder die Forensuche <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/508318</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/508318</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Sun, 25 Apr 2004 09:56:11 GMT</pubDate></item></channel></rss>