MDI child not being activated
Jeff S. Shanholtz -- jeffshan@flash.net
Tuesday, March 04, 1997
Environment : VC++ 1.52c, Win 95 B
I've got an mdi app which uses a CFormView with some wierd behavior. If =
I've got 2 CFormView mdi children up (tiled), I can activate each one by =
ctrl-tabbing between them or clicking on most anywhere on each of the =
forms. I get an OnMDIActivate in my derived CMDIChildWnd class and the =
child's title bar shows that it is activated. However, if I click on a =
form's edit box in an attempt to change the active child window, the =
edit box gets the input focus (caret and all), but I get no =
OnMDIActivate in my CMDIChildWnd class nor does the child's title bar =
reflect activation.
Anyone have any clue what might cause this?
Jeff Shanholtz
Enertech Consultants
DFPav@aol.com
Wednesday, March 05, 1997
[Mini-digest: 2 responses]
In a message dated 97-03-05 00:10:49 EST, you write:
> Environment : VC++ 1.52c, Win 95 B
>
> I've got an mdi app which uses a CFormView with some wierd behavior. If
I've
> got 2 CFormView mdi children up (tiled), I can activate each one by ctrl-
> tabbing between them or clicking on most anywhere on each of the forms. I
get
> an OnMDIActivate in my derived CMDIChildWnd class and the child's title bar
> shows that it is activated. However, if I click on a form's edit box in an
> attempt to change the active child window, the edit box gets the input
focus (
> caret and all), but I get no OnMDIActivate in my CMDIChildWnd class nor
does
> the child's title bar reflect activation.
>
> Anyone have any clue what might cause this?
>
> Jeff Shanholtz
> Enertech Consultants
>
Jeff:
I am also using VC++1.52 on Win 95 and tried the same thing on one of my
apps.
When I have 2 tiled MDI children. If I click on an edit control it doesn't
activate the
child. But if I click on a radio button or any other control, it does. I
have no idea
what causes it but I get the same problem.
Dan
-----From: Zafir Anjum
I have noticed this problem with Rich Edit Controls and Tree Controls.
For Edit Controls I overrode the OnCommand function in my form view.
Here it is
BOOL CDataView::OnCommand(WPARAM wParam, LPARAM lParam)
{
if( HIWORD(wParam) == EN_SETFOCUS )
{
((CMDIChildWnd*)(GetParentFrame()))->GetMDIFrame()->MDIActivate(
GetParentFrame() );
}
return CFormView::OnCommand(wParam, lParam);
}
Zafir
At 09:10 AM 3/4/97 -0800, you wrote:
>Environment : VC++ 1.52c, Win 95 B
>
>I've got an mdi app which uses a CFormView with some wierd behavior. If
I've got 2 CFormView mdi children up (tiled), I can activate each one by
ctrl-tabbing between them or clicking on most anywhere on each of the forms.
I get an OnMDIActivate in my derived CMDIChildWnd class and the child's
title bar shows that it is activated. However, if I click on a form's edit
box in an attempt to change the active child window, the edit box gets the
input focus (caret and all), but I get no OnMDIActivate in my CMDIChildWnd
class nor does the child's title bar reflect activation.
>
>Anyone have any clue what might cause this?
>
>Jeff Shanholtz
>Enertech Consultants
>
Become an MFC-L member
| Вернуться в корень Архива
|