Announcement

Collapse
No announcement yet.

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