Solved

Hooks for VK_APPS

Posted on 2006-11-21
2
1,058 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Expand LInux Boot partition remotly 3 90
Modbus - whats the maximum I can store in one register? 4 79
Thin secure Windows 10 5 93
Way to decrease size of apk file 9 65
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

805 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