CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2006
    Posts
    344

    Automate dialog app

    I would like one our applications to run silently, however it usually relies on user interaction to click the task you want to run etc. To complicate matters the tasks communicate with another machine asynchronously.

    I got the headless part working by faking the dialogs but everything I try ends with DoModal. The app was designed around the interactivity but I now need it run without.

    Any ideas?

    Thanks, G.

  2. #2
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,637

    Re: Automate dialog app

    Create an instance of the dialog but don't call DoModal(). Just call the appropriate members of the dialog using the instance you created.

  3. #3
    Join Date
    Mar 2006
    Posts
    12

    Re: Automate dialog app

    To automate use the command line options if i am understanding your problem correctly.
    Kavitesh Singh

  4. #4
    Join Date
    Jan 2006
    Posts
    344

    Re: Automate dialog app

    Quote Originally Posted by kavitesh
    To automate use the command line options if i am understanding your problem correctly.
    It's the internals of actually controlling the app which is the problem.

  5. #5
    Join Date
    Jan 2006
    Posts
    344

    Re: Automate dialog app

    Quote Originally Posted by GCDEF
    Create an instance of the dialog but don't call DoModal(). Just call the appropriate members of the dialog using the instance you created.
    Would that work? I never tried that.

    In the end I created a thread that is launched at the app start. The app passes messages to the thread and the thread acts on them in a state machine if "-silent" message is passed in.

    Works quite well so far. Just modifying the logging to use the message system - might as well use the thread in quiet moments for that...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured