
Tabbing in MDI Child Windows
Hi there
I am writing an application that uses mdi child windows as data entry
forms - that is to say each of my data entry windows are derived from
CMDIChildWnd.
I want to be able to catch the enter and tab presses so that i can
move the focus to the next window in my group.
I can see two ways to do this:
1.) subclass CEdit, CComboBox, CDateTimeCtrl and catch the WM_KEYDOWN
messages. I am trying this at the moment:
void CMjlEdit::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
// TODO: Add your message handler code here and/or call default
GetParent()->SendMessage(MY_MSG_ENTERPRESSED, 0, (LPARAM)this);
CEdit::OnKeyDown(nChar, nRepCnt, nFlags);
Quote:
}
2.) implement an accelerator somehow so that the tab key has a message
generated. when i coded a similar problem in win32 c, that is how i
did it.
What is the best way to do what i want? Is there another way?
Thanks
Matthew Luckie