Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 59589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T18:01:44+00:00 2026-05-10T18:01:44+00:00

I have a dialog box that allows users to set hotkeys for use in

  • 0

I have a dialog box that allows users to set hotkeys for use in a 3d program on windows. I’m using CHotKeyCtrl, which is pretty good, but doesn’t handle some keys that the users would like to use – specifically, tab and space.

The hotkey handling is smart enough to be able to fire on those keys, I just need a UI to let them be set. A control similar to CHotKeyCtrl would be ideal, but other workarounds are also appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T18:01:45+00:00Added an answer on May 10, 2026 at 6:01 pm

    One workarounds option would be to use a stock standard edit control with a message hook function.

    This would allow you to trap the keyboard WM_KEYDOWN messages sent to that edit control.

    The hook function would look something like this:

        LRESULT CALLBACK MessageHook(int code, WPARAM wParam, LPMSG lpMsg)     {       LRESULT lResult = 0;        if ((code >= 0) && (code == MSGF_DIALOGBOX))       {         if (lpMsg->message == WM_KEYDOWN)         {           //-- process the key down message           lResult = 1;         }       }        // do default processing if required       if (lResult == 0)       {         lResult = CallNextHookEx(MessageFilterHook, code, wParam, (LPARAM)lpMsg);       }        return lResult;     } 

    The hook can then be attached to edit control when the edit control gets focus as follows:

        //-- create an instance thunk for our hook callback     FARPROC FilterProc = (FARPROC) MakeProcInstance((HOOKPROC)(MessageHook),                                                     hInstance);     //-- attach the message hook     FilterHook = SetWindowsHookEx(WH_MSGFILTER,                                   (HOOKPROC)FilterProc,                                    hInstance, GetCurrentThreadId()); 

    and removed when the edit control when looses focus as follows:

        //-- remove a message hook     UnhookWindowsHookEx(MessageFilterHook); 

    Using this approach every key press will be sent to the hook, provided the edit control has focus.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a v simple dialog box that I would like to display as
I have a problem with the jquery-ui dialog box . The problem is that
Anyone have any experience creating a modal dialog box using AJAX and ASP.NET MVC?
Whenever I use the signal/slot editor dialog box, I have to choose from the
I have a dialog that resizes. It also has a custom background which I
I have a MFC dialog with 32 CComboBoxes on it that all have the
I have a dialog where each entry in a JTree has its corresponding options
I have a dialog in MFC with a CStatusBar. In a separate thread, I
I have a UI-dialog something like this: You must choose a book from a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.