Solved

Keboard Hook Dll problem urgent

Posted on 2003-11-26
9
234 Views
Last Modified: 2010-04-17
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
Comment
Question by:vimalpercy
  • 3
  • 3
9 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 100 total points
ID: 9823998
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
 

Author Comment

by:vimalpercy
ID: 9830178
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
 

Author Comment

by:vimalpercy
ID: 10318982
i want to delete this question and want a refund of my points
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 48

Expert Comment

by:AlexFM
ID: 10319420
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
 

Author Comment

by:vimalpercy
ID: 10329393
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
 
LVL 48

Expert Comment

by:AlexFM
ID: 10329722
No problem :-)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
advertisement module in core php 4 144
creating threads in delphi 1 82
Tembedded WB animatid gifs not animated on some pcs 2 72
Modify a small python script 19 96
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This is about my first experience with programming Arduino.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now