Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Making Edit control in dialog receive Tab keystrokes

70 views
Skip to first unread message

David Liebtag

unread,
Jun 5, 2003, 9:33:17 PM6/5/03
to
I have a dialog containing an Edit control. My message pump uses
IsDialogMessage to process dialog navigation messages. However, I want the
edit control to receive Tab keystrokes. I subclassed the edit control and
or'ed DLGC_WANTTAB with the control's window procedure's result for
WM_GETDLGCODE. The Edit control is still not receiving Tab keystrokes.

Does anyone know how to make an edit control in a dialog receive Tab
keystrokes?

Thank you.

David Liebtag


Jeff Partch

unread,
Jun 5, 2003, 10:09:42 PM6/5/03
to
"David Liebtag" <DavidL...@sonic.net> wrote in message
news:xbSDa.370$%3.2...@typhoon.sonic.net...

Yeah, I think I do. The trick is: in your WM_GETDLGCODE handler to not
let the edit class WindowProc even see the message if the
(LPMSG)(LPARAM) is WM_KEYDOWN/VK_TAB. Just return the appropriate flags
directly (DLGC_WANTARROWS|DLGC_WANTCHARS|DLGC_WANTTAB, I think). IIRC,
this is only necessary for ES_MULTILINE style edits. Oh, and before you
get too deep into it, the built-in mechanism is to use [Shift+]Ctrl+Tab
I believe.
--
Jeff Partch [VC++ MVP]


David Liebtag

unread,
Jun 5, 2003, 10:26:36 PM6/5/03
to
Thanks a lot Jeff. I didn't know about Ctrl+Tab. Maybe my customer will be
satisfied with that.

David


0 new messages