Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 241
  • Last Modified:

Keboard Hook Dll problem urgent

I have done a keyboard hook and in my callback function i have to check for
each character

if (wParam >= VK_NUMPAD0 && wParam <= VK_NUMPAD9)
then it is checking correctly for numeric keypad nos

but if i want to check for

if (wParam ==VK_A)
then it is giving an error
undeclared indentifier vk_A
but i havent declared for vk_numpad0 but it is working
i appreciate somebody can write a funciton like

switch (wParam)
                              {
case VK_1:
      MessageBox(NULL, "VK_1", "testing", MB_OK ) ;
      break;
case VK_2:
      MessageBox(NULL, "VK_2", "testing", MB_OK ) ;
      break;
case VK_3:
      MessageBox(NULL, "VK_3", "testing", MB_OK ) ;
      break;

where i can pop up the message while testing the application.

Thanks in advance

 
0
vimalpercy
Asked:
vimalpercy
  • 3
  • 3
1 Solution
 
AlexFMCommented:
From Winuser.h:

VK_0 - VK_9 are the same as ASCII '0' - '9' (0x30 - 0x39)
0x40 : unassigned
VK_A - VK_Z are the same as ASCII 'A' - 'Z' (0x41 - 0x5A)

So, instead of VK_1 use '1' etc.
0
 
vimalpercyAuthor Commented:
Hai Alex
  I got the answer from codeguru and so i cant award you the marks.
 Any way thanks for the answer

It is like this

 If (Wparm= 'A')
{do some process}
else  if (Wparm= 'B')
{do some process}

This is the accepted answer
0
 
vimalpercyAuthor Commented:
i want to delete this question and want a refund of my points
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
AlexFMCommented:
It is not 100% correct to write "I found the same answer" 20 hours after getting the answer in EE. I have no objections but I hope this is not your usual way to ask questions.
0
 
vimalpercyAuthor Commented:
I am sorry Alex ,i am very low in points and i guarantee this is not the way i ask question.
I have asked so many questions in this forum but all are open for still i dont have the answer.
Only for this one i had the answer but i got the answer immidietly from codeproject.
so  sorry for this and thank you very much for your reply.

Thanks and regards
vimal
0
 
AlexFMCommented:
No problem :-)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now