I know this one is WAY out pushing the envelope, but I'd like to know
if anyone has any ideas about it.
We have a behemoth of a legacy MFC application which is now being
embedded in a Windows Forms application (using VS 2005). It took some
substantial out of the box thinking to make this work, but by and large
it is working. There is one behavior, however, which we haven't quite
solved yet.
For some strange reason, we are having some significant focus
management problems. When we bring up the application, no part of the
application seems to have the focus. If we use the mouse to activate
the application, everything seems to operate correctly, but if we bring
up a modal dialog box, the dialog box receives and manages the focus
correctly, but once it is dismissed, the focus does not return to the
application window. It seems to return to the tab control, since the
arrow keys navigate the tabs, but the controls in the legacy
application cannot be reached using the keyboard.
Interestingly, modules written in C# using windows forms controls do
not display this behavior. I haven't been able to find anything in the
window management or window styles to explain this. Can anyone out
there shed any light on this?
Andrew Raymond
3RaymondResearch.com
--------------------------------------------------------------------------------
MCAD .NET