
WM_MOUSEACTIVATE capture in MDI
Hi Ajay,
Thanks for the response, I tried debugging my code by putting some
breakpoints, it seems like in my application, OnMouseActivate() is always
getting called after calling MDIActivation() by the system. Still I couldn't
figure out why.
Thanks,
Saman
Quote:
> Take a look at code in winmdi.cpp for the following two methods:
> BOOL CMDIChildWnd::OnNcActivate(BOOL bActive)
> int CMDIChildWnd::OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT
> message)
> That should help you. Although overriding OnMDIActivate is the way to
> intercept MDIActivation (or deactivation). You would not need this if you
> want to differentiate between mouse activation or activation thru some
other
> means.
> --
> Ajay Kalra [MVP - VC++]
> > Hi All,
> > I have a MDI application. I need to figure out a way to identfy a
> > situation when a MDI child window is activated (brought to front) by
mouse
> > clicking on it.
> > E.G.
> > Say there are 2 MDI child windows wnd1 and wnd2
> > At a given time if wnd1 is active and wnd2 is in the background, if the
> user
> > clicks on wnd2 to get it to front then I need to captue that event.
> > I tried using OnMouseActivate() method in the MDI child window, but
it
> > keeps getting called even when the user clicks on it while it is the MDI
> > active child. My need is to isolate the MDIActivate() call happenning
only
> > when the mouse is clicked.
> > Thank You,
> > Saman