ShellExexute to open the default browswer
-
According to this microsoft's article [^], if I wanted to use ShellExecute to open the default browser instead of the Internet Explorer, I had to use
LONG r = ShellExecute(NULL, "open", "http://www.microsoft.com", NULL, NULL, SW_SHOWNORMAL);
Ok. In my case I want to open this url
http://www.mywebsite.com/article/month/section
. I am doing this :AfxParseURL((LPCTSTR)m_strWebURL, dwServiceType, strServerName, strObject,nPort);
strServerName = _T("http://") + strServerName;
::ShellExecute(NULL,_T("open"),strServerName,strObject ,NULL,SW_SHOWMAXIMIZED);This piece of code crashes the Visual Studio 2008. The original code i used below is worked just fine but it uses Internet Explorer instead of the default browser.
::ShellExecute(NULL,_T("open"),_T("explorer"),m_strWebURL ,NULL,SW_SHOWMAXIMIZED);
What seems to be the problem in microsoft's code ? Regards,
sdancer75