ACCEL ATTACH

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Modules > UI (User Interface) > MENUs >

ACCEL ATTACH

 

Description

 

Attach a table of keyboard accelerators to a dialog

 

Syntax

 

ACCEL ATTACH hDlg, AccelTbl() TO hAccelHandle

 

or

 

hAccelHandle = ACCEL ATTACH hDlg, AccelTbl()

 

Returns

 

None

 

Parameters

 

Name

Type

Optional

Meaning

hDlg

Number

No

Handle of the target dialog

AccelTbl

UDT

No

array of ACCELAPI UDTs

hAccelHandle

Variable

No

Double-word or Long-integer variable where the handle of the attached accelerator table will be stored, or zero if the attach operation was unsuccessful.

 

Remarks

 

Restrictions

 

See also

 

Examples

 

'---Define 2 accelerators

Local AccelTable(2) As ACCELAPI

Local hAccel        As DWord

 

...

 

'---Fill accelerators data

AccelTable(1).fvirt = %FVIRTKEY Or %FCONTROL

AccelTable(1).key   = %VK_A

AccelTable(1).cmd   =  %ID_ABOUT

 

AccelTable(2).fvirt = %FVIRTKEY

AccelTable(2).key   = %VK_F1

AccelTable(2).cmd   =  %ID_HELP

    

...

 

'---Connect accelerator table to Window handle

ACCEL Attach hDlg, AccelTable() To hAccel

 

...