Archived

This topic is now archived and is closed to further replies.

atreyu

Opening an html doc with the Win API

Recommended Posts

I'm writing a debug program that outputs errors into an html file. It works a lot like assert() only the info is placed in the html file instead of displayed in a message box. When an error occurs I want the html file to automatically be opened. I've tried
  
system("C:\\Program Files\\Programming\\Projects\\Direct3D\\Eclipse\\logfile.html");
   
but it doesn't work, and I would rather use something more up to date than system() anyway. I've seen dialog boxes before with links to webpages before so I'm guessing there's a better way. Thanks for any help. --Ben Edited by - atreyu on January 30, 2001 11:46:21 PM

Share this post


Link to post
Share on other sites
quote:
Original post by atreyu

Call me stupid, but I have no clue what that is and the link is for a shopping site.



What compiler??
Checkout your compiler's winAPI documentation for the command: ShellExecute

Or check the MSDN website for the win32 API documentation.

Edit: realized the title of message said WinAPI and so removed a bunch of junk that I wrote for no reason.


B e S
It's Da BOMB Baby!!!
. o O ~
A little nonsense now and then,
is relished by the wisest men
~ O o .
-- Willy Wonka

Edited by - wrenhal on January 31, 2001 4:08:39 PM

Share this post


Link to post
Share on other sites
system("start C:\\Program Files\\Programming\\Projects\\Direct3D\\Eclipse\\logfile.html");
this should work under windows i guess...

tja mann

Share this post


Link to post
Share on other sites
Doh! I can''t believe I didn''t notice ShellExec is a function. It''s working perfectly. Thanks for all your help everyone.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
hi
ShellExecute is a good way to run some application with some
command line parameters, but if you want a control on the newly
opened app (for example feeding a new page, or...) then you
must use OLE Automation, it gives you some functions to control
your IE session.


Share this post


Link to post
Share on other sites