License delivery maintenance is planned for Saturday, July 26, between 12:00 and 20:00 CEST. During this time, you may experience outages or limited availability across our services, including BIMcloud SaaS, License Delivery, Graphisoft ID (for customer and company management), Graphisoft Store, and BIMx Web Viewer. More details…
2019-07-31
09:31 AM
- last edited on
2022-10-04
04:25 PM
by
Daniel Kassai
2019-07-31 10:19 AM
2019-07-31 10:54 AM
2019-07-31 11:12 AM
bool <MyDialogClass>::KeyPressed (const DG::Key::Code&, DG::Item**) { // If my dialog has the focus, then don't allow ARCHICAD to handle the shortcut short focusID; DGGetFocus (DG_ALL_DIALOGS, &focusID, nullptr); if (focusID == GetId ()) { return true; } return false; }
2019-07-31 12:58 PM
Tibor wrote:Hm, unfortunately, VFB window is not an ArchiCAD dialog and we are re-using this window across plugins. I'm able to handle events for user gain/loss focus in the text field in that window. Therefore my idea was to tell ArchiCAD there to bypass the shortcuts. Is something like this possible?
Your dialog is a modeless dialog, am I right?
In this case you should inherit your dialog class from DG::LowLevelKeyboardHandler, call InstallHandler(*this) from the constructor, call RemoveHandler(*this) from the destructor and override the KeyPressed function like this:bool <MyDialogClass>::KeyPressed (const DG::Key::Code&, DG::Item**) { // If my dialog has the focus, then don't allow ARCHICAD to handle the shortcut short focusID; DGGetFocus (DG_ALL_DIALOGS, &focusID, nullptr); if (focusID == GetId ()) { return true; } return false; }
2019-08-02 11:51 AM
2019-08-02 03:58 PM