Solved

Keboard Hook Dll problem urgent

Posted on 2003-11-26
9
233 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
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 …

757 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

17 Experts available now in Live!

Get 1:1 Help Now