Getting an Application window to behave as if it were called by showdialog()
-
So I've written a C# winform application that's supposed to be launched by an MFC application. All is working well until my boss asks if there's a way for me to lock the MFC application until my application was closed. Since I just didn't see the possibility of reverse engineering the MFC app and gaining control from my app, my straight answer was "no" and that he should check to see if the MFC app he's using is able to launch my application and wait for it to close. Now I'd like to keep my bases covered and make sure that I was correct here that I'm just way out of scope to be able to do anything with his app besides accept command line arguments.
-
So I've written a C# winform application that's supposed to be launched by an MFC application. All is working well until my boss asks if there's a way for me to lock the MFC application until my application was closed. Since I just didn't see the possibility of reverse engineering the MFC app and gaining control from my app, my straight answer was "no" and that he should check to see if the MFC app he's using is able to launch my application and wait for it to close. Now I'd like to keep my bases covered and make sure that I was correct here that I'm just way out of scope to be able to do anything with his app besides accept command line arguments.
jchalfant wrote:
All is working well until my boss asks if there's a way for me to lock the MFC application until my application was closed.
The short answer is No. You have no control of another app's message pump or it's response to it. The long answer is maybe, with a lot of research into hooking message pumps and filtering messages. I can see a bunch of potential problems doing this though.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
jchalfant wrote:
All is working well until my boss asks if there's a way for me to lock the MFC application until my application was closed.
The short answer is No. You have no control of another app's message pump or it's response to it. The long answer is maybe, with a lot of research into hooking message pumps and filtering messages. I can see a bunch of potential problems doing this though.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008