Click here to Skip to main content
15,895,423 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Interprocess Comunication Using Events Pin
Sarath C6-Oct-08 17:22
Sarath C6-Oct-08 17:22 
GeneralRe: Interprocess Comunication Using Events Pin
ForNow6-Oct-08 19:44
ForNow6-Oct-08 19:44 
GeneralRe: Interprocess Comunication Using Events Pin
ForNow9-Oct-08 20:29
ForNow9-Oct-08 20:29 
GeneralRe: Interprocess Comunication Using Events Pin
Sarath C13-Oct-08 1:00
Sarath C13-Oct-08 1:00 
GeneralRe: Interprocess Comunication Using Events Pin
ForNow13-Oct-08 4:09
ForNow13-Oct-08 4:09 
Question[Message Deleted] Pin
flustarter5-Oct-08 11:45
flustarter5-Oct-08 11:45 
AnswerRe: Please help!!!! with 2 Dimensional array setup!!!! Pin
Garth J Lancaster5-Oct-08 12:45
professionalGarth J Lancaster5-Oct-08 12:45 
QuestionLL_KEYBOARD hook problem Pin
hxhl955-Oct-08 8:24
hxhl955-Oct-08 8:24 
Hey everyone,

I've been getting some rather interesting results from my LL_KEYBOARD hook recently. Here is my code:

LRESULT CALLBACK LowLevelKeyboardProc (INT nCode, WPARAM wParam, LPARAM lParam)
{
	if (nCode < 0 || nCode != HC_ACTION)
		return CallNextHookEx( hKeyboardHook, nCode, wParam, lParam);

	KBDLLHOOKSTRUCT* p = (KBDLLHOOKSTRUCT*)lParam;
	char logchar=(char)p->vkCode;


It was working fine for a week, but I was adding KEYUP detection for the Ctrl, Alt, and Shift keys when it started giving me unexpected results.

The problem is that when I press the Ctrl key, logchar is equal to -72. I'm surprised by that, since I'm pretty sure the vkCode for the control key is 0x11. Because of this, I'm not detecting the Ctrl keypress, and ToAscii outputs the value for the ctrl key incorrectly. (It's outputting something that looks like a cent sign. If someone could explain why ToAscii accepts -72 as a valid vkcode that would also be appreciated)

The same problem occurs with any non-character key (except for space).

If anyone has any ideas on this I would highly appreciate it.

Thanks in advance. Smile | :)
AnswerRe: LL_KEYBOARD hook problem Pin
PJ Arends5-Oct-08 11:24
professionalPJ Arends5-Oct-08 11:24 
GeneralRe: LL_KEYBOARD hook problem Pin
hxhl955-Oct-08 14:16
hxhl955-Oct-08 14:16 
GeneralRe: LL_KEYBOARD hook problem Pin
PJ Arends5-Oct-08 16:56
professionalPJ Arends5-Oct-08 16:56 
GeneralRe: LL_KEYBOARD hook problem Pin
hxhl956-Oct-08 7:10
hxhl956-Oct-08 7:10 
QuestionSockets - Roughly, how many clients can a server handle for gaming purposes Pin
simon alec smith5-Oct-08 7:15
simon alec smith5-Oct-08 7:15 
AnswerRe: Sockets - Roughly, how many clients can a server handle for gaming purposes Pin
cmk5-Oct-08 16:26
cmk5-Oct-08 16:26 
AnswerRe: Sockets - Roughly, how many clients can a server handle for gaming purposes Pin
Moak6-Oct-08 23:18
Moak6-Oct-08 23:18 
QuestionCFormView looses title on losing focus Pin
bxveer5-Oct-08 3:44
bxveer5-Oct-08 3:44 
QuestionCSplitterWnd Pin
john56325-Oct-08 3:36
john56325-Oct-08 3:36 
AnswerRe: CSplitterWnd Pin
PJ Arends5-Oct-08 11:19
professionalPJ Arends5-Oct-08 11:19 
AnswerRe: CSplitterWnd Pin
Hamid_RT6-Oct-08 1:56
Hamid_RT6-Oct-08 1:56 
Questionpoi command error? Pin
George_George5-Oct-08 2:06
George_George5-Oct-08 2:06 
Questionname decoration issue in DLL Pin
George_George5-Oct-08 0:54
George_George5-Oct-08 0:54 
AnswerRe: name decoration issue in DLL Pin
cmk5-Oct-08 2:05
cmk5-Oct-08 2:05 
GeneralRe: name decoration issue in DLL Pin
George_George5-Oct-08 2:49
George_George5-Oct-08 2:49 
GeneralRe: name decoration issue in DLL Pin
cmk5-Oct-08 3:46
cmk5-Oct-08 3:46 
GeneralRe: name decoration issue in DLL Pin
George_George5-Oct-08 21:05
George_George5-Oct-08 21:05 

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.