Click here to Skip to main content
15,917,862 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Can I call the open folder dialog directly? Pin
BarryOg20-Sep-06 0:59
BarryOg20-Sep-06 0:59 
AnswerRe: Can I call the open folder dialog directly? Pin
Haroon Sarwar20-Sep-06 1:27
Haroon Sarwar20-Sep-06 1:27 
GeneralRe: Can I call the open folder dialog directly? Pin
BarryOg20-Sep-06 2:01
BarryOg20-Sep-06 2:01 
QuestionProfiling help request. Pin
cpp_prgmer20-Sep-06 0:33
cpp_prgmer20-Sep-06 0:33 
AnswerRe: Profiling help request. Pin
Dave Kerr20-Sep-06 1:12
Dave Kerr20-Sep-06 1:12 
GeneralRe: Profiling help request. Pin
cpp_prgmer20-Sep-06 1:21
cpp_prgmer20-Sep-06 1:21 
Questionconnecting client to server Pin
Muhammad Azeem Azam20-Sep-06 0:03
Muhammad Azeem Azam20-Sep-06 0:03 
AnswerRe: connecting client to server Pin
saania khan21-Sep-06 19:20
saania khan21-Sep-06 19:20 
GeneralRe: connecting client to server Pin
Muhammad Azeem Azam21-Sep-06 21:39
Muhammad Azeem Azam21-Sep-06 21:39 
GeneralRe: connecting client to server Pin
Muhammad Azeem Azam21-Sep-06 21:50
Muhammad Azeem Azam21-Sep-06 21:50 
QuestionHow to color the splitterbar Pin
kiranin19-Sep-06 23:44
kiranin19-Sep-06 23:44 
QuestionCollapsable 3D Studio-esque menu system Pin
Graham Reeds19-Sep-06 23:37
Graham Reeds19-Sep-06 23:37 
AnswerRe: Collapsable 3D Studio-esque menu system Pin
Graham Reeds20-Sep-06 4:58
Graham Reeds20-Sep-06 4:58 
AnswerRe: Collapsable 3D Studio-esque menu system Pin
Hamid_RT20-Sep-06 7:38
Hamid_RT20-Sep-06 7:38 
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 

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.