Julia Dudascik (Contractor)
2017-01-11 19:25:20 UTC
Hi,
I would like to add a HotKey in my Main Window. When the user presses the
button Ctl+Q (Control Q), I would like the application to exit. In the
constructor where I create my window, I did the following:
FXHotKey test = parseHotKey("Ctl-Q")
this->addHotKey(test)
this->accelTable->addAccel(test, this, ID_TEST_HOTKEY)
Then in FXMAPFUNC, I define:
FXMAPFUNC(SeL_KEYPRESS, MyClass::ID_TEST_HOTKEY, MyClass::test_hot_keyFunc),
When I pres Control Q, the application never gets to my function
test_hot_keyFunc.
Did I define the hotkey correctly for Control q?
How do you set-up a hot key for a window, so that the user can quit the
application
with the command Ctl-Q in the main window?
This is just one instance on shortcuts I would like my "Main Window" to
have. For instance, I would also like to save the database with the command
Ctl+S. I am first trying to figure out how to add a hot key to a window
before proceeding, Any assistance would be greatly appreciated.
Thank you
Julia
I would like to add a HotKey in my Main Window. When the user presses the
button Ctl+Q (Control Q), I would like the application to exit. In the
constructor where I create my window, I did the following:
FXHotKey test = parseHotKey("Ctl-Q")
this->addHotKey(test)
this->accelTable->addAccel(test, this, ID_TEST_HOTKEY)
Then in FXMAPFUNC, I define:
FXMAPFUNC(SeL_KEYPRESS, MyClass::ID_TEST_HOTKEY, MyClass::test_hot_keyFunc),
When I pres Control Q, the application never gets to my function
test_hot_keyFunc.
Did I define the hotkey correctly for Control q?
How do you set-up a hot key for a window, so that the user can quit the
application
with the command Ctl-Q in the main window?
This is just one instance on shortcuts I would like my "Main Window" to
have. For instance, I would also like to save the database with the command
Ctl+S. I am first trying to figure out how to add a hot key to a window
before proceeding, Any assistance would be greatly appreciated.
Thank you
Julia