|
|
|
|
Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
John Ritzenthaler
|
Aug 31, 2010 - 3:12 PM
|
I have a complex control inside a CExtResizableDialog. When this control has the focus, I use the tab key to navigate inside of it. This works fine inside a CDialog. But inside CExtResizableDialog, I’m not getting any OnKey or OnChar events for VK_TAB. Instead the dialog is moving the focus to another control in the dialog. The control returns DLGC_WANT_ALL_KEYS for OnGetDlgCode()
Is there any way to override this?
|
|
John Ritzenthaler
|
Sep 1, 2010 - 10:41 AM
|
Can you direct me to some place I could set a breakpoint and see if I can determine what’s happening?
|
|
Technical Support
|
Sep 2, 2010 - 11:12 AM
|
The CExtResizableDialog::PreTranslateMessage() method handles VK_TAB key pressing and invokes the CExtResizableDialog::stat_GetNextItemZ() method for searching for the next dialog item to focus.
|
|
Technical Support
|
Sep 1, 2010 - 7:19 AM
|
The CExtResizableDialog class uses a VK_TAB key processing code based on thread wide hooks. It is written from scratch. We tried to make this algorithm working exactly like the default dialog’s algorithm. It sends WM_GETDLGCODE messages to dialog controls and analyzes WS_TABSTOP , DS_CONTROL , WS_VISIBLE , WS_DISABLED and WS_EX_CONTROLPARENT styles (see the CExtResizableDialog::stat_GetNextItemZ() method’s source code). We carefully tested this algorithm and it worked like the standard dialog’s algorithm. We had to code it because the standard algorithm does not work with owner-draw skinned button controls like CExtButton , CExtCheckBox , CExtRadioButton and CExtHyperLinkButton . We had several issue reports about this algorithm more than year ago just when it appeared in Prof-UIS. All of them were fixed and nobody reported any new issues. So, it would be very interesting to re-check this algorithm and fix it if needed. Please provide us with more details or, even better, with some test project reproducing this issue.
|
|
John Ritzenthaler
|
Sep 3, 2010 - 2:37 PM
|
Turns out your logic onlty checks for DLGC_WANT_TAB. I had used DLGC_WANTALLKEYS, thinking that ALL keys would include VK_TAB. The Windows documentation is pretty ambiguous. Anyway, I OR’ed together all the flags and everything’s working fine. Thanks for your help.
|
|