Within game, I'm showing a web page as follows: ShellExecute(NULL, "open", "http://www.newcrayon.com", "", "", SW_SHOW ); It seems to work, whether I'm full screen or not, but I vaguely remember running into some problems with this a couple of years ago, depending on what browser the user has, etc. Is the above the right way to do this or is there something better? How about on the Mac - what's the syntax there?
My code... Code: void openURL (const char* sBaseURL) { String sURL = sBaseURL; #if defined(WIN32) ShellExecute(NULL, "open", sURL, NULL, NULL, SW_SHOWNORMAL); #elif defined(linux) if (fork() == 0) { printf("Attempting to open URL %s\n", (const char*)sURL); for (int i = 0; i < nBrowsers; i++) { String sCmd = lBrowsers[i] + String(" ") + String(sURL); int nRet = system(sCmd); if (nRet == -1) { // The system() call itself failed } else { nRet = WEXITSTATUS(nRet); if (nRet == 0) exit(1); // Success! } } GFC_WARNING("Couldn't execute any browser!"); exit(1); } #elif defined(__APPLE__) OSStatus nErr; ICInstance pInst; long nStartSel = 0; long nEndSel = sURL.getLength(); nErr = ICStart(&pInst, 'MYST'); nErr = ICLaunchURL(pInst, (byte*)"", (const char*)sURL, nEndSel, &nStartSel, &nEndSel); ICStop(pInst); #endif }