Activated and Enter events not called on MDI children

  • Thread starter Thread starter Richard Lewis Haggard
  • Start date Start date
R

Richard Lewis Haggard

I'm having trouble with the MDI activate chain of events that happen as a
result of a Ctrl+Tab event in my client's MDI application. A mouse click on
an inactive MDI child executes normally but Ctrl+Tab event processing
handling is only partially handled. The active MDI child window is changed
but this is not being reflected in the MDI parent because the Activated and
Enter events attached to the MDI children are not being called. Even though
the next MDI child has been activated by the Ctrl+Tab, the MDI parent is
unaware of the change. The application itself is pretty complicated with a
number of third party controls involved to obfuscate the issue. In Win32,
I'd simply intercept the WM_ACTIVATE or WM_MDIACTIVATE message and I suspect
that the Activated event is attached to that message. Since the MDI child is
properly changing its Z state and painting itself in a fashion consistent
with activation, I'm pretty sure that the Ctrl+Tab is being at least partly
processed. What can I do to narrow down the location of the failure or
otherwise circumvent the problem by detecting the mdi activation event
upstream?
 
Ah. Figured it out. At the time that the MDI children were created and
attached to the MDI parent, their Show method was not called. This would
have been blindingly obvious in a normal MDI application because the MDI
children would not have been painted on the screen. However, because the MDI
operations were managed by a third party supplied control, there are
deviations from standard MDI operations, one of which was that MDI children
are shown even though their Show method was not called. However, failure to
call the Show resulted in a failure of the system to recognize that MDI
children were present and needed to be handled. In any case, problem solved.
 
Back
Top