I have an MDI application that I'm making behave in a way an
MDI app was never intended to behave.
What could go wrong? :)
I could fill a page describing what I'm trying to do, but it
breaks down to building my own desktop inside of an MDI frame.
This means maintaining multiple parent-modal child relationships,
let's call them tasks. As is described in Google's archives for
this group, having a child disable it's parent is a common
method to maintain a parent-modal child relationship among the
children of an MDI frame.
A stack is built with the handles of each MDI child and
DeferWindowPos() is used to place the window to be active
and in focus at the top of the Z order. I use
EnableWindow(, TRUE) followed immediately by SetFocus() to
bring the MDI child into focus.
This works almost perfectly. But in certain, repeatable,
situations the window is enabled, but doesn't receive focus,
with the darker blue frame.
I write entries to a log and it shows a WM_SETFOCUS is
received by the MDI child. No WM_KILLFOCUS is received, so
why doesn't this top of the Z order MDI child window have
focus?
Thanks
Larry
> I write entries to a log and it shows a WM_SETFOCUS is
> received by the MDI child. No WM_KILLFOCUS is received, so
> why doesn't this top of the Z order MDI child window have
> focus?
Make when the MDI child window is activated that you do
a SetFocus call to give the focus to the client window
of the MDI child window (i.e the window inside the frame of
the MDI child window).
Jussi Jumppanen
Author: Zeus for Windows IDE
http://www.zeusedit.com