CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: VictorN

Search: Search took 0.32 seconds.

  1. Replies
    82
    Views
    81,842

    Re: running a GUI program in the background

    It only means you set a wrong path/name! Fix it!
  2. Replies
    82
    Views
    81,842

    Re: running a GUI program in the background

    Well, you already mentioned it... two or three times!
    And how could it matter?

    Did you test the Igor's sample?
  3. Replies
    82
    Views
    81,842

    Re: running a GUI program in the background

    What exactly "doesn't work"?
    And how did you try to "setting the service to interact with the desktop"?
  4. Replies
    82
    Views
    81,842

    Re: running a GUI program in the background

    Well, the one and only one way to hide the window is to call ShowWindow with SW_HIDE for this window (or its parent)
    So if you know the handle of the main window of this external program then you...
  5. Replies
    82
    Views
    81,842

    Re: running a GUI program in the background

    No, you need to create a HOOL dll to hook an external applications!
  6. Replies
    82
    Views
    81,842

    Re: running a GUI program in the background

    What "c++ console application" are you talking about? What is a problem with a "console application"?
  7. Replies
    82
    Views
    81,842

    Re: running a GUI program in the background

    No, I cannot. But you could make a Google search for something like global hook WH_CBT example
  8. Replies
    82
    Views
    81,842

    Re: running a GUI program in the background

    Well, the best way would be to change this external program so it will never call ShowWindow with any but SW_SHOWDEFAULT parameter.
    It you cannot change this program then you could try with (WH_CBT)...
  9. Replies
    82
    Views
    81,842

    Re: running a GUI program in the background

    Good! So now you know a possible reason for the external program to be displayd despite of your startup parameter set to SW_HIDE! :thumb:
  10. Replies
    82
    Views
    81,842

    Re: running a GUI program in the background

    Where you want to.
    But you must be sure (you have to test it!) that this second call is really executed.
  11. Replies
    82
    Views
    81,842

    Re: running a GUI program in the background

    No. Your initial code with CreateProcess is "almost" correct. You should only change it to
    info.dwFlags = STARTF_USESHOWWINDOW;
    info.wShowWindow = SW_HIDE;

    You have to change your test program...
  12. Replies
    82
    Views
    81,842

    Re: running a GUI program in the background

    Well, there is onlz one call of ShowWindow in your example.
    But according to MSDN article STARTUPINFO:
  13. Replies
    82
    Views
    81,842

    Re: running a GUI program in the background

    I have a question: who and how is considered to close/exit this program? After you have called CloseHandle there is (almost) no more possible to close the program...
    So how long are you going to...
  14. Replies
    82
    Views
    81,842

    Re: running a GUI program in the background

    Could you show the code snippet with ShowWindow?
    Did you test whether this ShowWindow is called?
  15. Replies
    82
    Views
    81,842

    Re: running a GUI program in the background

    It occusionally "works" with notepad just because notepade does not internally call ShowWindow. (Well, it is IMHO, so, please test if calling ShowWindow(SW_SHOW) would cause the "doesn't work"...
  16. Replies
    82
    Views
    81,842

    Re: running a GUI program in the background

    Then perform a test: create a very small GUI program (SDI), ensure it calls somewhere the ShowWindow with SW_SHOW or SW_MAXIMIXE or SW_RESTORE parameter, and test your CreateProcess with this program!
  17. Replies
    82
    Views
    81,842

    Re: running a GUI program in the background

    Does your program call ShowWindow API? With what argument(s)?
  18. Replies
    82
    Views
    81,842

    Re: running a GUI program in the background

    Define "it doesn't work". :cool:
Results 1 to 18 of 18





Click Here to Expand Forum to Full Width

Featured