Click here to Skip to main content
13,258,269 members (39,794 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I am using the CMfcBrowseEditCtrl on an ActiveX control property page. The property page base class is COleProperty page.

The ALT+Down and ALT+Right key combos (VK_DOWN or VK_RIGHT) are handled in the CMfcBrowseEditCtrl::PreTranslateMsg method in response to a WM_SYSKEYDOWN message. The response is to invoke the virtual OnBrowse method.

At any rate, in this scenario, the PreTranslateMsg is not being called when the down or right arrows are pressed, so the OnBrowse method is never called.

I have used the CMfcBrowseEdit control on CPropertyPage derived classes with no trouble.

Thanks in advance for you reply.
Posted 21-Apr-11 14:56pm
Updated 21-Apr-11 20:05pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Try this: catch WM_KEYDOWN in PreTranslateMessage() and check for an arrow key. Then, check if the ALT key is pressed:
    if (GetAsyncKeyState(VK_MENU) < 0)
        // ALT + arrow key
Randy Garacci 22-Apr-11 14:06pm
Thank you for the reply. Unfortunately, PreTranslateMessage() does not get called for that message either. As a matter of fact, I only get a call to PreTranslateMessage with a WM_PAINT (0x000f) message when the button is clicked with the mouse.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.171114.1 | Last Updated 22 Apr 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100