IonicWind Software

IWBasic => General Questions => Topic started by: Brian on July 28, 2013, 04:10:38 AM

Title: Accelerator Keys
Post by: Brian on July 28, 2013, 04:10:38 AM
Hi,

If you have a menu item, ie, Control P to print a file, you can have an accelerator, thus:
ADDACCELERATOR win,@FCONTROL|@FVIRTKEY,ASC("P"),100
(the control number points to the menu item)

Now what if you also have a button that serves the same function? If you put in a line like:
ADDACCELERATOR win,@FCONTROL|@FVIRTKEY,ASC("P"),200
(the control number points to the button)

Which control is it going to pick up - will there be a mismatch problem? How do we know
which control number is going to be used? How do we get round this?

Brian
Title: Re: Accelerator Keys
Post by: LarryMc on July 28, 2013, 10:55:42 AM
From everything that I read ADDACCELERATOR is only for menu items

accelerators are handled through
case @idmenupick
select @menunum

controls are processed through
case @idcontrol
select @controlid