Solved

Hooks for VK_APPS

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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 tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

759 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

24 Experts available now in Live!

Get 1:1 Help Now