How can i access Arrow keys in MFC

Hi,

 How can i acess the arrow keys events in MFC. I am working with dialog based application.

thanking you

Vihar
vihar123Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Amritpal SinghCommented:
u can use GetAsyncKeyState() and pass the scan codes of keys

0
Amritpal SinghCommented:
i.e
GetAsyncKeyState(VK_DOWN)
GetAsyncKeyState(VK_UP)
etc.
0
vihar123Author Commented:
Thank you for your reply.
if i press down arrow,  i am not getting any message to "nChar" from OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)  function.  If i want to use arrow keys, is there any need to write extra code?

Vihar
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Amritpal SinghCommented:
are u using Cedit control??
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Amritpal SinghCommented:
n e ways ,have  a look at the article
support.microsoft.com/support/kb/articles/Q104/6/37.asp
0
vihar123Author Commented:
No i am not using CEdit Control. I have picture control on my dialog.

Thank you.

Vihar
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.