>>>>> "Bo" == Bo Peng <[EMAIL PROTECTED]> writes:

>> Not if you use "start" as viewer of any file that is supported by
>> windows (the problem is to discover that).

Bo> start is a DOS command (as far as I know). In a cmd windows, start
Bo> can open a file using its associated application. However, I tried
Bo> to use "start $$i" or "cmd /c start $$i" for pdf format and did
Bo> not get it work. A shell window is started instead.

Mingw comes with a small 'start' script which should be a good
starting point.

>> Could you point us to the API? I found ShellExecute, but I did not
>> find a way to tell whether a file format is handled.

Bo> I am not quite sure. There are ShellExecute, ShellExecuteEx,
Bo> WinExec. According to
Bo> 
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shellexecute.asp
Bo> , ShellExecute should just work. A <32 return value indicates
Bo> failure to open a file, but this is not lyx' fault so we do not
Bo> have to worry about it.

So there is no real way to know whether a file type is supported. One
has to provide a real file for the function to work. What would be
nice is an equivalent of the assoc/ftype windows commands.

JMarc

Reply via email to