> > This is the magic of MFC - if no parent is specified, the > "main window" for > > the application is automatically used. > > > > Isn't that the issue, then? He's writing a dialog to plug in to > Explorer, and every time he runs, there's a different "main window". > MFC gets its concept of a "main window" from its global > state, so unless > something in the process tells MFC to refresh its global > state, it will > have stale information.
Quite possibly - I'm afraid I can't recall the exact semantics for dialog based apps, but I suspect that a number of things in MFC will end up getting upset if the nominated main window dies but the application does not - but win32ui.GetApp().SetMainFrame() can be used to change this value dynamically. I'm afraid I haven't found the time to read the other messages in enough detail to offer more concrete suggestions (other than to possibly consider using win32gui to avoid future MFCisms from biting) Cheers, Mark _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32