Connecting Tech Pros Worldwide Help | Site Map

Hiding External program

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 19th, 2005, 06:48 PM
Matthew Maylin
Guest
 
Posts: n/a
Default Hiding External program

I'm trying to call a external program from another. My main program is a GUI
buildin borland c++ builder, and my sibbling is compiled Matlab code.

I would like to call to the program, passing arguments and suppress the
msdos window from popping up.

I have had success with system( ) and spawnl( ) but cant seem to get the
external program to just run in the background.



  #2  
Old July 19th, 2005, 06:48 PM
Jakob Bieling
Guest
 
Posts: n/a
Default Re: Hiding External program

"Matthew Maylin" <mism2@kent.ac.uk> wrote in message
news:blploq$ji6$1@athena.ukc.ac.uk...[color=blue]
> I'm trying to call a external program from another. My main program is a[/color]
GUI[color=blue]
> buildin borland c++ builder, and my sibbling is compiled Matlab code.
>
> I would like to call to the program, passing arguments and suppress the
> msdos window from popping up.
>
> I have had success with system( ) and spawnl( ) but cant seem to get the
> external program to just run in the background.[/color]


You could try to get the console window with 'FindWindow' and hide it
with 'ShowWindow (.., SW_HIDE)'. This way it will also disappear from the
taskbar. Problem is that you might see a little flash for the short time the
window is created until you hide it.

If you use 'CreateProcess' instead of 'system ()' you can even pass the
SW_HIDE flag in the 'wShowWindow' member of the 'STARTUPINFO' structure
passed to 'CreateProcess', which will do the same as the above solution,
just without the flash.

Other than that, I am not sure why you posted this in comp.lang.c++ as
your question does not have anything to do with the C++ Language but rather
with the OS and its API you are working with. Try posting to a more
approriate news group, if my answer does not help (which I am not too sure
of, since I have never heard about 'spawnl ()' on the OS I am using).

hth
--
jb

(replace y with x if you want to reply by e-mail)


  #3  
Old July 19th, 2005, 06:48 PM
WW
Guest
 
Posts: n/a
Default Re: Hiding External program

Jakob Bieling wrote:
[SNIP]

Keep your Windows stuff out of here. Thank you:

http://www.slack.net/~shiva/welcome.txt

http://www.parashift.com/c++-faq-lit...t.html#faq-5.9

--
WW aka Attila


  #4  
Old July 19th, 2005, 06:48 PM
Matthew Maylin
Guest
 
Posts: n/a
Default Re: Hiding External program

Thanks Jakob. I'll look into thoose suggestions.

WW, hey I'm sorry thought it was a pporpiate for newsgroup. There are worst
crimes in the world you know.


  #5  
Old July 19th, 2005, 06:48 PM
Jakob Bieling
Guest
 
Posts: n/a
Default Re: Hiding External program

"WW" <wolof@freemail.hu> wrote in message
news:blpnv4$sjh$1@phys-news1.kolumbus.fi...[color=blue]
> Jakob Bieling wrote:
> [SNIP]
>
> Keep your Windows stuff out of here.[/color]

My way of showing the OP that his question requires a platform specific
answer.
--
jb

(replace y with x if you want to reply by e-mail)


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.