how would i open a html file so that it opens in IE?
i need it for an autorun program.
This is a discussion on opening an html file to IE, c++ within the C++ Programming forums, part of the General Programming Boards category; how would i open a html file so that it opens in IE? i need it for an autorun program....
how would i open a html file so that it opens in IE?
i need it for an autorun program.
The following sample opens the indicater file by strDir in the default browser....this works with the current directory but you can place any value you want to replace strDir....
Code:void CAboutDlg::OnButton1() { CString strDir; char buffer[255]; GetCurrentDirectory(255, buffer); strDir = buffer; strDir.TrimRight("\\"); strDir += "\\"; strDir += _T("helpindex.html"); if( 32 >= (int)ShellExecute( NULL, "open", strDir, NULL, NULL, SW_SHOWNORMAL)) { AfxMessageBox("::ShellExecuteFailed" " to open this link!"); } }
zMan