Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

The Mini Shell Extension Framework – Part III

, 18 Sep 2005
Discussion of a small C++ framework to create Windows shell extensions (IShellFolderImpl).
msf091.zip
include
columnprovider.rgs
contextmenu.rgs
contextmenu_sf.rgs
extension.rgs
extractimage_sf.rgs
infotip.rgs
infotip_sf.rgs
propertysheetext.rgs
propertysheetext_sf.rgs
shell32missing.def
shell32missing.lib
shellfolder.rgs
shellfolderwin98.rgs
vvvsample
Copy of sample1.vvv
menuicon.bmp
sample.def
sample.manifest
sample1.vvv
vvv.ico
vvvtest
sample.yyy
sample1.vvv
sample2.vvv
//
// (C) Copyright by Victor Derks <vba64@xs4all.nl>
//
// See README.TXT for the details of the software licence.
//

// Enabled improved type checking of the Win32 SDK header files.
#define STRICT

// Allow use of features specific to Windows NT 4 or later.
// Change this to the appropriate value to target Windows 2000 or later.
#define _WIN32_WINNT 0x0400

// Allow use of features specific to Windows 98 or later.
// Change this to the appropriate value to target Windows Me or later.
#define _WIN32_WINDOWS 0x0410


// Disable not usefull Wall warnings
#pragma warning(disable: 4265) // class has virtual functions, but destructor is not virtual
#pragma warning(disable: 4505) // unreferenced local function has been removed.
#pragma warning(disable: 4514) // unreferenced inline function has been removed.
#pragma warning(disable: 4710) // function not inlined.
#pragma warning(disable: 4711) // function xxx is selected for automatic inline expansion.
#pragma warning(disable: 4820) // 'x' bytes padding added after member.

#if _MSC_VER == 1300 // VS.Net 2002 requires some extra warnings to be disabled.
#pragma warning(disable: 4555) // expression has no effect; expected expression with side-effect
#endif

#if _MSC_VER == 1400
#pragma warning(disable: 4609) // #pragma warning : warning number '6386' unavailable; /analyze must be specified for this warning
#endif

// As MSF targets VC 7.0, 7.1 and 8.0 it cannot use the CRT secure versions of 8.0
// as these functions are not available on 7.0 and 7.1
#define _CRT_SECURE_NO_DEPRECATE


// Standard C++ library
#pragma warning(push)

#if _MSC_VER < 1400
#pragma warning(disable: 4217) // member template functions cannot be used for copy-assignment or copy-construction
#pragma warning(disable: 4668) // not a preprocessor macro
#else
#pragma warning(disable: 4548) //  expression before comma has no effect; expected expression with side-effect
#pragma warning(disable: 4640) //  construction of local static object is not thread-safe
#endif

#pragma warning(disable: 4619) // #pragma warning : there is no warning number 'xxx'
#ifdef NDEBUG
#pragma warning(disable: 4702) // code not reached (optimizer causes catch to be never reached)
#endif
#include <vector>
#include <iostream>
#pragma warning(pop)


// Win32
#pragma warning(push)
#pragma warning(disable: 4668) // not a preprocessor macro
#pragma warning(disable: 4917) // a GUID can only be associated with a class, interface or namespace
#include <shlobj.h>
#include <shobjidl.h>
#pragma warning(pop)


// Visual C++ compiler support includes (depending on Win32 defined interfaces)
#pragma warning(push)

#if _MSC_VER < 1400
#pragma warning(disable: 4217) // member template functions cannot be used for copy-assignment or copy-construction
#endif

#pragma warning(disable: 4668) // not a preprocessor macro
#pragma warning(disable: 4917) // a GUID can only be associated with a class, interface or namespace
#include <comdef.h>
#include <tchar.h>
#pragma warning(pop)


// ATL
#pragma warning(push)
#pragma warning(disable: 4263) // 'function' : member function does not override any base class virtual member function
#pragma warning(disable: 4264) // auto generated after C4263

#if _MSC_VER == 1300 // VS.Net 2002 requires some extra warnings to be disabled.
#pragma warning(disable: 4191) // 'type cast' : unsafe conversion from 'FARPROC' to 'DLLGETVERSIONPROC'
#pragma warning(disable: 4217) // member template functions cannot be used for copy-assignment or copy-construction
#pragma warning(disable: 4302) // 'type cast' : truncation from 'LPSTR' to 'TCHAR'
#pragma warning(disable: 4529) //: forming a pointer-to-member requires explicit use of the address-of operator ('&') and a qualified name
#pragma warning(disable: 4668) // not a preprocessor macro
#pragma warning(disable: 4619) // #pragma warning : there is no warning number 'xxx'
#pragma warning(disable: 4640) // construction of local static object is not thread-safe
#pragma warning(disable: 4917) // a GUID can only be associated with a class, interface or namespace
#endif

#if _MSC_VER == 1310 && defined(NDEBUG)
#pragma warning(disable: 4548) // expression before comma has no effect; expected expression with side-effect
#endif

#if _MSC_VER == 1400
#pragma warning(disable: 4548) // expression before comma has no effect; expected expression with side-effect
#endif

#include <atlbase.h>
#include <atlcom.h>
#include <atlstr.h>
#include <atlctl.h>

#pragma warning(pop)

#if _MSC_VER == 1400
#pragma warning(disable: 4548) // expression before comma has no effect; expected expression with side-effect
#pragma warning(disable: 4571) // blocks compiled with /EHs do not catch or re-throw Structured Exceptions
#endif

using namespace std;

namespace MSF {}
using namespace MSF;

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Victor Derks
Software Developer (Senior) Schneider Electric
Netherlands Netherlands
Victor lives in Nijmegen, the oldest city in The Netherlands.
He studied Applied Physics in Delft and now works for GE Healthcare.

| Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 18 Sep 2005
Article Copyright 2005 by Victor Derks
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid