Solved

Hooks for VK_APPS

Posted on 2006-11-21
2
1,074 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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. …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

726 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