🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #4064

Re: shellexecute

#4064
From: Hans Galema
Date: Sat, 25 Mar 2006 10:56
28 lines
1638 bytes
Tom wrote:
> ShellExecute(0, "open", "help//help.pdf", NULL, NULL, SW_SHOWNORMAL)

That should be

  ShellExecute(0, "open", "help/help.pdf", NULL, NULL, SW_SHOWNORMAL)

or

  ShellExecute(0, "open", "help\\help.pdf", NULL, NULL, SW_SHOWNORMAL)

> How do I know if that file has been opened, 

As the help states ShellExecute returns a HINSTANCE. If its value as int
is <= 32 then it did not succeed.

         HINSTANCE hinstance = ShellExecute ( .... );

         if ( (int)hinstance <= 32 )
		{
		// not done
		}

 > Application->MessageBox("You need Acrobat Reader for viewing help","Information");

Well the user would only need a pdf reader.

Hans.
Technical Details
Message-ID: <442522af$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsfeed.gamma.ru!Gamma.RU!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <442507f8@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,9f97f6e70caedf1b
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Sat, 25 Mar 2006 11:56:19 +0100
From: Hans Galema <notused@notused.nl>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: shellexecute 
References: <442507f8@newsgroups.borland.com>
In-Reply-To: <442507f8@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-2; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 145.98.201.248
Message-ID: <442522af$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1143284399 145.98.201.248 (25 Mar 2006 02:59:59 -0700)
Lines: 28
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsfeed.gamma.ru!Gamma.RU!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail