1. How can I change the view, so it displays large icons
C++
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXSHELLVIEWLib' for the library: 'ExShellView 1.0 Control Library'

	#import "C:\\WINNT\\system32\\ExShellView.dll"
	using namespace EXSHELLVIEWLib;
*/
EXSHELLVIEWLib::IExShellViewPtr spExShellView1 = GetDlgItem(IDC_EXSHELLVIEW1)->GetControlUnknown();
spExShellView1->PutViewMode(EXSHELLVIEWLib::LargeIcons);
2. How can I change the view, so it displays small icons
C++
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXSHELLVIEWLib' for the library: 'ExShellView 1.0 Control Library'

	#import "C:\\WINNT\\system32\\ExShellView.dll"
	using namespace EXSHELLVIEWLib;
*/
EXSHELLVIEWLib::IExShellViewPtr spExShellView1 = GetDlgItem(IDC_EXSHELLVIEW1)->GetControlUnknown();
spExShellView1->PutViewMode(EXSHELLVIEWLib::SmallIcon);
3. How can I change the view, so it displays as a list
C++
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXSHELLVIEWLib' for the library: 'ExShellView 1.0 Control Library'

	#import "C:\\WINNT\\system32\\ExShellView.dll"
	using namespace EXSHELLVIEWLib;
*/
EXSHELLVIEWLib::IExShellViewPtr spExShellView1 = GetDlgItem(IDC_EXSHELLVIEW1)->GetControlUnknown();
spExShellView1->PutViewMode(EXSHELLVIEWLib::List);
4. How can I change the view, so it displays as a a grid with details
C++
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXSHELLVIEWLib' for the library: 'ExShellView 1.0 Control Library'

	#import "C:\\WINNT\\system32\\ExShellView.dll"
	using namespace EXSHELLVIEWLib;
*/
EXSHELLVIEWLib::IExShellViewPtr spExShellView1 = GetDlgItem(IDC_EXSHELLVIEW1)->GetControlUnknown();
spExShellView1->PutViewMode(EXSHELLVIEWLib::Details);
5. How can I change the view, so it displays as THUMBNAIL
C++
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXSHELLVIEWLib' for the library: 'ExShellView 1.0 Control Library'

	#import "C:\\WINNT\\system32\\ExShellView.dll"
	using namespace EXSHELLVIEWLib;
*/
EXSHELLVIEWLib::IExShellViewPtr spExShellView1 = GetDlgItem(IDC_EXSHELLVIEW1)->GetControlUnknown();
spExShellView1->PutViewMode((EXSHELLVIEWLib::ViewModeType)5);
6. How can I change the control's font
C++
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXSHELLVIEWLib' for the library: 'ExShellView 1.0 Control Library'

	#import "C:\\WINNT\\system32\\ExShellView.dll"
	using namespace EXSHELLVIEWLib;
*/
EXSHELLVIEWLib::IExShellViewPtr spExShellView1 = GetDlgItem(IDC_EXSHELLVIEW1)->GetControlUnknown();
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'stdole' for the library: 'OLE Automation'

	#import "C:\\WINNT\\System32\\stdole2.tlb"
*/
stdole::FontPtr f = ::CreateObject(L"StdFont");
	f->PutName(L"Verdana");
	f->PutSize(_variant_t(long(12)));
spExShellView1->PutFont(IFontDispPtr(((stdole::FontPtr)(f))));
7. How do I refresh the control
C++
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXSHELLVIEWLib' for the library: 'ExShellView 1.0 Control Library'

	#import "C:\\WINNT\\system32\\ExShellView.dll"
	using namespace EXSHELLVIEWLib;
*/
EXSHELLVIEWLib::IExShellViewPtr spExShellView1 = GetDlgItem(IDC_EXSHELLVIEW1)->GetControlUnknown();
spExShellView1->Refresh();
8. How can I disable or enable the entire control
C++
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXSHELLVIEWLib' for the library: 'ExShellView 1.0 Control Library'

	#import "C:\\WINNT\\system32\\ExShellView.dll"
	using namespace EXSHELLVIEWLib;
*/
EXSHELLVIEWLib::IExShellViewPtr spExShellView1 = GetDlgItem(IDC_EXSHELLVIEW1)->GetControlUnknown();
spExShellView1->PutEnabled(VARIANT_FALSE);
9. How do I browse a specified folder
C++
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXSHELLVIEWLib' for the library: 'ExShellView 1.0 Control Library'

	#import "C:\\WINNT\\system32\\ExShellView.dll"
	using namespace EXSHELLVIEWLib;
