Keyboard and Mouse customization
|
The BCGControlBar Library framework allows to implement full keyboard and mouse customization. The keyboard and mouse customization features are handled by the CBCGPToolbarCustomize class. An object of this class is a property sheet, that contains "Keyboard" and "Mouse" pages among other customization pages. Take a look at the pictures of "Keyboard" and "Mouse" property pages: The keyboard customization allows to assign various keyboard shortcuts to the application commands. These shortcuts are maintained in accelerator tables. BCGControlBar framework automatically supports multiple accelerator tables used with document templates. To take advantage of the keyboard customization just call the CBCGPWorkspace::InitKeyboardManager function from InitInstance . It creates the global CBCGPKeyboardManager object. When you instantiate the CBCGPToolbarCustomize customization dialog, it checks, whether the keyboard manager does exist or not, and inserts the "Keyboard" property page, if it does.
The mouse customization allows to associate double-click events (for views only!) with the application commands. For example, user can define that "Undo" command should be executed when he/she double clicks the left mouse button over the specified view. To include the mouse customization you should perform the following steps:
Note. You can get access to the keyboard and mouse managers everywhere in the application by calling CBCGPWorkspace::GetKeyboardManager and CBCGPWorkspace::GetMouseManager. |

