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

  • SEARCH
  • Home
  • 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

In WPF we have Window.ShowDialog() which allows showing a modal dialog box. In WinForms
i have a dialog box that opens on pageload for a site. script type=text/javascript>
I have a dialog box with controls that is popped up and when a
I have the following Jquery that returns values from a dialog Box and fills
I have a JInternalFrame window that needs to popup a modal dialog box when
I have a datagrid column with a button that opens a modal dialog box
I'm coding an MFC application in which i have a dialog box with multiple
I have a jQuery dialog box that opens and then an AJAX call is
I have a dialog box in which there are tabs. In one of the
I have a mobile web app that displays a dialog box within a position:

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.