*/
EXSHELLVIEWLib::IExShellViewPtr spExShellView1 = GetDlgItem(IDC_EXSHELLVIEW1)->GetControlUnknown();
spExShellView1->PutBrowseFolder(((EXSHELLVIEWLib::IExShellFolderPtr)(spExShellView1->GetShellFolder("C:\\"))));
10. How can I go up to one level, so I can browse the parent folder
C++
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXSHELLVIEWLib' for the library: 'ExShellView 1.0 Control Library'

	#import "C:\\WINNT\\system32\\ExShellView.dll"
	using namespace EXSHELLVIEWLib;
*/
EXSHELLVIEWLib::IExShellViewPtr spExShellView1 = GetDlgItem(IDC_EXSHELLVIEW1)->GetControlUnknown();
spExShellView1->PutBrowseFolder(((EXSHELLVIEWLib::IExShellFolderPtr)(spExShellView1->GetShellFolder("C:\\"))));
spExShellView1->UpOneLevel();
11. How do I browse a special folder
C++
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXSHELLVIEWLib' for the library: 'ExShellView 1.0 Control Library'

	#import "C:\\WINNT\\system32\\ExShellView.dll"
	using namespace EXSHELLVIEWLib;
*/
EXSHELLVIEWLib::IExShellViewPtr spExShellView1 = GetDlgItem(IDC_EXSHELLVIEW1)->GetControlUnknown();
spExShellView1->PutBrowseFolder(((EXSHELLVIEWLib::IExShellFolderPtr)(spExShellView1->GetShellFolder(spExShellView1->GetSpecialFolder(EXSHELLVIEWLib::Programs)))));
12. How do I specify what objects files or folders should be included in the list
C++
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXSHELLVIEWLib' for the library: 'ExShellView 1.0 Control Library'

	#import "C:\\WINNT\\system32\\ExShellView.dll"
	using namespace EXSHELLVIEWLib;
*/
EXSHELLVIEWLib::IExShellViewPtr spExShellView1 = GetDlgItem(IDC_EXSHELLVIEW1)->GetControlUnknown();
spExShellView1->PutIncludeObjectType(EXSHELLVIEWLib::FoldersOnly);
13. How can I list only folders in the view
C++
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXSHELLVIEWLib' for the library: 'ExShellView 1.0 Control Library'

	#import "C:\\WINNT\\system32\\ExShellView.dll"
	using namespace EXSHELLVIEWLib;
*/
EXSHELLVIEWLib::IExShellViewPtr spExShellView1 = GetDlgItem(IDC_EXSHELLVIEW1)->GetControlUnknown();
spExShellView1->PutIncludeObjectType(EXSHELLVIEWLib::FoldersOnly);
14. How can I include only files that match a pattern
C++
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXSHELLVIEWLib' for the library: 'ExShellView 1.0 Control Library'

	#import "C:\\WINNT\\system32\\ExShellView.dll"
	using namespace EXSHELLVIEWLib;
*/
EXSHELLVIEWLib::IExShellViewPtr spExShellView1 = GetDlgItem(IDC_EXSHELLVIEW1)->GetControlUnknown();
spExShellView1->PutIncludeObjectType(EXSHELLVIEWLib::PatternObjects);
spExShellView1->PutFilePattern(L"*.bmp");
15. How can I include only files that match a pattern
C++
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXSHELLVIEWLib' for the library: 'ExShellView 1.0 Control Library'

	#import "C:\\WINNT\\system32\\ExShellView.dll"
	using namespace EXSHELLVIEWLib;
*/
EXSHELLVIEWLib::IExShellViewPtr spExShellView1 = GetDlgItem(IDC_EXSHELLVIEW1)->GetControlUnknown();
spExShellView1->PutIncludeObjectType(EXSHELLVIEWLib::PatternObjects);
spExShellView1->PutFilePattern(L"*.exe *.lnk");
16. How can I disable or enable the control's context menu
C++
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXSHELLVIEWLib' for the library: 'ExShellView 1.0 Control Library'

	#import "C:\\WINNT\\system32\\ExShellView.dll"
	using namespace EXSHELLVIEWLib;
*/
EXSHELLVIEWLib::IExShellViewPtr spExShellView1 = GetDlgItem(IDC_EXSHELLVIEW1)->GetControlUnknown();
spExShellView1->PutDefaultMenuItems(VARIANT_FALSE);
19. How can I select a folder
C++
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXSHELLVIEWLib' for the library: 'ExShellView 1.0 Control Library'

	#import "C:\\WINNT\\system32\\ExShellView.dll"
	using namespace EXSHELLVIEWLib;
*/
EXSHELLVIEWLib::IExShellViewPtr spExShellView1 = GetDlgItem(IDC_EXSHELLVIEW1)->GetControlUnknown();
spExShellView1->GetObjects()->Get(EXSHELLVIEWLib::AllItems)->GetItem(long(0))->SelectItem(EXSHELLVIEWLib::Select);