Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening IE to a specific file....

Status
Not open for further replies.

onrdbandit

Programmer
Mar 12, 2003
145
US
Howdy,

I have a minor problem I can't seem to figure out. I need to open IE from my application and have it open a specific page. I know how to open IE with the CreateProcess function, but I don't know which if any arguments this function has to send the program to a specific file. I check the FAQ's and tried to figure out the SDK info like it said, but most of that was just over my head.

Thanks for any assistance,
onrdbandit
 
Why not use the standard ShellExecuteEx call.

Suppose Form1 exists

ShellExecuteEx ( Form1->Handle,
"explore" // or open
" NULL,
NULL,
SW_SHOW );

This code should open up the site in it's own window

Regards
 
Howdy,

I got it to compile as:

ShellExecute ( Form1->Handle,
"explore" // or open
" NULL,
NULL,
SW_SHOW );

But nothing happened when called...
I tried "iexplore" and "explorer" both as possiblilities, but to no avail.

BUT you did set me in the correct direction. I researched the SDK documentation on this function and got it to work as:
(MainForm is the form and HelpPath is and AnsiString path absolute path to the file)

ShellExecute ( MainForm->Handle,
NULL, // or open
HelpPath.c_str(),
NULL,
NULL,
SW_SHOW );

Thanks a bunch!
onrdbandit
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top