How might I go about executing the default browser or IE and load a .html file?
Thanks in advance.
Printable View
How might I go about executing the default browser or IE and load a .html file?
Thanks in advance.
Hi,
One of the ways in which you can get this done is by using ShellExecuteEx. Fill in the SHELLEXECUTEINFO structure by passing the full path of the file for lpFile. A sample code is as follows:
SHELLEXECUTEINFO pShell;
pShell.cbSize = sizeof(SHELLEXECUTEINFO);
pShell.fMask = NULL ;
pShell.hwnd = GetSafeHwnd();
pShell.lpVerb = NULL;
pShell.lpFile = "c:\\mydocuments\\test.html";
pShell.lpParameters = NULL;
pShell.lpDirectory = NULL;
pShell.nShow = SW_SHOWNORMAL;
pShell.hInstApp = NULL;
ShellExecuteEx(&pShell);
Hope this helps.
Regards,
Smriti Venkatesh
email:[email protected]