PRB: Focus Problem Using MFC Control on MDI Child Form (197503)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q197503 SYMPTOMS
You put controls created in Visual C++ using the Microsoft Foundation
Classes (MFC) on a multiple-document interface (MDI) child form.
Additionally, you have some non-MFC controls on the MDI form (parent). You
find that after you click the MFC control on the child form, click one of
the non-MFC controls on the MDI form and then press the tab key, the focus
moves to another control on the child form instead of the MDI form.
This behavior also occurs in similar situations where the project consists
of child and parent forms with MFC controls used on at least one of the
forms.
CAUSE
When you click the MFC control, the control is UIActivated in the
container. However, when you click another non-MFC control on another form,
the container does not UIDeactivate the MFC control automatically.
RESOLUTION
To resolve the problem, UIDeactivate the control when it loses the focus.
STATUS
This behavior is by design.
REFERENCES
For other problems related to using the MFC controls in MDI forms, please
see the following articles in the Microsoft Knowledge Base:
192347
PRB: Focus/Activation Problems with MFC Control on VB Forms
197504
PRB: KeyPress Problem When Using MFC Control on MDI Child
Form
Modification Type: | Major | Last Reviewed: | 5/12/2003 |
---|
Keywords: | kbCtrlCreate kbprb KB197503 |
---|
|