Click here to Skip to main content
15,902,938 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Collapsable 3D Studio-esque menu system Pin
Graham Reeds20-Sep-06 22:26
Graham Reeds20-Sep-06 22:26 
QuestionMicrosoft Detours 1.5 Complete API Documentations needed. Pin
Ricky Gai19-Sep-06 23:20
Ricky Gai19-Sep-06 23:20 
AnswerRe: Microsoft Detours 1.5 Complete API Documentations needed. Pin
SSDream7-Sep-09 4:35
SSDream7-Sep-09 4:35 
QuestionShared object between 2 DLLs Pin
AbhishekBK19-Sep-06 23:18
AbhishekBK19-Sep-06 23:18 
QuestionMicrosoft Detours 1.5 API documentations required. Pin
Ricky Gai19-Sep-06 23:17
Ricky Gai19-Sep-06 23:17 
QuestionKeyBoard hook Doubt Pin
_anil_19-Sep-06 23:06
_anil_19-Sep-06 23:06 
AnswerRe: KeyBoard hook Doubt Pin
Naveen19-Sep-06 23:31
Naveen19-Sep-06 23:31 
GeneralRe: KeyBoard hook Doubt Pin
_anil_19-Sep-06 23:40
_anil_19-Sep-06 23:40 
Thanks for your quick response
I have not done much but still you can check the code

This is the code from the dll Just have 3 function now
Install Uninstall and the global Keyboar procedure.

<br />
LRESULT CKeyHook::InstallKeyHook()<br />
{ <br />
	g_hHook = ::SetWindowsHookEx(WH_KEYBOARD, KeyboardProc, AfxGetInstanceHandle(), 0);<br />
	return( KH_OK );<br />
}<br />
<br />
LRESULT CKeyHook::UninstallKeyHook()<br />
{<br />
	::UnhookWindowsHookEx(g_hHook);<br />
	return( KH_OK );<br />
}<br />
<br />
LRESULT CALLBACK KeyboardProc(INT nCode, WPARAM wParam, LPARAM lParam)<br />
{	<br />
        switch (nCode)<br />
	{<br />
	case HC_ACTION:<br />
		{<br />
			// Disable All<br />
			return 1;<br />
		}<br />
	}<br />
	return ::CallNextHookEx(g_hHook, nCode, wParam, lParam);	<br />
}<br />


The test application just call InstallKeyHookin InitDialog
and UnInstallKeyHook in OnClose.




Regards
Anil

GeneralRe: KeyBoard hook Doubt Pin
Naveen19-Sep-06 23:55
Naveen19-Sep-06 23:55 
GeneralRe: KeyBoard hook Doubt Pin
_anil_20-Sep-06 0:02
_anil_20-Sep-06 0:02 
GeneralRe: KeyBoard hook Doubt Pin
Naveen20-Sep-06 2:11
Naveen20-Sep-06 2:11 
Questionedit control how to get deleted text Pin
harsha_123419-Sep-06 22:37
harsha_123419-Sep-06 22:37 
AnswerRe: edit control how to get deleted text Pin
Rinu_Raj19-Sep-06 22:46
Rinu_Raj19-Sep-06 22:46 
GeneralRe: edit control how to get deleted text Pin
harsha_123419-Sep-06 22:55
harsha_123419-Sep-06 22:55 
GeneralRe: edit control how to get deleted text Pin
Rinu_Raj19-Sep-06 23:08
Rinu_Raj19-Sep-06 23:08 
AnswerRe: edit control how to get deleted text Pin
toxcct19-Sep-06 22:48
toxcct19-Sep-06 22:48 
QuestionHow to display CStatic Pin
gomez_a19-Sep-06 22:33
gomez_a19-Sep-06 22:33 
AnswerRe: How to display CStatic Pin
Rinu_Raj19-Sep-06 22:39
Rinu_Raj19-Sep-06 22:39 
GeneralRe: How to display CStatic Pin
gomez_a19-Sep-06 23:58
gomez_a19-Sep-06 23:58 
AnswerRe: How to display CStatic Pin
Rinu_Raj20-Sep-06 0:03
Rinu_Raj20-Sep-06 0:03 
GeneralRe: How to display CStatic Pin
gomez_a20-Sep-06 1:19
gomez_a20-Sep-06 1:19 
GeneralRe: How to display CStatic Pin
Rinu_Raj20-Sep-06 1:49
Rinu_Raj20-Sep-06 1:49 
GeneralRe: How to display CStatic Pin
gomez_a20-Sep-06 2:34
gomez_a20-Sep-06 2:34 
GeneralRe: How to display CStatic Pin
David Crow20-Sep-06 2:53
David Crow20-Sep-06 2:53 
QuestionRe: How to display CStatic Pin
David Crow20-Sep-06 2:56
David Crow20-Sep-06 2:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.