Solved

Hooks for VK_APPS

Posted on 2006-11-21
2
1,049 Views
Last Modified: 2013-11-20
Hi All..

I have a dialog with many controls. I need to block pop-up menu due to key press from keyboard.(VK_APPS).
 
If i have the focus on some control and if i press the windows menu key, I investigated(using Spy ++) that the dialog directly doesnt receive this command.

The dialog receives WM_COMMAND from control(eg.ComboBox) which had focus. This way Iam not able to get the hook. I tried using GetMsgProc and GetKeyBoardProc but i was not able to block the menu from poping up.

please help me in this matter.

-Yateesh
0
Comment
Question by:yateesh
2 Comments
 
LVL 22

Accepted Solution

by:
mahesh1402 earned 125 total points
ID: 17986094
>>if i press the windows menu key, I investigated(using Spy ++) that the dialog directly doesnt receive this command.

When the context menu key (the right windows key) is pressed, a WM_CONTEXTMENU message is sent to the window independently of the keyboard event. This is the reason why it doesn't work to trap the key alone.

However You can trap and ignore WM_CONTEXTMENU using a 'Message Hook' .

-MAHESH
0
 

Author Comment

by:yateesh
ID: 17986329
Thanks a lot....
Mahesh
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
Include multiple hostnames in this command? 3 53
Define unique primary key 9 89
if loop in java 3 129
zeroFront challenge 7 80
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

911 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

19 Experts available now in Live!

Get 1:1 Help Now