Re:how read txt-file or pdf-file
On Sat, 03 Mar 2001 16:33:02 GMT, "User Delphi" <denber...@pandora.be>
wrote:
Quote
>How is it possible to start the default program to open a specific text or
>pdf-file, only by inputting the filename and path??
>I tried winexec but it does nothing. Shellexecute seems too difficult to be
>the solution? What is left? Or anyone can give an example of shellexecute?
If I understand what you're asking for then ShellExecute is precisely
the solution.
WinExec has no knowledge of file associations, so you'd have to look
that up yourself in the Registry to know the correct program to start,
much more complicated that ShellExecute.
So, with regard to ShellExecute, what's so tough about:
ShellExecute(0, 'OPEN', 'c:\somedir\somefile.txt', '',
'c:\somedir', SW_SHOWDEFAULT);
????
Stephen Posey
slpo...@concentric.net