• Advertisement
Sign in to follow this  

Opening a help file [Solved]

This topic is 4287 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm currently writing a small little app and would like to be able to open the help file from inside the program. The help document is just a .html file so I just need a way of making the default internet program open it up. I've tried using _spawnv, system and CreateProcess without much success. Any help would be much appreciated. [Edited by - RamboBones on May 29, 2006 2:27:49 AM]

Share this post


Link to post
Share on other sites
Advertisement
You can call "%PROGRAMFILES%\Internet Explorer\IEXPLORE.EXE" with the correct command line options.

"%PROGRAMFILES%\Internet Explorer\IEXPLORE.EXE" yahoo.com will open yahoo.

Share this post


Link to post
Share on other sites
Quote:
Original post by Kambiz
You can call "%PROGRAMFILES%\Internet Explorer\IEXPLORE.EXE" with the correct command line options.

"%PROGRAMFILES%\Internet Explorer\IEXPLORE.EXE" yahoo.com will open yahoo.

Okay I'm trying that until I can get the default internet program to open but I can't manage to format the CreateProcess command correctly to get it going. I'm currently using
CreateProcess("%PROGRAMFILES%\\Internet Explorer\\IEXPLORE.EXE",NULL,NULL,NULL,FALSE,NULL,NULL,NULL,&SI,&pi)

But doesn't seem to work.

Share this post


Link to post
Share on other sites
ShellExecute(NULL,L"open",L"iexplore.exe",L"http://www.microsoft.com",NULL,SW_SHOWNORMAL);
Maybe this will open the default browser:
ShellExecute(NULL, L"open", L"http://www.microsoft.com", NULL, NULL, _SHOWNORMAL);

Share this post


Link to post
Share on other sites
Quote:
Original post by Kambiz
You can call "%PROGRAMFILES%\Internet Explorer\IEXPLORE.EXE" with the correct command line options.

"%PROGRAMFILES%\Internet Explorer\IEXPLORE.EXE" yahoo.com will open yahoo.

Calling IEXPLORE.EXE manualy is a bad idea - there are many people that are using some other browsers (Mozilla, Firefox, Opera etc). You should launch the default browser, not IE.

Easiest way to open a html file in a default browser is by using ShellExecute function.
Here is a simple use of the function:
ShellExecute(NULL, "open", "readme.html", NULL, NULL, SW_SHOW);

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement