Implementing "Internet Options" in Internet Explorer


Desktop-as-a-Service Designed for Any Cloud ? Nutanix Frame

Here is some sample code that will invoke the "Internet Options" control panel applet. This dialog is the same one that is available via IE's View / Internet Options... menu selection.

Using the ClassWizard, select the "Add Class..." button. Select "From a type library...". Browse to the systems 32 directory and select SHDocVw.dll. Select the IShellDispatch item and click on OK. This will add two files to your project, shdocvw.cpp and shdocvw.h Include shdocvw.h in the source file which is invoking the internet options. Include Initguid.h in the source file which is invoking the internet options.Define the GUID for the shell class:


and some code to actually invoke the control panel applet...

IShellDispatch disp;
sc = ::CoInitialize(NULL);
if (FAILED (sc))
	CString str;
	str.Format(_T("Failed to Initialize."));
	TRACE( str) ;

sc = ::CoCreateInstance( CLSID_Shell, NULL, CLSCTX_SERVER,
IID_IDispatch, (void**)&disp ) ;
if (FAILED (sc))
	CString str;
	str.Format(_T("Failed to create Instance :-( "));
	TRACE( str) ;

These steps and code have been tested by starting with a new MFC app wizard dialog based application.

Last updated: December 6, 1998


  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date