Seems that I have found something that might fix your problem:
LONG r = ShellExecute(NULL, "open", "http://www.microsoft.com", NULL, NULL, SW_SHOWNORMAL);
The probelm seems to lie with your parameter being SW_SHOWDEFAULT whereas the MSDN sample I found at http://support.microsoft.com/kb/224816/en-us
You can find an explanation for all the applicable parameters on MSDN: http://msdn.microsoft.com/en-us/library/bb762153(v=vs.85).aspx
]. This site goes on to explain:
- Sets the show state based on the SW_ flag specified in the
STARTUPINFO structure passed to the CreateProcess function by the program that started the application. An application should call ShowWindow with this flag to set the initial show state of its main window.
- Activates and displays a window. If the window is minimized or maximized, Windows restores it to its original size and position. An application should specify this flag when displaying the window for the first time.
I'm not quite sure if that really solves your problem, but I think you should try your code and substitute