Announcement

Collapse

New Sub-Forum

In an effort to help make sure there are appropriate categories for topics of discussion that are happening, there is now a sub-forum for databases and database programming under Special Interest groups. Please direct questions, etc., about this topic to that sub-forum moving forward. Thank you.
See more
See less

Toolbar Accelerator Keys?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Toolbar Accelerator Keys?

    Can it be done?

  • #2
    If you mean associate an accelerator key with a toolbar button function, yes.

    Inside your callback procedure, where you process the accelerator key, add your toolbar button ID to that same case, and it should work.

    Example:

    Shortcut key Ctrl+C is associated with button %IDC_TOOLBAR_CALCULATE.

    Code:
    SELECT CASE AS LONG CBMSG
        CASE %WM_COMMAND
            SELECT CASE CBCTL
                CASE %IDC_TOOLBAR_CALCULATE, %IDA_CTRLC
                    ' Code here should fire for both situations
            END SELECT
    END SELECT
    Adam Drake
    Drake Software

    Comment


    • #3
      Thanks, I'll give it a try and report the results.
      Bob Mechler

      Comment

      Working...
      X