Default Browser Settings
-
-
I am currently trying to find out, where exactly in the registry I can find the default browser. On my local pc ie is the default browser, but I've found serveral entries in the registry directing to the installation path of ie. Can somebody help me?
I would suggest simply letting the user type the URL of the site they want to go to in your program, and then call the function ::WinExec(theDialog.m_strURL, SW_SHOW);, where theDialog.m_strURL is a data member for the URL edit box you provide. This function will simply feed the URL passed to it to whatever Web browser is registered on the user's machine as the default. Also, the default browser on a user's machine simply refers to whichever browser is associated with the ".html" file extension. This is just like a situation where say you made a BMP editor, and somebody else made a better BMP (bitmap) editor, and you both used MFC. Since MFC has InitInstance() fill out Registry entries on startup to make your program get launched when a BMP file is double-clicked, your app is the "default browser" for BMP files. Say then the user starts the other BMP editor, closes it, and then double-clicks the BMP file. Since MFC does the same work in that other app's InitInstance(), the other app opens, and is now the "default browser" for BMP files. When you check the 'Check to see if is the default browser' in your Preferences or Options or Properties window, what you're doing is telling MFC whether or not to do the above with the files the browsers can show you -- both IE and Netscape are made using Visual C++!! Sincerely Yours, Brian Hart