Article View: borland.public.cppbuilder.nativeapi
Article #3361Re: opening a Windows application
From: Ed Mulroy
Date: Mon, 03 Jul 2006 17:43
Date: Mon, 03 Jul 2006 17:43
23 lines
1823 bytes
1823 bytes
There are many functions with which you can do that.
Probably the simplest is WinExec. An example is:
WinExec("Notepad.exe", SW_SHOW);
Other functions that also can be used are CreateProcess, ShellExecute,
system and the exec* set of functions. WinExec, CreateProcess and
ShellExecute are documented in the help for Windows and the others are in
the help for C/C++.
. Ed
> JB wrote in message
> news:44a94ce4$1@newsgroups.borland.com...
>
> I have a file name stored in my application. I want to be able
> to use this file name to open the file using the appropriate
> Windows application. (ie the application opened by double
> clicking on the file name in Windows Explorer for example.) I
> then want the opened application to run independently of my
> application and be closed as normal by the user.
> Is this possible and if so how can I do this?
> Your help will be much appreciated.
Technical Details
Message-ID:
<44a95742$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<44a94ce4$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,2ed92cf913ba2917 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Ed Mulroy" <dont_email_me@bitbuc.ket> Newsgroups: borland.public.cppbuilder.nativeapi References: <44a94ce4$1@newsgroups.borland.com> Subject: Re: opening a Windows application Date: Mon, 3 Jul 2006 13:43:27 -0400 Lines: 25 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 66.57.117.102 Message-ID: <44a95742$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1151948610 66.57.117.102 (3 Jul 2006 10:43:30 -0700) X-Authenticated-User: edmulroy Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail