Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Getting an Application window to behave as if it were called by showdialog()

Getting an Application window to behave as if it were called by showdialog()

Scheduled Pinned Locked Moved C#
csharpc++
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jchalfant
    wrote on last edited by
    #1

    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.

    D 1 Reply Last reply
    0
    • J jchalfant

      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.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      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

      J 1 Reply Last reply
      0
      • D Dave Kreskowiak

        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

        J Offline
        J Offline
        jchalfant
        wrote on last edited by
        #3

        Thanks for confirming.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups