79
ImageSize property on 32 (specifies the size of control' icons/images/check-boxes/radio-buttons)

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	// Items.ItemHeight(0) = View.DefaultItemHeight
	// FilterBarFont.Size = Me.Font.Size
	// ToolTipFont.Size = Me.Font.Size
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		var_View->PutDefaultItemHeight(36);
		var_View->PutHeaderHeight(var_View->GetDefaultItemHeight());
		var_View->PutSortBarHeight(var_View->GetDefaultItemHeight());
		var_View->PutIndent(26);
		var_View->PutCheckImage(EXCASCADETREELib::Unchecked,16777216);
		var_View->PutCheckImage(EXCASCADETREELib::Checked,33554432);
		var_View->PutCheckImage(EXCASCADETREELib::PartialChecked,50331648);
		var_View->EnsureVisibleColumn("Function");
		ObjectPtr var_Object = var_View->GetColumns()->GetItem("Function");
		var_View->GetColumns()->GetItem(long(0))->PutDef(EXCASCADETREELib::exCellHasCheckBox,VARIANT_TRUE);
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutImageSize(32);
spCascadeTree1->GetFont()->PutSize(_variant_t(long(16)));
spCascadeTree1->Images(_bstr_t("gBJJgBAIDAAEg4AEEKAD/hz/EMNh8TIRNGwAjEZAEXjAoj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gKwWkaMZsgsJpKjKbJLDaRYxYWRpSjSbIZi" +
"Se41m2CxmlqNptksdpejebR5iSfI4m4S4W16boLiaao6m5fJ9jubwLkaco8m8S5WnaPZunuOp4j6b5Lnac4SA0PAGlgP4wEwFwGkGcIMCcCpCnCCxiA8NYAAmMJfkSbh" +
"FCcFpFnGDBnBqRpUhuEwTDeZ5lHCfw6HIQxLCaAxygyJwqgGcATE4FA6hWY4tjEAAQBAgIA==");
spCascadeTree1->PutBackColorHeader(0x4c6c6c6);
spCascadeTree1->PutSelBackColor(0x4000000);
spCascadeTree1->PutSelForeColor(RGB(0,0,1));
spCascadeTree1->PutBackground(EXCASCADETREELib::BackgroundPartEnum(0x14),spCascadeTree1->GetSelBackColor());
spCascadeTree1->PutBackground(EXCASCADETREELib::BackgroundPartEnum(0x15),spCascadeTree1->GetSelForeColor());
spCascadeTree1->PutBackground(EXCASCADETREELib::BackgroundPartEnum(0x8 | EXCASCADETREELib::exSplitBar),spCascadeTree1->GetBackColor());
spCascadeTree1->PutBackground(EXCASCADETREELib::BackgroundPartEnum(0x9 | EXCASCADETREELib::exSplitBar),spCascadeTree1->GetForeColor());
spCascadeTree1->PutBackground(EXCASCADETREELib::BackgroundPartEnum(0x20),-1);
spCascadeTree1->PutBackground(EXCASCADETREELib::BackgroundPartEnum(0x0),0x4000000);
spCascadeTree1->PutBackground(EXCASCADETREELib::exHeaderFilterBarActive,0x4010101);
spCascadeTree1->PutBackground(EXCASCADETREELib::BackgroundPartEnum(0x1),0x40000ff);
spCascadeTree1->PutHeaderAppearance(EXCASCADETREELib::Etched);
spCascadeTree1->PutBackColorSortBar(spCascadeTree1->GetBackColor());
spCascadeTree1->PutBackColorLevelHeader(spCascadeTree1->GetBackColor());
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\MN");
spCascadeTree1->EndUpdate();

78
ImageSize property on 16 (default) (specifies the size of control' icons/images/check-boxes/radio-buttons)

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		var_View->EnsureVisibleColumn("Function");
		ObjectPtr var_Object = var_View->GetColumns()->GetItem("Function");
		var_View->GetColumns()->GetItem(long(0))->PutDef(EXCASCADETREELib::exCellHasCheckBox,VARIANT_TRUE);
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutImageSize(16);
spCascadeTree1->Images(_bstr_t("gBJJgBAIDAAEg4ACEKAD/hz/EMNh8TIRNGwAjEZAEXjAojJAjMLjABAAgjUYkUnlUrlktl0vmExmUzmk1m03nE5nU7nkrQCAntBoVDolFo1HoM/ADAplLptImdMYFOq") +
"dSqlXq1QrVbrlGpVWsFNrNdnNjsk7pQAtNroFnt0sh8Yr9iulTuNxs1Eu8OiT/vsnsNVutXlk/oGGtVKxGLxWNtsZtN8iUYuNvy0Zvd+xNYwdwvl4p870GCqc8vOeuVt" +
"tmp1knyOayWVy+WzN/ze1wOElenm+12WUz/Bv2/3UyyWrzeutux2GSyGP2dQ33C1ur3GD3M4zUNzHdlWjq/E3nGzVpjWv4HA7fRy/Tv2IrN8rPW6nZ3ve7mUlfu20Z8a" +
"cvQyb+vY9jasYoDwMm+LytVBDqKG3z8O3Cb8P+mkAuY9cCQ2uL4KaxDKvkp8RNLEjqugnrwQo/UWPzFyeQw5sNLZFENrI4kOqU66pw8uzmOKvTqNqjULJvGL1JO48GtT" +
"GsbLdEL3scxLlyiw8dQeoUVxdLTtyKmUjwGlslRPJsnK1HbAKbKCrsQo8uQk/CeP44iaR/ATnTNPLvyxPU+z9P9AUDQVBowiofJXQ6Oo+kKMpIkjztE4TKn4P6JowfgP" +
"nwD5/nAjB8AOeAPo0eAA1IAFH07UhAIMpYAVIYFHqBUhwVjV1S1EtQAHxW65V0AZwAeuQAnwB5gAPYViEDVhwAHTQBkCjB4gOhwDmCyhH0sACAg==");
EXCASCADETREELib::IAppearancePtr var_Appearance = spCascadeTree1->GetVisualAppearance();
	var_Appearance->Add(4,_bstr_t("gBFLBCJwBAEHhEJAAEhABUYCg6AADACAxRDgMQBQKAAzQFAYbhkGCGAAGMZxRgmFgAQhFcZQSKUOQTDKMIziYBYfgkMIgSbJUgDGAkRRdDSOYDmGQYDiCIoRShOMIjH") +
"LUXxtDaIZwhEAoJb+RgAUY/cTzaAEUwHHiTKInaCQShsFYJUJAdRURQ9EwvCIZBpEWwLChENQwWLCNj2TScBwjCyqbale45ViqdoDU5EUiXJJ8ZxnECfYyrGjaMpCeKB" +
"UrGYTVRBIMxLLSia5oeJqMrnBpNVrIUgXCAGFwHK6BcauXIIDp6XoWWRbAAWDpVVzNNC3YzkCIceADHKiXxmVz4JLdGZ1QTGID2XaYaxWK4oZjsVSc4KDHbETbHFi9Fo" +
"3NaaxGisew+GYc4HlCR5NAAAIIEkQJSGMOgdE4RhYDwJJsAaAYQgmPpolCWgSCiBJzjcEIAkQXIBm8d5UhOQgCDUIBDDJDhgggJgKgKYJIDSVoDk8KBFF4OohEMZgWDs" +
"YYDj4GoGmGSB2B6B5iAiBgYDsYRjGSbIJo4RgqDuIpIAoLoLmMCJGDKDJjJiLA7xqUAAgGTwYnYPoPmQCQGEKEJkEkFg9gGY44BoRoSmSSQ2EKEggHgRhShSZRJFYVoV" +
"mWCRmFKFAgGOTheheZgJgYYoYmYSYWGaF4lkMMJ0hqZpJjYbobmcCZGHKHJmjmJh0h2Z4JmYcIaE8WZ2H6H5oAoBoCiCaBKBYfdjGoJoKiKaJKDaDojmkChGgmIgpCoV" +
"oWiWaJZiSd4mmmSh2h6J5qAqBoiiiaY5iSeIpmqComiqKpqkqNouiuah6hqMIsmsSpWiuGhP1kOoumuSp2j6L5sAsBo54gKwWkaMZsgsJpKjKbJLDaRYxYWRpSjSbIZi" +
"Se41m2CxmlqNptksdpejebR5iSfI4m4S4W16boLiaao6m5fJ9jubwLkaco8m8S5WnaPZunuOp4j6b5Lnac4SA0PAGlgP4wEwFwGkGcIMCcCpCnCCxiA8NYAAmMJfkSbh" +
"FCcFpFnGDBnBqRpUhuEwTDeZ5lHCfw6HIQxLCaAxygyJwqgGcATE4FA6hWY4tjEAAQBAgIA==");
spCascadeTree1->PutBackColorHeader(0x4c6c6c6);
spCascadeTree1->PutSelBackColor(0x4000000);
spCascadeTree1->PutSelForeColor(RGB(0,0,1));
spCascadeTree1->PutBackground(EXCASCADETREELib::BackgroundPartEnum(0x14),spCascadeTree1->GetSelBackColor());
spCascadeTree1->PutBackground(EXCASCADETREELib::BackgroundPartEnum(0x15),spCascadeTree1->GetSelForeColor());
spCascadeTree1->PutBackground(EXCASCADETREELib::BackgroundPartEnum(0x8 | EXCASCADETREELib::exSplitBar),spCascadeTree1->GetBackColor());
spCascadeTree1->PutBackground(EXCASCADETREELib::BackgroundPartEnum(0x9 | EXCASCADETREELib::exSplitBar),spCascadeTree1->GetForeColor());
spCascadeTree1->PutBackground(EXCASCADETREELib::BackgroundPartEnum(0x20),-1);
spCascadeTree1->PutBackground(EXCASCADETREELib::BackgroundPartEnum(0x0),0x4000000);
spCascadeTree1->PutBackground(EXCASCADETREELib::exHeaderFilterBarActive,0x4010101);
spCascadeTree1->PutBackground(EXCASCADETREELib::BackgroundPartEnum(0x1),0x40000ff);
spCascadeTree1->PutHeaderAppearance(EXCASCADETREELib::Etched);
spCascadeTree1->PutBackColorSortBar(spCascadeTree1->GetBackColor());
spCascadeTree1->PutBackColorLevelHeader(spCascadeTree1->GetBackColor());
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\MN");
spCascadeTree1->EndUpdate();

77
Is it possible to highlight the column's header once a filter is applied

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'

	#import <ExCascadeTree.dll>
	using namespace EXCASCADETREELib;
*/
EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
EXCASCADETREELib::IAppearancePtr var_Appearance = spCascadeTree1->GetVisualAppearance();
	var_Appearance->Add(2,_bstr_t("gBFLBCJwBAEHhEJAAEhABX8GACAADACAxSDEMQBQKAAzQFAYbhgHCGAAGQaBUgmFgAQhFcZQSKUOQTDKNYykCIRSDUJYkSZEIyjBI8ExXFqNACkGKwYgmNYiTLAcgAN") +
"J0WBaGIZJ4gOT5fDKMoEDRRYADFCscwxJybQAqGQKKb+VgAVY/cTyBIAEQSKA0TDOQ5TSKWB4JPZQRBEbZMNBtBIUJquKaqShdQJCU5FdY3Xblez9P7AMBwLFEC4NQ8Y" +
"NYuPhjR4dRTIMhvVAsUArFh8Zg9GZZFjmDIDT4ydBLTQwcyVIKnP5qOa6XbmPoCQDYKxZHYxPzVDa3axuL76dqCAT7XrXNy1TbNRrzQKfcJqfCbdw2YaDZLOOT3fjuI4" +
"hhKaRzFAHJ+jYQ4xHuY4gHuGIXGeExqC8Tp6C+PoEm+G5ImycRgh0XwvDGa5rgOeoejyXwnFeQp2mkf5ClgBB9gCWIYAwfYAEKV58mkdwOggNArgOXY2EWLoDkKOA0mg" +
"bhOGgZApgaSBIHWSYHSmbApgYThmESZYJkIeIkgeCpfliLIHgpMIcmUYYYmODAlg2SI4mWfRfGOEguDcCRjFYAJihCQhJBSDoRmONgKEcI4kFCEJhhOVYTmYnAlEAQhW" +
"BMJYJGYWoWmWSR2F6F5lnkWAQhUAgpEieRWEuSYkjWGpmkmNhuhuZwJkYcocmaaYkjyEhngnUA6lEFAlAEgI=");
	var_Appearance->Add(1,"CP:2 -8 -4 2 4");
spCascadeTree1->PutBackground(EXCASCADETREELib::BackgroundPartEnum(0x0),0x1fefefe);
spCascadeTree1->PutBackground(EXCASCADETREELib::exHeaderFilterBarActive,0x1010101);
spCascadeTree1->PutBackground(EXCASCADETREELib::BackgroundPartEnum(0x20),-1);
spCascadeTree1->PutBackColorHeader(RGB(255,255,255));
spCascadeTree1->PutMode(EXCASCADETREELib::exSingleCascadeMode);
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing);
	var_View->PutHeaderHeight(28);
	var_View->PutDrawGridLines(EXCASCADETREELib::exRowLines);
	var_View->PutHeaderVisible(VARIANT_TRUE);
	EXCASCADETREELib::IColumnsPtr var_Columns = var_View->GetColumns();
		((EXCASCADETREELib::IColumnPtr)(var_Columns->Add(L"C1")))->PutDisplayFilterButton(VARIANT_TRUE);
		EXCASCADETREELib::IColumnPtr var_Column = ((EXCASCADETREELib::IColumnPtr)(var_Columns->Add(L"C2")));
			var_Column->PutDisplayFilterButton(VARIANT_TRUE);
			var_Column->PutFilter(L"Item 2");
			var_Column->PutFilterType(EXCASCADETREELib::exFilter);
		((EXCASCADETREELib::IColumnPtr)(var_Columns->Add(L"C3")))->PutDisplayFilterButton(VARIANT_TRUE);
	EXCASCADETREELib::IItemsPtr var_Items = var_View->GetItems();
		long h = var_Items->AddItem("Item 1");
		var_Items->PutCellValue(h,long(1),"Item 2");
		var_Items->PutCellValue(h,long(2),"Item 3");
		h = var_Items->AddItem("Item 4");
		var_Items->PutCellValue(h,long(1),"Item 5");
		var_Items->PutCellValue(h,long(2),"Item 6");
	var_View->ApplyFilter();
spCascadeTree1->EndUpdate();

76
Is it possible to show the filterbar on top of the rows

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'

	#import <ExCascadeTree.dll>
	using namespace EXCASCADETREELib;
*/
EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::exSingleCascadeMode);
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing);
	var_View->PutColumnAutoResize(VARIANT_TRUE);
	var_View->PutFilterBarPromptVisible(EXCASCADETREELib::exFilterBarTop);
	var_View->PutHeaderHeight(24);
	var_View->PutFilterBarHeight(var_View->GetHeaderHeight());
	var_View->PutHeaderAppearance(EXCASCADETREELib::Flat);
	var_View->PutDrawGridLines(EXCASCADETREELib::exAllLines);
	var_View->PutGridLineStyle(EXCASCADETREELib::exGridLinesGeometric);
	EXCASCADETREELib::IColumnPtr var_Column = ((EXCASCADETREELib::IColumnPtr)(var_View->GetColumns()->Add(L"Column")));
		var_Column->PutDisplayFilterButton(VARIANT_TRUE);
		var_Column->PutFilterType(EXCASCADETREELib::exPattern);
		var_Column->PutFilter(L"B*");
	EXCASCADETREELib::IColumnPtr var_Column1 = ((EXCASCADETREELib::IColumnPtr)(var_View->GetColumns()->Add(L"Index")));
		var_Column1->PutFormatColumn(L"1 index ``");
		var_Column1->PutPosition(0);
		var_Column1->PutWidth(48);
		var_Column1->PutAllowSizing(VARIANT_FALSE);
		var_Column1->PutSortType(EXCASCADETREELib::SortNumeric);
		var_Column1->PutDef(EXCASCADETREELib::exCellHasCheckBox,VARIANT_TRUE);
	EXCASCADETREELib::IItemsPtr var_Items = var_View->GetItems();
		var_Items->AddItem("A.1");
		var_Items->AddItem("A.2");
		var_Items->AddItem("B.1");
		var_Items->AddItem("B.2");
		var_Items->AddItem("B.3");
		var_Items->AddItem("C");
	var_View->ApplyFilter();
spCascadeTree1->EndUpdate();

75
Is there anyway to stop the header changing colour when the mouse hovers/moves across the column header (non-clickable)

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		_variant_t k = var_View->GetParentView()->GetValue(vtMissing);
		var_View->BeginUpdate();
		var_View->PutColumnAutoResize(VARIANT_TRUE);
		var_View->GetColumns()->Add(L"k");
		EXCASCADETREELib::IItemsPtr var_Items = var_View->GetItems();
			var_Items->AddItem(spCascadeTree1->FormatABC(L"A + `-> Sub-Item 1`",k,vtMissing,vtMissing));
			var_Items->AddItem(spCascadeTree1->FormatABC(L"A + `-> Sub-Item 2`",k,vtMissing,vtMissing));
			var_Items->AddItem(spCascadeTree1->FormatABC(L"A + `-> Sub-Item 3`",k,vtMissing,vtMissing));
		var_View->EndUpdate();
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
	var_View->BeginUpdate();
	var_View->PutColumnAutoResize(VARIANT_TRUE);
	EXCASCADETREELib::IColumnPtr var_Column = ((EXCASCADETREELib::IColumnPtr)(var_View->GetColumns()->Add(L"Default")));
		var_Column->PutAllowSort(VARIANT_FALSE);
		var_Column->PutAllowDragging(VARIANT_FALSE);
	var_View->PutKey(long(0));
	EXCASCADETREELib::IItemsPtr var_Items = var_View->GetItems();
		var_Items->AddItem("Item A");
		var_Items->PutSelectItem(var_Items->AddItem("Item B"),VARIANT_TRUE);
		var_Items->AddItem("Item C");
	var_View->EndUpdate();
spCascadeTree1->EndUpdate();

74
Is there anyway to stop the header changing colour when the mouse hovers/moves across the column header

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		_variant_t k = var_View->GetParentView()->GetValue(vtMissing);
		var_View->BeginUpdate();
		var_View->PutColumnAutoResize(VARIANT_TRUE);
		var_View->GetColumns()->Add(L"k");
		EXCASCADETREELib::IItemsPtr var_Items = var_View->GetItems();
			var_Items->AddItem(spCascadeTree1->FormatABC(L"A + `-> Sub-Item 1`",k,vtMissing,vtMissing));
			var_Items->AddItem(spCascadeTree1->FormatABC(L"A + `-> Sub-Item 2`",k,vtMissing,vtMissing));
			var_Items->AddItem(spCascadeTree1->FormatABC(L"A + `-> Sub-Item 3`",k,vtMissing,vtMissing));
		var_View->EndUpdate();
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutBackground(EXCASCADETREELib::BackgroundPartEnum(0x20),-1);
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
	var_View->BeginUpdate();
	var_View->PutColumnAutoResize(VARIANT_TRUE);
	var_View->GetColumns()->Add(L"Default");
	var_View->PutKey(long(0));
	EXCASCADETREELib::IItemsPtr var_Items = var_View->GetItems();
		var_Items->AddItem("Item A");
		var_Items->PutSelectItem(var_Items->AddItem("Item B"),VARIANT_TRUE);
		var_Items->AddItem("Item C");
	var_View->EndUpdate();
spCascadeTree1->EndUpdate();

73
Type of wraps the cell's caption support (Sample 2)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'

	#import <ExCascadeTree.dll>
	using namespace EXCASCADETREELib;
*/
EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->PutMode(EXCASCADETREELib::exSingleCascadeMode);
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing);
	var_View->BeginUpdate();
	var_View->PutHeaderSingleLine(VARIANT_FALSE);
	var_View->PutHeaderHeight(36);
	var_View->PutDrawGridLines(EXCASCADETREELib::exRowLines);
	var_View->PutColumnAutoResize(VARIANT_FALSE);
	var_View->PutScrollBySingleLine(VARIANT_TRUE);
	EXCASCADETREELib::IColumnsPtr var_Columns = var_View->GetColumns();
		EXCASCADETREELib::IColumnPtr var_Column = ((EXCASCADETREELib::IColumnPtr)(var_Columns->Add(L"Single-Line (exCaptionSingleLine)")));
			var_Column->PutWidth(96);
			var_Column->PutDef(EXCASCADETREELib::exCellValueFormat,long(1));
			var_Column->PutDef(EXCASCADETREELib::exCellSingleLine,long(-1));
		EXCASCADETREELib::IColumnPtr var_Column1 = ((EXCASCADETREELib::IColumnPtr)(var_Columns->Add(L"Word-Wrap (exCaptionWordWrap)")));
			var_Column1->PutWidth(96);
			var_Column1->PutDef(EXCASCADETREELib::exCellValueFormat,long(1));
			var_Column1->PutDef(EXCASCADETREELib::exCellSingleLine,long(0));
			var_Column1->PutFormatColumn(L"%0");
		EXCASCADETREELib::IColumnPtr var_Column2 = ((EXCASCADETREELib::IColumnPtr)(var_Columns->Add(L"Break-Wrap (exCaptionBreakWrap)")));
			var_Column2->PutWidth(96);
			var_Column2->PutDef(EXCASCADETREELib::exCellValueFormat,long(1));
			var_Column2->PutDef(EXCASCADETREELib::exCellSingleLine,long(1));
			var_Column2->PutFormatColumn(L"%0");
	EXCASCADETREELib::IItemsPtr var_Items = var_View->GetItems();
		var_Items->AddItem("This is the <b>first</b> line.<br>This is the <b>second</b> line.<br>This is the <b>third</b> line.");
		var_Items->AddItem("This is the <b>first</b> line.\\r\\nThis is the <b>second</b> line.\\r\\nThis is the <b>third</b> line.");
	var_View->EndUpdate();

72
Type of wraps the cell's caption support (Sample 1)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'

	#import <ExCascadeTree.dll>
	using namespace EXCASCADETREELib;
*/
EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->PutMode(EXCASCADETREELib::exSingleCascadeMode);
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing);
	var_View->BeginUpdate();
	var_View->PutHeaderSingleLine(VARIANT_FALSE);
	var_View->PutHeaderHeight(36);
	var_View->PutDrawGridLines(EXCASCADETREELib::exRowLines);
	var_View->PutColumnAutoResize(VARIANT_FALSE);
	var_View->PutScrollBySingleLine(VARIANT_TRUE);
	((EXCASCADETREELib::IColumnPtr)(var_View->GetColumns()->Add(L"Default")))->PutWidth(128);
	EXCASCADETREELib::IItemsPtr var_Items = var_View->GetItems();
		long h = var_Items->AddItem("This is the first line.\\r\\nThis is the second line.\\r\\nThis is the third line.");
		h = var_Items->AddItem("This is the <b>first</b> line.<br>This is the <b>second</b> line.<br>This is the <b>third</b> line.");
		var_Items->PutCellValueFormat(h,long(0),EXCASCADETREELib::exHTML);
		h = var_Items->AddItem("This is the first line.\\r\\nThis is the second line.\\r\\nThis is the third line.");
		var_Items->PutCellSingleLine(h,long(0),EXCASCADETREELib::exCaptionWordWrap);
		h = var_Items->AddItem("This is the <b>first</b> line.<br>This is the <b>second</b> line.<br>This is the <b>third</b> line.");
		var_Items->PutCellValueFormat(h,long(0),EXCASCADETREELib::exHTML);
		var_Items->PutCellSingleLine(h,long(0),EXCASCADETREELib::exCaptionWordWrap);
		h = var_Items->AddItem("This is the first line.\\r\\nThis is the second line.\\r\\nThis is the third line.");
		var_Items->PutCellSingleLine(h,long(0),EXCASCADETREELib::exCaptionBreakWrap);
		h = var_Items->AddItem("This is the <b>first</b> line.<br>This is the <b>second</b> line.<br>This is the <b>third</b> line.");
		var_Items->PutCellValueFormat(h,long(0),EXCASCADETREELib::exHTML);
		var_Items->PutCellSingleLine(h,long(0),EXCASCADETREELib::exCaptionBreakWrap);
	var_View->EndUpdate();

71
Can I break the cell's caption using the line break <br> or \r\n (Sample 2)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'

	#import <ExCascadeTree.dll>
	using namespace EXCASCADETREELib;
*/
EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->PutMode(EXCASCADETREELib::exSingleCascadeMode);
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing);
	var_View->BeginUpdate();
	var_View->PutDrawGridLines(EXCASCADETREELib::exRowLines);
	var_View->PutColumnAutoResize(VARIANT_FALSE);
	var_View->PutScrollBySingleLine(VARIANT_TRUE);
	((EXCASCADETREELib::IColumnPtr)(var_View->GetColumns()->Add(L"Default")))->PutWidth(128);
	EXCASCADETREELib::IItemsPtr var_Items = var_View->GetItems();
		var_Items->PutCellSingleLine(var_Items->AddItem("This is the first line.\\r\\nThis is the second line.\\r\\nThis is the third line."),long(0),EXCASCADETREELib::exCaptionBreakWrap);
		var_Items->AddItem("This is the first line.\\r\\nThis is the second line.\\r\\nThis is the third line.");
	var_View->EndUpdate();

70
Can I break the cell's caption using the line break <br> or \r\n (Sample 1)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'

	#import <ExCascadeTree.dll>
	using namespace EXCASCADETREELib;
*/
EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->PutMode(EXCASCADETREELib::exSingleCascadeMode);
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing);
	var_View->BeginUpdate();
	var_View->PutDrawGridLines(EXCASCADETREELib::exRowLines);
	var_View->PutColumnAutoResize(VARIANT_FALSE);
	var_View->PutScrollBySingleLine(VARIANT_TRUE);
	EXCASCADETREELib::IColumnPtr var_Column = ((EXCASCADETREELib::IColumnPtr)(var_View->GetColumns()->Add(L"Default")));
		var_Column->PutWidth(128);
		var_Column->PutDef(EXCASCADETREELib::exCellSingleLine,long(1));
	EXCASCADETREELib::IItemsPtr var_Items = var_View->GetItems();
		var_Items->AddItem("This is the first line.\\r\\nThis is the second line.\\r\\nThis is the third line.");
		var_Items->AddItem("This is the first line.\\r\\nThis is the second line.\\r\\nThis is the third line.");
	var_View->EndUpdate();

69
Is it possible to change the visual appearance of the position signs when user changes the column's position by drag and drop

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'

	#import <ExCascadeTree.dll>
	using namespace EXCASCADETREELib;
*/
EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
EXCASCADETREELib::IAppearancePtr var_Appearance = spCascadeTree1->GetVisualAppearance();
	var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABZEGACAADACAxRDgMQBQKAAzAJBIYhiG4cYCgMYxXDOCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADKMA4SOKIZhrE4bBhGaQRUgyI43RhHUBzV") +
"IUcQvE6TZRHCQYHgkNIhDJIM7TPLkeSVJaTIRoKhJUogApQThTMgVRDEThkGoSa6soSoYTDBKybLrSLKagOT5YUDKUqSdKEZRpEq1YztWbaQoCUoqVRRVIWfbNd4JJa4" +
"aDhWpYdpeeY5R7bWLgBYVVABL7LLRsSxpHxPF6RXxaeI3GKsaS8G6ic6nPQMHj7I4NS5pUa6Rh2VYNSa8AAtETRYznOw4bTMXAjNIea5bAYIIR5HIoDzVbQcCQAHL9DB" +
"eEMIQEEISgGhMGZQmocgymoYRRCIEQ0G2HYBnEIBig4V4zCQGINnmagCECY43medZ6H2Pw/g+X5fnueh/h+R5+AKABfkMWgGgGYA4AICoCGCE5WA4CphACMgSD2IRIDI" +
"BICmEd5YGCBpRjGBgegWIYIgWdgoGIRQsiKCZiAiJZ0gGQI4jUS4LECOAiBmDJflGfg2BSY4Al4OhGkOCJ2DgFJjGGfgqgiH5Ch4RhGkqOQmEOEpkFkHQYhJRYyESAok" +
"GKHhIhKIxJEmf4VGUeRGFmF5iBkchPhYJQ5GoYIZg6Ug6GoFYmkmNhuhulRGHKGoImefh0BUZ4JmYeoemeSZ2H6HQmgoBgXDqXwUAQgI=");
	var_Appearance->Add(2,"CP:1 0 -36 0 0");
spCascadeTree1->PutBackground(EXCASCADETREELib::exColumnsPositionSign,0x2000000);
spCascadeTree1->PutMode(EXCASCADETREELib::exSingleCascadeMode);
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing);
	var_View->BeginUpdate();
	var_View->PutHeaderAppearance(EXCASCADETREELib::Etched);
	EXCASCADETREELib::IColumnsPtr var_Columns = var_View->GetColumns();
		var_Columns->Add(L"Column 1");
		var_Columns->Add(L"Column 2");
		var_Columns->Add(L"Column 3");
	var_View->EndUpdate();
spCascadeTree1->EndUpdate();

68
DataSource (control, ADODB, ACCDB, x64)

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	_variant_t bSingle = spCascadeTree1->FormatABC(L"value > 0 ?  0 : -1",spCascadeTree1->GetView()->GetIndex(),vtMissing,vtMissing);
	_variant_t bColumnAutoResize = spCascadeTree1->FormatABC(L"value = `City` ?  0 : -1",spCascadeTree1->GetView()->GetTag(),vtMissing,vtMissing);
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		var_View->PutColumnAutoResize(VARIANT_FALSE);
		var_View->PutSingleSel(VARIANT_FALSE);
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::CascadeModeEnum(EXCASCADETREELib::exAutoFitOnResizeClient | EXCASCADETREELib::exSplitFixCascadeMode));
spCascadeTree1->PutDataSource(_bstr_t("locktype=1;Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=C") +
"ountryCode;Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateC" +
"ode;Name=StateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>" +
"> Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=C" +
"ity;Name=Name");
spCascadeTree1->PutSelect(L"US\\AK");
spCascadeTree1->EndUpdate();

67
DataSource (view, ADODB, ACCDB, x64)

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutStatusBarVisible(EXCASCADETREELib::exStatusBarAnchorTop);
spCascadeTree1->PutStatusBarLabel(L"<b>DataSource</b> could be string (Source/Member), ADO or DAO objects");
spCascadeTree1->PutDefColumnWidth(336);
/*
	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 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr ado = ::CreateObject(L"ADODB.Recordset");
	ado->Open("Countries","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb",ADODB::adOpenStatic,ADODB::adLockReadOnly,-1);
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing);
	var_View->PutDataSource(((ADODB::_RecordsetPtr)(ado)));
	var_View->PutColumnAutoResize(VARIANT_TRUE);
spCascadeTree1->EndUpdate();

66
Simple sample

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	_variant_t bSingle = spCascadeTree1->FormatABC(L"value > 0 ?  0 : -1",spCascadeTree1->GetView()->GetIndex(),vtMissing,vtMissing);
	_variant_t bColumnAutoResize = spCascadeTree1->FormatABC(L"value = `City` ?  0 : -1",spCascadeTree1->GetView()->GetTag(),vtMissing,vtMissing);
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		var_View->PutColumnAutoResize(VARIANT_FALSE);
		var_View->PutSingleSel(VARIANT_FALSE);
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::CascadeModeEnum(EXCASCADETREELib::exAutoFitOnResizeClient | EXCASCADETREELib::exSplitFixCascadeMode));
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->EndUpdate();

65
FilterBar sample

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		var_View->PutHeaderHeight(20);
		var_View->PutHeaderAppearance(EXCASCADETREELib::Etched);
		var_View->PutDrawGridLines(EXCASCADETREELib::exAllLines);
		var_View->PutGridLineStyle(EXCASCADETREELib::exGridLinesDash);
	EXCASCADETREELib::IViewPtr var_View1 = spCascadeTree1->GetDefaultView(vtMissing);
		EXCASCADETREELib::IViewPtr var_View2 = var_View1->GetView("Country");
			var_View2->BeginUpdate();
			var_View2->PutColumnAutoResize(VARIANT_TRUE);
			var_View2->GetColumns()->GetItem(long(0))->PutVisible(VARIANT_FALSE);
			EXCASCADETREELib::IColumnPtr var_Column = var_View2->GetColumns()->GetItem(long(1));
				var_Column->PutHTMLCaption(L"Country");
				var_Column->PutDisplayFilterButton(VARIANT_TRUE);
				var_Column->PutFilterList(EXCASCADETREELib::FilterListEnum(EXCASCADETREELib::exShowExclude | EXCASCADETREELib::exShowFocusItem | EXCASCADETREELib::exShowCheckBox | EXCASCADETREELib::exSortItemsAsc));
				var_Column->PutFilterBarDropDownWidth(2);
			var_View2->EndUpdate();
		EXCASCADETREELib::IViewPtr var_View3 = var_View1->GetView("State");
			var_View3->BeginUpdate();
			var_View3->PutColumnAutoResize(VARIANT_TRUE);
			var_View3->GetColumns()->GetItem(long(0))->PutVisible(VARIANT_FALSE);
			var_View3->GetColumns()->GetItem(long(1))->PutVisible(VARIANT_FALSE);
			EXCASCADETREELib::IColumnPtr var_Column1 = var_View3->GetColumns()->GetItem(long(2));
				var_Column1->PutHTMLCaption(L"State");
				var_Column1->PutDisplayFilterButton(VARIANT_TRUE);
				var_Column1->PutFilterList(EXCASCADETREELib::FilterListEnum(EXCASCADETREELib::exShowExclude | EXCASCADETREELib::exShowFocusItem | EXCASCADETREELib::exShowCheckBox | EXCASCADETREELib::exSortItemsAsc));
				var_Column1->PutFilterBarDropDownWidth(2);
			var_View3->EndUpdate();
		EXCASCADETREELib::IViewPtr var_View4 = var_View1->GetView("City");
			var_View4->BeginUpdate();
			var_View4->GetColumns()->GetItem("CountryCode")->PutVisible(VARIANT_FALSE);
			var_View4->GetColumns()->GetItem("StateCode")->PutVisible(VARIANT_FALSE);
			EXCASCADETREELib::IColumnPtr var_Column2 = var_View4->GetColumns()->GetItem("Name");
				var_Column2->PutHTMLCaption(L"City");
				var_Column2->PutWidth(128);
				var_Column2->PutDisplayFilterButton(VARIANT_TRUE);
				var_Column2->PutFilterList(EXCASCADETREELib::FilterListEnum(EXCASCADETREELib::exShowExclude | EXCASCADETREELib::exShowFocusItem | EXCASCADETREELib::exShowCheckBox | EXCASCADETREELib::exSortItemsAsc));
				var_Column2->PutFilterBarDropDownWidth(2);
			var_View4->PutSearchColumnIndex(var_View4->GetColumns()->GetItem("Name")->GetIndex());
			EXCASCADETREELib::IColumnPtr var_Column3 = var_View4->GetColumns()->GetItem("Status");
				var_Column3->PutDisplayFilterButton(VARIANT_TRUE);
				var_Column3->PutFilterList(EXCASCADETREELib::FilterListEnum(EXCASCADETREELib::exShowExclude | EXCASCADETREELib::exShowFocusItem | EXCASCADETREELib::exShowCheckBox | EXCASCADETREELib::exSortItemsAsc));
				var_Column3->PutFilterBarDropDownWidth(2);
			EXCASCADETREELib::IColumnPtr var_Column4 = var_View4->GetColumns()->GetItem("Function");
				var_Column4->PutDef(EXCASCADETREELib::exCellValueFormat,long(1));
				var_Column4->PutFormatColumn(_bstr_t("value replace 1 with `<img>1</img>` replace 2 with `<img>2</img>` replace 3 with `<img>3</img>` replace 4 with `<img>4</img>` r") +
	"eplace 5 with `<img>5</img>` replace 6 with `<img>6</img>` replace 7 with `<img>7</img>` replace 8 with `<img>8</img>` replace 9" +
	" with `<img>9</img>` replace `-` with `` ");
			EXCASCADETREELib::IColumnPtr var_Column5 = ((EXCASCADETREELib::IColumnPtr)(var_View4->GetColumns()->Add(L"Pos")));
				var_Column5->PutAllowSizing(VARIANT_FALSE);
				var_Column5->PutWidth(32);
				var_Column5->PutDef(EXCASCADETREELib::exCellBackColor,long(15790320));
				var_Column5->PutPosition(0);
				var_Column5->PutFormatColumn(L"1 pos ``");
				var_Column5->PutAlignment(EXCASCADETREELib::CenterAlignment);
				var_Column5->PutHeaderAlignment(var_Column5->GetAlignment());
			var_View4->PutCountLockedColumns(1);
			var_View4->PutWidth(var_View4->GetWidthToFit());
			var_View4->EndUpdate();
	EXCASCADETREELib::IViewPtr var_View5 = spCascadeTree1->GetView();
		var_View5->PutFilterBarHeight(36);
		var_View5->PutFilterBarCaption(_bstr_t("(( ( allui replace `[<b>` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replace `</b>]` with ` </b></bgcolor></fgcolor>` replace ") +
	"`[<s>` with `<bgcolor=C0C0C0><fgcolor=FFFFFF> ` replace `</s>]` with ` </fgcolor></bgcolor>` )  + `<r><fgcolor=808080>` + ( matc" +
	"hitemcount < 0 ? ( ( len(value) ? `` : `` ) + `<r>` + abs(matchitemcount + 1) + ` result(s)` ) : (`<r><fgcolor=808080>`+ itemcou" +
	"nt + ` item(s)`) )))");
		var_View5->PutFilterBarPromptVisible(EXCASCADETREELib::FilterBarVisibleEnum(EXCASCADETREELib::exFilterBarShowCloseIfRequired | EXCASCADETREELib::exFilterBarVisible | EXCASCADETREELib::exFilterBarPromptVisible));
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->Images("C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Bullets\\Bullet-01.ico");
spCascadeTree1->Images("C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Bullets\\Bullet-02.ico");
spCascadeTree1->Images("C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Bullets\\Bullet-03.ico");
spCascadeTree1->Images("C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Bullets\\Bullet-04.ico");
spCascadeTree1->Images("C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Bullets\\Bullet-05.ico");
spCascadeTree1->Images("C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Bullets\\Bullet-06.ico");
spCascadeTree1->Images("C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Bullets\\Bullet-07.ico");
spCascadeTree1->Images("C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Bullets\\Bullet-08.ico");
spCascadeTree1->Images("C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Bullets\\Bullet-09.ico");
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.mdb;Member=Select * FROM Countries;Key=CountryCode;Ta") +
"g=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=Stat" +
"eName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Sele" +
"ct * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name" +
"");
spCascadeTree1->PutSelect(L"RO\\CJ");
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing)->GetView("City");
	var_View->PutFilterBarPromptPattern(L"Tu");
EXCASCADETREELib::IAppearancePtr var_Appearance = spCascadeTree1->GetVisualAppearance();
	var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABZEGACAADACAxRDgMQBQKAAzAJBIYhiG4cYCgMYxXDOCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADKMA4SOKIZhrE4bBhGaQRUgyI43RhHUBzV") +
"IUcQvE6TZRHCQYHgkNIhDJIM7TPLkeSVJaTIRoKhJUogApQThTMgVRDEThkGoSa6soSoYTDBKybLrSLKagOT5YUDKUqSdKEZRpEq1YztWbaQoCUoqVRRVIWfbNd4JJa4" +
"aDhWpYdpeeY5R7bWLgBYVVABL7LLRsSxpHxPF6RXxaeI3GKsaS8G6ic6nPQMHj7I4NS5pUa6Rh2VYNSa8AAtETRYznOw4bTMXAjNIea5bAYIIR5HIoDzVbQcCQAHL9DB" +
"e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5QEQEQMmcWg/GwD5ylyNw2gMcJcjsBgBgOQQDDhRpVAMMwnDBFw1B0Ax8D0DxOmmJJIGQTY5hGMAwkwM4CAYLZAmAOJnAqAojiIGg6iieYkmeAYOHaK" +
"JDCyCwjH6AoggsQpQliAJLhgaJ0CESBTnyDwjk+cg4g4P5IHIHJ+BWRRzlYWAxiOUxihsY4KjKLJRGqC44FCegkkkM58iAKAPnIWIWD8SRSFSfQnkmewUhYP4GiGKJ7G" +
"0TIbCSUoggqUo0lAQ4LnEcBcD8Coiiif4nE+eAAn2HpOkcFJqi4T5SkyMw/kqQown8IBIBOdA+A+DJrBqVxXEqYo4lCApLhGHBnD8S4ymyfxmg+cwQkQP5egOUZIWoEA" +
"kjIeIPBMBJBD+TBjBifwvkuc58hQJQPmFrYykkchclSApKjGOBuD+TRDFCfw3mmIxNi8FxFlOXhVC4aYDFyPgvg2YBcBcLZGCGCJ0DSLRzGSWQ/lmY5+mEP5gmMDBZRS" +
"MRsFsOxMhMJJ/DsTpTnwaQaE+N5ojuNhdEYNI5C4TZJO1GRDmCaxnA2Yx4n8IpIjOTBQBQC5TgyYw7gUYRYikC0BYRwsDQBoB8eA6Q2hsE0BUXgywZtYCyHMKwnxSAhA" +
"QHkIQhRrBaDsCwA4ERiB2EWAIYIXhhiVEgAEUYwwYjyASLge4FhHgRDkM8OQih0jWPkGgBBAQ");
spCascadeTree1->PutBackColorSortBar(spCascadeTree1->GetBackColor());
spCascadeTree1->PutScrollPartVisible(EXCASCADETREELib::exVScroll,EXCASCADETREELib::exExtentThumbPart,VARIANT_TRUE);
spCascadeTree1->PutScrollPartVisible(EXCASCADETREELib::exHScroll,EXCASCADETREELib::exExtentThumbPart,VARIANT_TRUE);
spCascadeTree1->PutScrollPartVisible(EXCASCADETREELib::exScroll,EXCASCADETREELib::exExtentThumbPart,VARIANT_TRUE);
spCascadeTree1->PutScrollWidth(4);
spCascadeTree1->PutBackground(EXCASCADETREELib::exVSBack,RGB(240,240,240));
spCascadeTree1->PutBackground(EXCASCADETREELib::exVSThumb,RGB(128,128,128));
spCascadeTree1->PutScrollHeight(4);
spCascadeTree1->PutBackground(EXCASCADETREELib::exHSBack,spCascadeTree1->GetBackground(EXCASCADETREELib::exVSBack));
spCascadeTree1->PutBackground(EXCASCADETREELib::exHSThumb,spCascadeTree1->GetBackground(EXCASCADETREELib::exVSThumb));
spCascadeTree1->PutBackground(EXCASCADETREELib::exScrollSizeGrip,spCascadeTree1->GetBackground(EXCASCADETREELib::exVSBack));
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutBackground(EXCASCADETREELib::exCSplitBar,spCascadeTree1->GetBackground(EXCASCADETREELib::exSplitBar));
spCascadeTree1->PutBackground(EXCASCADETREELib::exHSplitBar,spCascadeTree1->GetBackground(EXCASCADETREELib::exSplitBar));
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBarSize,RGB(4,0,0));
spCascadeTree1->PutBackground(EXCASCADETREELib::BackgroundPartEnum(0x0),0x1000000);
spCascadeTree1->PutBackground(EXCASCADETREELib::BackgroundPartEnum(0x1),0x2000000);
spCascadeTree1->PutBackground(EXCASCADETREELib::BackgroundPartEnum(0x20),-1);
spCascadeTree1->EndUpdate();

64
GroupBy sample

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	spCascadeTree1->GetView()->PutHeaderHeight(24);
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing);
		EXCASCADETREELib::IViewPtr var_View1 = var_View->GetView("State");
			var_View1->BeginUpdate();
			var_View1->PutSingleSel(VARIANT_FALSE);
			var_View1->PutColumnAutoResize(VARIANT_TRUE);
			var_View1->GetColumns()->GetItem(long(0))->PutVisible(VARIANT_FALSE);
			var_View1->GetColumns()->GetItem(long(1))->PutVisible(VARIANT_FALSE);
			EXCASCADETREELib::IColumnPtr var_Column = var_View1->GetColumns()->GetItem(long(2));
				var_Column->PutHTMLCaption(L"State <off 4><fgcolor=808080>Name");
				var_Column->PutSortOrder(EXCASCADETREELib::SortAscending);
			var_View1->EndUpdate();
		EXCASCADETREELib::IViewPtr var_View2 = var_View->GetView("City");
			long nSelected = var_View2->GetParentView()->GetItems()->GetSelectCount();
			_variant_t bGroupBy = spCascadeTree1->FormatABC(L"value > 1 ? -1 : 0",nSelected,vtMissing,vtMissing);
			var_View2->BeginUpdate();
			var_View2->PutSingleSel(VARIANT_FALSE);
			var_View2->PutSortBarCaption(L"Drag a <b>column</b> header here to group by that column.");
			var_View2->PutHasLines(EXCASCADETREELib::exSolidLine);
			var_View2->PutColumnAutoResize(VARIANT_FALSE);
			var_View2->PutDrawGridLines(EXCASCADETREELib::exVLines);
			var_View2->PutGridLineStyle(EXCASCADETREELib::exGridLinesVSolid);
			var_View2->GetColumns()->GetItem("CountryCode")->PutVisible(VARIANT_FALSE);
			EXCASCADETREELib::IColumnPtr var_Column1 = var_View2->GetColumns()->GetItem("Name");
				var_Column1->PutHTMLCaption(L"City <off 4><fgcolor=808080>Name");
				var_Column1->PutWidth(128);
				var_Column1->PutSortOrder(EXCASCADETREELib::SortAscending);
			var_View2->PutSearchColumnIndex(2);
			var_View2->PutTreeColumnIndex(var_View2->GetSearchColumnIndex());
			var_View2->PutSingleSort(VARIANT_FALSE);
			var_View2->PutAllowGroupBy(VARIANT_FALSE);
			var_View2->PutSortBarVisible(VARIANT_FALSE);
			EXCASCADETREELib::IColumnPtr var_Column2 = var_View2->GetColumns()->GetItem("StateCode");
				var_Column2->PutVisible(VARIANT_FALSE);
				var_Column2->PutSortOrder(EXCASCADETREELib::SortAscending);
			var_View2->PutWidth(var_View2->GetWidthToFit());
			var_View2->EndUpdate();
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
EXCASCADETREELib::IAppearancePtr var_Appearance = spCascadeTree1->GetVisualAppearance();
	var_Appearance->Add(1,"C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\EBN\\Assorted\\vistaselDark.ebn");
	var_Appearance->Add(2,"C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\EBN\\Assorted\\bhframe.ebn");
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.mdb;Member=Select * FROM Countries;Key=CountryCode;Ta") +
"g=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=Stat" +
"eName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Sele" +
"ct * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name" +
"");
spCascadeTree1->PutSelect(L"RO\\CJ|BV|GL|IL");
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing)->GetView("Country");
	var_View->BeginUpdate();
	var_View->PutColumnAutoResize(VARIANT_TRUE);
	var_View->GetColumns()->GetItem(long(0))->PutVisible(VARIANT_FALSE);
	EXCASCADETREELib::IColumnPtr var_Column = var_View->GetColumns()->GetItem(long(1));
		var_Column->PutHTMLCaption(L"Country <off 4><fgcolor=808080>Name");
		var_Column->PutSortOrder(EXCASCADETREELib::SortAscending);
	var_View->EndUpdate();
spCascadeTree1->PutSelBackColor(0x1000000);
spCascadeTree1->PutSelForeColor(RGB(255,255,255));
spCascadeTree1->PutBackColorHeader(0x2000000);
spCascadeTree1->PutBackColorSortBar(spCascadeTree1->GetBackColor());
spCascadeTree1->PutBackColorSortBarCaption(spCascadeTree1->GetBackColor());
spCascadeTree1->PutScrollPartVisible(EXCASCADETREELib::exVScroll,EXCASCADETREELib::exExtentThumbPart,VARIANT_TRUE);
spCascadeTree1->PutScrollPartVisible(EXCASCADETREELib::exHScroll,EXCASCADETREELib::exExtentThumbPart,VARIANT_TRUE);
spCascadeTree1->PutScrollPartVisible(EXCASCADETREELib::exScroll,EXCASCADETREELib::exExtentThumbPart,VARIANT_TRUE);
spCascadeTree1->PutScrollWidth(4);
spCascadeTree1->PutBackground(EXCASCADETREELib::exVSBack,RGB(240,240,240));
spCascadeTree1->PutBackground(EXCASCADETREELib::exVSThumb,RGB(128,128,128));
spCascadeTree1->PutScrollHeight(4);
spCascadeTree1->PutBackground(EXCASCADETREELib::exHSBack,spCascadeTree1->GetBackground(EXCASCADETREELib::exVSBack));
spCascadeTree1->PutBackground(EXCASCADETREELib::exHSThumb,spCascadeTree1->GetBackground(EXCASCADETREELib::exVSThumb));
spCascadeTree1->PutBackground(EXCASCADETREELib::exScrollSizeGrip,spCascadeTree1->GetBackground(EXCASCADETREELib::exVSBack));
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutBackground(EXCASCADETREELib::exCSplitBar,spCascadeTree1->GetBackground(EXCASCADETREELib::exSplitBar));
spCascadeTree1->PutBackground(EXCASCADETREELib::exHSplitBar,spCascadeTree1->GetBackground(EXCASCADETREELib::exSplitBar));
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBarSize,RGB(4,0,0));
spCascadeTree1->PutBackColorSortBar(spCascadeTree1->GetBackColor());
spCascadeTree1->EndUpdate();

63
Manual sample

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   V)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		var_View->BeginUpdate();
		_variant_t k = var_View->GetParentView()->GetValue(vtMissing);
		var_View->PutHeaderVisible(VARIANT_FALSE);
		var_View->PutColumnAutoResize(VARIANT_TRUE);
		var_View->PutScrollBySingleLine(VARIANT_TRUE);
		((EXCASCADETREELib::IColumnPtr)(var_View->GetColumns()->Add(L"Default")))->PutDef(EXCASCADETREELib::exCellSingleLine,VARIANT_FALSE);
		var_View->PutKey(long(0));
		EXCASCADETREELib::IItemsPtr var_Items = var_View->GetItems();
			var_Items->AddItem(spCascadeTree1->FormatABC(L"A + `.Child 1`",k,vtMissing,vtMissing));
			var_Items->AddItem(spCascadeTree1->FormatABC(L"A + `.Child 2`",k,vtMissing,vtMissing));
			var_Items->AddItem(spCascadeTree1->FormatABC(L"A + `.Child 3`",k,vtMissing,vtMissing));
		var_View->EndUpdate();
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutBackColorAlternate(0x7ff0f0f0);
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(240,240,240));
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing);
	var_View->BeginUpdate();
	var_View->PutHeaderVisible(VARIANT_FALSE);
	var_View->PutColumnAutoResize(VARIANT_TRUE);
	var_View->PutScrollBySingleLine(VARIANT_TRUE);
	((EXCASCADETREELib::IColumnPtr)(var_View->GetColumns()->Add(L"Default")))->PutDef(EXCASCADETREELib::exCellSingleLine,VARIANT_FALSE);
	var_View->PutKey(long(0));
	EXCASCADETREELib::IItemsPtr var_Items = var_View->GetItems();
		var_Items->AddItem("Item A");
		var_Items->AddItem("Item B");
		var_Items->AddItem("Item C");
	var_View->EndUpdate();
spCascadeTree1->PutSelect(L"Item A\\Item*A*2\\Item*A*2*3\\");
spCascadeTree1->EndUpdate();

62
Appearance sample

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	spCascadeTree1->GetView()->PutHeaderHeight(24);
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing);
		EXCASCADETREELib::IViewPtr var_View1 = var_View->GetView("State");
			var_View1->BeginUpdate();
			var_View1->PutColumnAutoResize(VARIANT_TRUE);
			var_View1->GetColumns()->GetItem(long(0))->PutVisible(VARIANT_FALSE);
			var_View1->GetColumns()->GetItem(long(1))->PutVisible(VARIANT_FALSE);
			EXCASCADETREELib::IColumnPtr var_Column = var_View1->GetColumns()->GetItem(long(2));
				var_Column->PutHTMLCaption(L"State <off 4><fgcolor=808080>Name");
				var_Column->PutSortOrder(EXCASCADETREELib::SortAscending);
			EXCASCADETREELib::IItemsPtr var_Items = var_View1->GetItems();
				var_Items->PutLockedItemCount(EXCASCADETREELib::exTop,1);
				long h = var_Items->GetLockedItem(EXCASCADETREELib::exTop,0);
				var_Items->PutItemDivider(h,0);
				var_Items->PutCellValueFormat(h,long(0),EXCASCADETREELib::ValueFormatEnum(EXCASCADETREELib::exTotalField | EXCASCADETREELib::exHTML));
				var_Items->PutCellValue(h,long(0),"count(all,all,1)");
				var_Items->PutFormatCell(h,long(0),L"`<r>States: <b>`+ (value format `0`)");
			var_View1->EndUpdate();
		EXCASCADETREELib::IViewPtr var_View2 = var_View->GetView("City");
			var_View2->BeginUpdate();
			var_View2->PutSingleSel(VARIANT_FALSE);
			var_View2->PutColumnAutoResize(VARIANT_FALSE);
			var_View2->PutDrawGridLines(EXCASCADETREELib::exVLines);
			var_View2->PutGridLineStyle(EXCASCADETREELib::exGridLinesVSolid);
			var_View2->GetColumns()->GetItem(long(0))->PutVisible(VARIANT_FALSE);
			var_View2->GetColumns()->GetItem(long(1))->PutVisible(VARIANT_FALSE);
			EXCASCADETREELib::IColumnPtr var_Column1 = var_View2->GetColumns()->GetItem(long(2));
				var_Column1->PutHTMLCaption(L"City <off 4><fgcolor=808080>Name");
				var_Column1->PutWidth(128);
				var_Column1->PutDef(EXCASCADETREELib::exCellHasCheckBox,VARIANT_TRUE);
				var_Column1->PutSortOrder(EXCASCADETREELib::SortAscending);
			var_View2->PutSearchColumnIndex(2);
			var_View2->GetConditionalFormats()->Add(L"%CS2 = 1",vtMissing)->PutBold(VARIANT_TRUE);
			EXCASCADETREELib::IItemsPtr var_Items1 = var_View2->GetItems();
				var_Items1->PutLockedItemCount(EXCASCADETREELib::exTop,1);
				h = var_Items1->GetLockedItem(EXCASCADETREELib::exTop,0);
				var_Items1->PutItemDivider(h,0);
				var_Items1->PutCellValueFormat(h,long(0),EXCASCADETREELib::ValueFormatEnum(EXCASCADETREELib::exTotalField | EXCASCADETREELib::exHTML));
				var_Items1->PutCellValue(h,long(0),"count(all,all,1)");
				var_Items1->PutFormatCell(h,long(0),L"`<r>Cities: <b>`+ (value format `0`)");
			var_View2->PutWidth(var_View2->GetWidthToFit());
			var_View2->EndUpdate();
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
EXCASCADETREELib::IAppearancePtr var_Appearance = spCascadeTree1->GetVisualAppearance();
	var_Appearance->Add(1,"C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\EBN\\MSOffice-Ribbon\\msor_select.ebn");
	var_Appearance->Add(2,"C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\EBN\\MSOffice-Ribbon\\msor_background.ebn");
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.mdb;Member=Select * FROM Countries;Key=CountryCode;Ta") +
"g=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=Stat" +
"eName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Sele" +
"ct * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Name" +
"");
spCascadeTree1->PutSelect(L"US\\AK");
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing)->GetView("Country");
	var_View->BeginUpdate();
	var_View->PutColumnAutoResize(VARIANT_TRUE);
	var_View->GetColumns()->GetItem(long(0))->PutVisible(VARIANT_FALSE);
	EXCASCADETREELib::IColumnPtr var_Column = var_View->GetColumns()->GetItem(long(1));
		var_Column->PutHTMLCaption(L"Country <off 4><fgcolor=808080>Name");
		var_Column->PutSortOrder(EXCASCADETREELib::SortAscending);
	EXCASCADETREELib::IItemsPtr var_Items = var_View->GetItems();
		var_Items->PutLockedItemCount(EXCASCADETREELib::exTop,1);
		long h = var_Items->GetLockedItem(EXCASCADETREELib::exTop,0);
		var_Items->PutItemDivider(h,0);
		var_Items->PutCellValueFormat(h,long(0),EXCASCADETREELib::ValueFormatEnum(EXCASCADETREELib::exTotalField | EXCASCADETREELib::exHTML));
		var_Items->PutCellValue(h,long(0),"count(all,all,1)");
		var_Items->PutFormatCell(h,long(0),L"`<r>Countries: <b>`+ (value format `0`)");
	var_View->EndUpdate();
spCascadeTree1->PutSelBackColor(0x1000000);
spCascadeTree1->PutSelForeColor(RGB(0,0,0));
spCascadeTree1->PutBackColorHeader(0x2000000);
spCascadeTree1->PutScrollPartVisible(EXCASCADETREELib::exVScroll,EXCASCADETREELib::exExtentThumbPart,VARIANT_TRUE);
spCascadeTree1->PutScrollPartVisible(EXCASCADETREELib::exHScroll,EXCASCADETREELib::exExtentThumbPart,VARIANT_TRUE);
spCascadeTree1->PutScrollPartVisible(EXCASCADETREELib::exScroll,EXCASCADETREELib::exExtentThumbPart,VARIANT_TRUE);
spCascadeTree1->PutScrollWidth(4);
spCascadeTree1->PutBackground(EXCASCADETREELib::exVSBack,RGB(240,240,240));
spCascadeTree1->PutBackground(EXCASCADETREELib::exVSThumb,RGB(128,128,128));
spCascadeTree1->PutScrollHeight(4);
spCascadeTree1->PutBackground(EXCASCADETREELib::exHSBack,spCascadeTree1->GetBackground(EXCASCADETREELib::exVSBack));
spCascadeTree1->PutBackground(EXCASCADETREELib::exHSThumb,spCascadeTree1->GetBackground(EXCASCADETREELib::exVSThumb));
spCascadeTree1->PutBackground(EXCASCADETREELib::exScrollSizeGrip,spCascadeTree1->GetBackground(EXCASCADETREELib::exVSBack));
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutBackground(EXCASCADETREELib::exCSplitBar,spCascadeTree1->GetBackground(EXCASCADETREELib::exSplitBar));
spCascadeTree1->PutBackground(EXCASCADETREELib::exHSplitBar,spCascadeTree1->GetBackground(EXCASCADETREELib::exSplitBar));
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBarSize,RGB(4,0,0));
spCascadeTree1->PutBackColorSortBar(spCascadeTree1->GetBackColor());
spCascadeTree1->EndUpdate();

61
How can I get the selected items (sample 2)
// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		_variant_t k = var_View->GetParentView()->GetValue(vtMissing);
		var_View->BeginUpdate();
		var_View->PutColumnAutoResize(VARIANT_TRUE);
		var_View->PutKey(long(-1));
		var_View->GetColumns()->Add(L"k");
		EXCASCADETREELib::IItemsPtr var_Items = var_View->GetItems();
			var_Items->AddItem(spCascadeTree1->FormatABC(L"A + `-> Sub-Item 1`",k,vtMissing,vtMissing));
			var_Items->AddItem(spCascadeTree1->FormatABC(L"A + `-> Sub-Item 2`",k,vtMissing,vtMissing));
			var_Items->AddItem(spCascadeTree1->FormatABC(L"A + `-> Sub-Item 3`",k,vtMissing,vtMissing));
		var_View->EndUpdate();
}

// ViewItemStateEndChanging event - Indicates that the state of the item has been changed.
void OnViewItemStateEndChangingCascadeTree1(long   Operation,long   Item,long   ColIndex)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"End" );
	OutputDebugStringW( L"Operation" );
	EXCASCADETREELib::IItemsPtr var_Items = spCascadeTree1->GetView()->GetItems();
		OutputDebugStringW( L"FocusItem" );
		OutputDebugStringW( var_Items->GetCellCaption(var_Items->GetFocusItem(),long(0)) );
		OutputDebugStringW( L"SelectedItem" );
		OutputDebugStringW( var_Items->GetCellCaption(var_Items->GetSelectedItem(0),long(0)) );
}

// ViewItemStateStartChanging event - Indicates that the state of the item is about to be changed.
void OnViewItemStateStartChangingCascadeTree1(long   Operation,long   Item,long   ColIndex,VARIANT FAR*   Cancel)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Start" );
	OutputDebugStringW( L"Operation" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
	var_View->BeginUpdate();
	var_View->PutColumnAutoResize(VARIANT_TRUE);
	var_View->GetColumns()->Add(L"Default");
	var_View->PutKey(long(0));
	var_View->PutLinesAtRoot(EXCASCADETREELib::exLinesAtRoot);
	EXCASCADETREELib::IItemsPtr var_Items = var_View->GetItems();
		var_Items->AddItem("Item A");
		var_Items->PutSelectItem(var_Items->AddItem("Item B"),VARIANT_TRUE);
		var_Items->AddItem("Item C");
	var_View->EndUpdate();
spCascadeTree1->EndUpdate();

60
How do I specify a foreground color for a particular view

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\AK");
spCascadeTree1->GetDefaultView(vtMissing)->GetConditionalFormats()->Add(L"1",vtMissing)->PutForeColor(RGB(128,128,128));
spCascadeTree1->EndUpdate();

59
How do display result/items in the view's filter bar

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		var_View->PutHeaderAppearance(EXCASCADETREELib::Etched);
		var_View->PutHeaderHeight(24);
		var_View->PutDrawGridLines(EXCASCADETREELib::exAllLines);
		var_View->PutGridLineStyle(EXCASCADETREELib::exGridLinesDash);
	EXCASCADETREELib::IViewPtr var_View1 = spCascadeTree1->GetDefaultView(vtMissing);
		EXCASCADETREELib::IViewPtr var_View2 = var_View1->GetView("Country");
			var_View2->BeginUpdate();
			var_View2->PutColumnAutoResize(VARIANT_TRUE);
			var_View2->GetColumns()->GetItem(long(0))->PutVisible(VARIANT_FALSE);
			EXCASCADETREELib::IColumnPtr var_Column = var_View2->GetColumns()->GetItem(long(1));
				var_Column->PutHTMLCaption(L"Country <off 4><fgcolor=808080>Name");
				var_Column->PutDisplayFilterButton(VARIANT_TRUE);
				var_Column->PutFilterList(EXCASCADETREELib::FilterListEnum(EXCASCADETREELib::exShowExclude | EXCASCADETREELib::exShowFocusItem | EXCASCADETREELib::exShowCheckBox | EXCASCADETREELib::exSortItemsAsc));
				var_Column->PutFilterBarDropDownWidth(2);
			var_View2->EndUpdate();
		EXCASCADETREELib::IViewPtr var_View3 = var_View1->GetView("State");
			var_View3->BeginUpdate();
			var_View3->PutColumnAutoResize(VARIANT_TRUE);
			var_View3->GetColumns()->GetItem(long(0))->PutVisible(VARIANT_FALSE);
			var_View3->GetColumns()->GetItem(long(1))->PutVisible(VARIANT_FALSE);
			EXCASCADETREELib::IColumnPtr var_Column1 = var_View3->GetColumns()->GetItem(long(2));
				var_Column1->PutHTMLCaption(L"State <off 4><fgcolor=808080>Name");
				var_Column1->PutDisplayFilterButton(VARIANT_TRUE);
				var_Column1->PutFilterList(EXCASCADETREELib::FilterListEnum(EXCASCADETREELib::exShowExclude | EXCASCADETREELib::exShowFocusItem | EXCASCADETREELib::exShowCheckBox | EXCASCADETREELib::exSortItemsAsc));
				var_Column1->PutFilterBarDropDownWidth(2);
			var_View3->EndUpdate();
		EXCASCADETREELib::IViewPtr var_View4 = var_View1->GetView("City");
			var_View4->BeginUpdate();
			var_View4->GetColumns()->GetItem(long(0))->PutVisible(VARIANT_FALSE);
			var_View4->GetColumns()->GetItem(long(1))->PutVisible(VARIANT_FALSE);
			EXCASCADETREELib::IColumnPtr var_Column2 = var_View4->GetColumns()->GetItem(long(2));
				var_Column2->PutHTMLCaption(L"City <off 4><fgcolor=808080>Name");
				var_Column2->PutWidth(128);
				var_Column2->PutDef(EXCASCADETREELib::exCellHasCheckBox,VARIANT_TRUE);
				var_Column2->PutDisplayFilterButton(VARIANT_TRUE);
				var_Column2->PutFilterList(EXCASCADETREELib::FilterListEnum(EXCASCADETREELib::exShowExclude | EXCASCADETREELib::exShowFocusItem | EXCASCADETREELib::exShowCheckBox | EXCASCADETREELib::exSortItemsAsc));
				var_Column2->PutFilterBarDropDownWidth(2);
			EXCASCADETREELib::IColumnPtr var_Column3 = ((EXCASCADETREELib::IColumnPtr)(var_View4->GetColumns()->Add(L"Pos")));
				var_Column3->PutAllowSizing(VARIANT_FALSE);
				var_Column3->PutWidth(32);
				var_Column3->PutDef(EXCASCADETREELib::exCellBackColor,long(15790320));
				var_Column3->PutPosition(0);
				var_Column3->PutFormatColumn(L"1 pos ``");
			var_View4->PutCountLockedColumns(1);
			var_View4->EndUpdate();
	EXCASCADETREELib::IViewPtr var_View5 = spCascadeTree1->GetView();
		var_View5->PutFilterBarHeight(36);
		var_View5->PutFilterBarCaption(_bstr_t("(( ( allui replace `[<b>` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replace `</b>]` with ` </b></bgcolor></fgcolor>` replace ") +
	"`[<s>` with `<bgcolor=C0C0C0><fgcolor=FFFFFF> ` replace `</s>]` with ` </fgcolor></bgcolor>` )  + `<r><fgcolor=808080>` + ( matc" +
	"hitemcount < 0 ? ( ( len(value) ? `` : `` ) + `<r>` + abs(matchitemcount + 1) + ` result(s)` ) : (`<r><fgcolor=808080>`+ itemcou" +
	"nt + ` item(s)`) )))");
		var_View5->PutFilterBarPromptType(EXCASCADETREELib::exFilterPromptStartWith);
		var_View5->PutFilterBarPromptVisible(EXCASCADETREELib::FilterBarVisibleEnum(EXCASCADETREELib::exFilterBarShowCloseIfRequired | EXCASCADETREELib::exFilterBarVisible | EXCASCADETREELib::exFilterBarPromptVisible));
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutScrollPartVisible(EXCASCADETREELib::exVScroll,EXCASCADETREELib::exExtentThumbPart,VARIANT_TRUE);
spCascadeTree1->PutScrollPartVisible(EXCASCADETREELib::exHScroll,EXCASCADETREELib::exExtentThumbPart,VARIANT_TRUE);
spCascadeTree1->PutScrollPartVisible(EXCASCADETREELib::exScroll,EXCASCADETREELib::exExtentThumbPart,VARIANT_TRUE);
spCascadeTree1->PutScrollWidth(4);
spCascadeTree1->PutBackground(EXCASCADETREELib::exVSBack,RGB(240,240,240));
spCascadeTree1->PutBackground(EXCASCADETREELib::exVSThumb,RGB(128,128,128));
spCascadeTree1->PutScrollHeight(4);
spCascadeTree1->PutBackground(EXCASCADETREELib::exHSBack,spCascadeTree1->GetBackground(EXCASCADETREELib::exVSBack));
spCascadeTree1->PutBackground(EXCASCADETREELib::exHSThumb,spCascadeTree1->GetBackground(EXCASCADETREELib::exVSThumb));
spCascadeTree1->PutBackground(EXCASCADETREELib::exScrollSizeGrip,spCascadeTree1->GetBackground(EXCASCADETREELib::exVSBack));
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutBackground(EXCASCADETREELib::exCSplitBar,spCascadeTree1->GetBackground(EXCASCADETREELib::exSplitBar));
spCascadeTree1->PutBackground(EXCASCADETREELib::exHSplitBar,spCascadeTree1->GetBackground(EXCASCADETREELib::exSplitBar));
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBarSize,RGB(2,0,0));
spCascadeTree1->EndUpdate();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMinColumnWidth(348);
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\AK");
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing)->GetView("City");
	var_View->PutFilterBarPromptPattern(L"An");
spCascadeTree1->EndUpdate();

58
I am using the filter prompt feature, the question is how can I filter for items that starts with typed characters rather than contains

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		var_View->PutFilterBarPromptType(EXCASCADETREELib::exFilterPromptStartWith);
		var_View->PutFilterBarPromptVisible(EXCASCADETREELib::exFilterBarPromptVisible);
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\AK");
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing)->GetView("City");
	var_View->PutFilterBarPromptPattern(L"An");
	EXCASCADETREELib::IColumnPtr var_Column = var_View->GetColumns()->GetItem("Name");
		var_Column->PutWidth(128);
		var_Column->PutDef(EXCASCADETREELib::exCellValueFormat,long(1));
		var_Column->PutFormatColumn(L"value replace `An` with `<bgcolor=000000><fgcolor=FFFFFF>An</fgcolor></bgcolor>` ");
spCascadeTree1->EndUpdate();

57
FilterBarCaption Predefined Keywords

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutBackColorAlternate(RGB(240,240,240));
spCascadeTree1->PutMode(EXCASCADETREELib::exSingleCascadeMode);
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US");
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing)->GetView("Country");
	EXCASCADETREELib::IColumnPtr var_Column = ((EXCASCADETREELib::IColumnPtr)(var_View->GetColumns()->Add(L"Pos")));
		var_Column->PutPosition(0);
		var_Column->PutWidth(32);
		var_Column->PutAllowSizing(VARIANT_FALSE);
		var_Column->PutFormatColumn(L"1pos ``");
	EXCASCADETREELib::IColumnPtr var_Column1 = var_View->GetColumns()->GetItem("CountryCode");
		var_Column1->PutWidth(32);
		var_Column1->PutAllowSizing(VARIANT_FALSE);
		var_Column1->PutDisplayFilterButton(VARIANT_TRUE);
	EXCASCADETREELib::IColumnPtr var_Column2 = var_View->GetColumns()->GetItem("CountryName");
		var_Column2->PutDisplayFilterButton(VARIANT_TRUE);
		var_Column2->PutFilterList(EXCASCADETREELib::FilterListEnum(EXCASCADETREELib::exShowExclude | EXCASCADETREELib::exShowFocusItem | EXCASCADETREELib::exShowCheckBox | EXCASCADETREELib::exSortItemsAsc));
		var_Column2->PutFilterBarDropDownWidth(2);
		var_Column2->PutFilterType(EXCASCADETREELib::exFilter);
		var_Column2->PutFilter(L"Italy|Romania|Germany");
	var_View->PutFilterBarPromptPattern(L"a");
	var_View->PutColumnAutoResize(VARIANT_TRUE);
	var_View->PutSearchColumnIndex(var_View->GetColumns()->GetItem("CountryName")->GetIndex());
	var_View->PutFilterInclude(EXCASCADETREELib::exItemsWithChilds);
	var_View->PutFilterBarCaption(_bstr_t("`<fgcolor=0000FF><i>value/current</i></fgcolor>: <fgcolor=808080>` + value + `</fgcolor>` + `<br><fgcolor=0000FF><i>available</") +
"i></fgcolor>: ` + available + `<br><fgcolor=0000FF><i>allui</i></fgcolor>: ` + allui + `<br><fgcolor=0000FF><i>all</i></fgcolor>" +
": ` + all + `<br><fgcolor=0000FF><i>itemcount</i></fgcolor>: <fgcolor=808080>` + itemcount + `</fgcolor>`+ `<br><fgcolor=0000FF>" +
"<i>visibleitemcount</i></fgcolor>: <fgcolor=808080>` + visibleitemcount + `</fgcolor>`+ `<br><fgcolor=0000FF><i>matchitemcount</" +
"i></fgcolor>: <fgcolor=808080>` + matchitemcount + `</fgcolor>`+ `<br><fgcolor=0000FF><i>promptpattern</i></fgcolor>: <fgcolor=8" +
"08080>` + promptpattern + `</fgcolor>`+ `<br><fgcolor=0000FF><i>leafitemcount</i></fgcolor>: <fgcolor=808080>` + leafitemcount +" +
" `</fgcolor>`");
	var_View->PutFilterBarPromptVisible(EXCASCADETREELib::FilterBarVisibleEnum(EXCASCADETREELib::exFilterBarCaptionVisible | EXCASCADETREELib::exFilterBarVisible | EXCASCADETREELib::exFilterBarPromptVisible));
	var_View->ApplyFilter();
spCascadeTree1->EndUpdate();

56
How can I enable the column's filter bar (view)

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	spCascadeTree1->GetView()->PutFilterBarPromptVisible(EXCASCADETREELib::exFilterBarPromptVisible);
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\AK");
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing)->GetView("Country");
	var_View->PutColumnAutoResize(VARIANT_TRUE);
	var_View->GetColumns()->GetItem("CountryCode")->PutVisible(VARIANT_FALSE);
	EXCASCADETREELib::IColumnPtr var_Column = var_View->GetColumns()->GetItem("CountryName");
		var_Column->PutDisplayFilterButton(VARIANT_TRUE);
		var_Column->PutFilterList(EXCASCADETREELib::FilterListEnum(EXCASCADETREELib::exShowExclude | EXCASCADETREELib::exShowFocusItem | EXCASCADETREELib::exShowCheckBox | EXCASCADETREELib::exSortItemsAsc));
		var_Column->PutFilterBarDropDownWidth(2);
		var_Column->PutFilterType(EXCASCADETREELib::exFilter);
		var_Column->PutFilter(L"Romania|Germany");
	var_View->ApplyFilter();
spCascadeTree1->EndUpdate();

55
How can I enable the column's filter bar

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		var_View->PutFilterBarPromptVisible(EXCASCADETREELib::exFilterBarPromptVisible);
		EXCASCADETREELib::IColumnPtr var_Column = var_View->GetColumns()->GetItem(long(0));
			var_Column->PutDisplayFilterButton(VARIANT_TRUE);
			var_Column->PutFilterList(EXCASCADETREELib::FilterListEnum(EXCASCADETREELib::exShowExclude | EXCASCADETREELib::exShowFocusItem | EXCASCADETREELib::exShowCheckBox | EXCASCADETREELib::exSortItemsAsc));
			var_Column->PutFilterBarDropDownWidth(2);
	EXCASCADETREELib::IViewPtr var_View1 = spCascadeTree1->GetDefaultView(vtMissing)->GetView("Country");
		EXCASCADETREELib::IColumnPtr var_Column1 = var_View1->GetColumns()->GetItem(long(0));
			var_Column1->PutFilterType(EXCASCADETREELib::exFilter);
			var_Column1->PutFilter(L"US|RO|GE");
		var_View1->ApplyFilter();
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\AK");
spCascadeTree1->EndUpdate();

54
How can I enable the control's filter bar (view)

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\AK");
spCascadeTree1->GetDefaultView(vtMissing)->PutFilterBarPromptVisible(EXCASCADETREELib::exFilterBarPromptVisible);
spCascadeTree1->EndUpdate();

53
How can I enable the control's filter bar

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	spCascadeTree1->GetView()->PutFilterBarPromptVisible(EXCASCADETREELib::exFilterBarPromptVisible);
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\AK");
spCascadeTree1->EndUpdate();

52
Aggregate sum, min, max, count, avg, divider, total (view)

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitEqualCascadeMode);
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBarSize,RGB(4,0,0));
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"RO");
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing)->GetView("Country");
	var_View->BeginUpdate();
	var_View->PutColumnAutoResize(VARIANT_TRUE);
	var_View->GetColumns()->GetItem(long(0))->PutVisible(VARIANT_FALSE);
	EXCASCADETREELib::IItemsPtr var_Items = var_View->GetItems();
		var_Items->PutLockedItemCount(EXCASCADETREELib::exTop,1);
		long h = var_Items->GetLockedItem(EXCASCADETREELib::exTop,0);
		var_Items->PutItemDivider(h,0);
		var_Items->PutCellValueFormat(h,long(0),EXCASCADETREELib::ValueFormatEnum(EXCASCADETREELib::exTotalField | EXCASCADETREELib::exHTML));
		var_Items->PutCellValue(h,long(0),"count(all,all,1)");
		var_Items->PutFormatCell(h,long(0),L"`<r>Countries: <b>`+ (value format `0`)");
	var_View->EndUpdate();
spCascadeTree1->EndUpdate();

51
Aggregate sum, min, max, count, avg, divider, total

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	spCascadeTree1->GetView()->PutHeaderVisible(VARIANT_FALSE);
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing);
		EXCASCADETREELib::IViewPtr var_View1 = var_View->GetView("Country");
			var_View1->BeginUpdate();
			var_View1->PutColumnAutoResize(VARIANT_TRUE);
			var_View1->GetColumns()->GetItem(long(0))->PutVisible(VARIANT_FALSE);
			EXCASCADETREELib::IItemsPtr var_Items = var_View1->GetItems();
				var_Items->PutLockedItemCount(EXCASCADETREELib::exTop,1);
				long h = var_Items->GetLockedItem(EXCASCADETREELib::exTop,0);
				var_Items->PutItemDivider(h,0);
				var_Items->PutCellValueFormat(h,long(0),EXCASCADETREELib::ValueFormatEnum(EXCASCADETREELib::exTotalField | EXCASCADETREELib::exHTML));
				var_Items->PutCellValue(h,long(0),"count(all,all,1)");
				var_Items->PutFormatCell(h,long(0),L"`<r>Countries: <b>`+ (value format `0`)");
			var_View1->EndUpdate();
		EXCASCADETREELib::IViewPtr var_View2 = var_View->GetView("State");
			var_View2->BeginUpdate();
			var_View2->PutSingleSel(VARIANT_FALSE);
			var_View2->PutColumnAutoResize(VARIANT_TRUE);
			var_View2->GetColumns()->GetItem(long(0))->PutVisible(VARIANT_FALSE);
			var_View2->GetColumns()->GetItem(long(1))->PutVisible(VARIANT_FALSE);
			EXCASCADETREELib::IItemsPtr var_Items1 = var_View2->GetItems();
				var_Items1->PutLockedItemCount(EXCASCADETREELib::exTop,1);
				h = var_Items1->GetLockedItem(EXCASCADETREELib::exTop,0);
				var_Items1->PutItemDivider(h,0);
				var_Items1->PutCellValueFormat(h,long(0),EXCASCADETREELib::ValueFormatEnum(EXCASCADETREELib::exTotalField | EXCASCADETREELib::exHTML));
				var_Items1->PutCellValue(h,long(0),"count(all,all,1)");
				var_Items1->PutFormatCell(h,long(0),L"`<r>States: <b>`+ (value format `0`)");
			var_View2->EndUpdate();
		EXCASCADETREELib::IViewPtr var_View3 = var_View->GetView("City");
			var_View3->BeginUpdate();
			var_View3->GetColumns()->GetItem(long(0))->PutVisible(VARIANT_FALSE);
			var_View3->GetColumns()->GetItem(long(1))->PutVisible(VARIANT_FALSE);
			EXCASCADETREELib::IColumnPtr var_Column = var_View3->GetColumns()->GetItem(long(2));
				var_Column->PutWidth(128);
				var_Column->PutHTMLCaption(L"CityName");
			EXCASCADETREELib::IItemsPtr var_Items2 = var_View3->GetItems();
				var_Items2->PutLockedItemCount(EXCASCADETREELib::exTop,1);
				h = var_Items2->GetLockedItem(EXCASCADETREELib::exTop,0);
				var_Items2->PutItemDivider(h,0);
				var_Items2->PutCellValueFormat(h,long(0),EXCASCADETREELib::ValueFormatEnum(EXCASCADETREELib::exTotalField | EXCASCADETREELib::exHTML));
				var_Items2->PutCellValue(h,long(0),"count(all,all,1)");
				var_Items2->PutFormatCell(h,long(0),L"`<r>Cities: <b>`+ (value format `0`)");
			var_View3->EndUpdate();
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBarSize,RGB(4,0,0));
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\AK");
spCascadeTree1->EndUpdate();

50
How can I add a check-box column (view)

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutStatusBarVisible(EXCASCADETREELib::exStatusBarAnchorTop);
spCascadeTree1->PutStatusBarLabel(L"<c>Select multiple-items in the City view, and press <b>SPACE</b> key");
spCascadeTree1->PutBackground(EXCASCADETREELib::exStatusBackColor,spCascadeTree1->GetBackColor());
spCascadeTree1->GetVisualAppearance()->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABO0GACAADACAxRDgMQBQKAAzAJBIYhiG4cYCgMYxXDOCYXABCEYRXBKUQSDqEYyjGLIXAWCYSAAMIwDKAUEhqGiUBihaQhRgyJI3RlJGaoD") +
"iKIokShKEpDLKlCx3H6OKQjOZgAoySo4SbDMp0NAkRBlFqcJCCCLAUgmTpQUBOYyiLKNRxQGoYLIlayZIiSIpMRbWcB3BYEOSFFasAAleYZTg2Jp1TbPAAYFL1ISDKSi" +
"IZqTA6PheT5yUzCNazbgEMTvRKqcSnO6bOgnEKQZKAGg4bg1RTVAYZLKtPR7aqyUJvZ5sMB6DiuLYRPKXZoucaNExSS5ebJtOzQJbEXBpXSpBwzSieBozIaQcJUOoaVx" +
"PFkaJrGuIx3h2BZPgOUIQmUcIwDARAkiAaQxh0DonCMLAeBKZobBCCY+niWJaBIKJJH4MoBgiQpCmmUR/ooBgCgCYBIBYBoBmCBYAn+ApgkgNgOgOYQIEYBIEGESBWBS" +
"BJhGgZgZgYIYoHYEIHCGaIGAuCAiCgegkgkYYoh4KIFiKKIuBeAJimiGgwgwYoYk4NILCCGJmDqDpjkidg+gGTo1jUAxAEAgI");
spCascadeTree1->PutSelBackColor(0x1000000);
spCascadeTree1->PutSelForeColor(spCascadeTree1->GetForeColor());
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\AK");
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing)->GetView("City");
	var_View->BeginUpdate();
	var_View->PutShowFocusRect(VARIANT_FALSE);
	var_View->PutSingleSel(VARIANT_FALSE);
	var_View->GetColumns()->GetItem(long(0))->PutVisible(VARIANT_FALSE);
	var_View->GetColumns()->GetItem(long(1))->PutVisible(VARIANT_FALSE);
	EXCASCADETREELib::IColumnPtr var_Column = var_View->GetColumns()->GetItem(long(2));
		var_Column->PutHTMLCaption(L"City <off 4><fgcolor=808080>Name");
		var_Column->PutWidth(128);
		var_Column->PutDef(EXCASCADETREELib::exCellHasCheckBox,VARIANT_TRUE);
	var_View->PutSearchColumnIndex(var_View->GetColumns()->GetItem("Name")->GetIndex());
	EXCASCADETREELib::IColumnPtr var_Column1 = ((EXCASCADETREELib::IColumnPtr)(var_View->GetColumns()->Add(L"Pos")));
		var_Column1->PutPosition(0);
		var_Column1->PutWidth(32);
		var_Column1->PutFormatColumn(L"1 pos ``");
	EXCASCADETREELib::IConditionalFormatsPtr var_ConditionalFormats = var_View->GetConditionalFormats();
		var_ConditionalFormats->Add(L"%CS2 = 1",vtMissing)->PutBackColor(RGB(190,190,190));
		EXCASCADETREELib::IConditionalFormatPtr var_ConditionalFormat = var_ConditionalFormats->Add(L"%CS2 = 1",vtMissing);
			var_ConditionalFormat->PutBold(VARIANT_TRUE);
			var_ConditionalFormat->PutApplyTo(EXCASCADETREELib::FormatApplyToEnum(0x8));
	EXCASCADETREELib::IItemsPtr var_Items = var_View->GetItems();
		var_Items->PutCellState(var_Items->GetItemByIndex(1),long(2),1);
		var_Items->PutCellState(var_Items->GetItemByIndex(3),long(2),1);
		var_Items->PutCellState(var_Items->GetItemByIndex(5),long(2),1);
	var_View->EndUpdate();
spCascadeTree1->EndUpdate();

49
How can I add a check-box column

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		var_View->PutHeaderAppearance(EXCASCADETREELib::Etched);
		var_View->PutHeaderHeight(24);
		var_View->PutDrawGridLines(EXCASCADETREELib::exVLines);
		var_View->PutGridLineStyle(EXCASCADETREELib::exGridLinesDash);
	EXCASCADETREELib::IViewPtr var_View1 = spCascadeTree1->GetDefaultView(vtMissing);
		EXCASCADETREELib::IViewPtr var_View2 = var_View1->GetView("Country");
			var_View2->BeginUpdate();
			var_View2->PutColumnAutoResize(VARIANT_TRUE);
			var_View2->GetColumns()->GetItem(long(0))->PutVisible(VARIANT_FALSE);
			var_View2->GetColumns()->GetItem(long(1))->PutHTMLCaption(L"Country <off 4><fgcolor=808080>Name");
			var_View2->EndUpdate();
		EXCASCADETREELib::IViewPtr var_View3 = var_View1->GetView("State");
			var_View3->BeginUpdate();
			var_View3->PutColumnAutoResize(VARIANT_TRUE);
			var_View3->GetColumns()->GetItem(long(0))->PutVisible(VARIANT_FALSE);
			var_View3->GetColumns()->GetItem(long(1))->PutVisible(VARIANT_FALSE);
			var_View3->GetColumns()->GetItem(long(2))->PutHTMLCaption(L"State <off 4><fgcolor=808080>Name");
			var_View3->EndUpdate();
		EXCASCADETREELib::IViewPtr var_View4 = var_View1->GetView("City");
			var_View4->BeginUpdate();
			var_View4->PutShowFocusRect(VARIANT_FALSE);
			var_View4->PutSingleSel(VARIANT_FALSE);
			var_View4->GetColumns()->GetItem(long(0))->PutVisible(VARIANT_FALSE);
			var_View4->GetColumns()->GetItem(long(1))->PutVisible(VARIANT_FALSE);
			EXCASCADETREELib::IColumnPtr var_Column = var_View4->GetColumns()->GetItem(long(2));
				var_Column->PutHTMLCaption(L"City <off 4><fgcolor=808080>Name");
				var_Column->PutWidth(128);
				var_Column->PutDef(EXCASCADETREELib::exCellHasCheckBox,VARIANT_TRUE);
			var_View4->PutSearchColumnIndex(var_View4->GetColumns()->GetItem("Name")->GetIndex());
			EXCASCADETREELib::IColumnPtr var_Column1 = ((EXCASCADETREELib::IColumnPtr)(var_View4->GetColumns()->Add(L"Pos")));
				var_Column1->PutPosition(0);
				var_Column1->PutWidth(32);
				var_Column1->PutFormatColumn(L"1 pos ``");
			EXCASCADETREELib::IConditionalFormatsPtr var_ConditionalFormats = var_View4->GetConditionalFormats();
				var_ConditionalFormats->Add(L"%CS2 = 1",vtMissing)->PutBackColor(RGB(190,190,190));
				EXCASCADETREELib::IConditionalFormatPtr var_ConditionalFormat = var_ConditionalFormats->Add(L"%CS2 = 1",vtMissing);
					var_ConditionalFormat->PutBold(VARIANT_TRUE);
					var_ConditionalFormat->PutApplyTo(EXCASCADETREELib::FormatApplyToEnum(0x8));
			EXCASCADETREELib::IItemsPtr var_Items = var_View4->GetItems();
				var_Items->PutCellState(var_Items->GetItemByIndex(1),long(2),1);
				var_Items->PutCellState(var_Items->GetItemByIndex(3),long(2),1);
				var_Items->PutCellState(var_Items->GetItemByIndex(5),long(2),1);
			var_View4->EndUpdate();
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutStatusBarVisible(EXCASCADETREELib::exStatusBarAnchorTop);
spCascadeTree1->PutStatusBarLabel(L"<c>Select multiple-items in the City view, and press <b>SPACE</b> key");
spCascadeTree1->PutBackground(EXCASCADETREELib::exStatusBackColor,spCascadeTree1->GetBackColor());
spCascadeTree1->GetVisualAppearance()->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABO0GACAADACAxRDgMQBQKAAzAJBIYhiG4cYCgMYxXDOCYXABCEYRXBKUQSDqEYyjGLIXAWCYSAAMIwDKAUEhqGiUBihaQhRgyJI3RlJGaoD") +
"iKIokShKEpDLKlCx3H6OKQjOZgAoySo4SbDMp0NAkRBlFqcJCCCLAUgmTpQUBOYyiLKNRxQGoYLIlayZIiSIpMRbWcB3BYEOSFFasAAleYZTg2Jp1TbPAAYFL1ISDKSi" +
"IZqTA6PheT5yUzCNazbgEMTvRKqcSnO6bOgnEKQZKAGg4bg1RTVAYZLKtPR7aqyUJvZ5sMB6DiuLYRPKXZoucaNExSS5ebJtOzQJbEXBpXSpBwzSieBozIaQcJUOoaVx" +
"PFkaJrGuIx3h2BZPgOUIQmUcIwDARAkiAaQxh0DonCMLAeBKZobBCCY+niWJaBIKJJH4MoBgiQpCmmUR/ooBgCgCYBIBYBoBmCBYAn+ApgkgNgOgOYQIEYBIEGESBWBS" +
"BJhGgZgZgYIYoHYEIHCGaIGAuCAiCgegkgkYYoh4KIFiKKIuBeAJimiGgwgwYoYk4NILCCGJmDqDpjkidg+gGTo1jUAxAEAgI");
spCascadeTree1->PutSelBackColor(0x1000000);
spCascadeTree1->PutSelForeColor(spCascadeTree1->GetForeColor());
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\AK");
spCascadeTree1->EndUpdate();

48
How can I access a view

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		var_View->PutHeaderAppearance(EXCASCADETREELib::Etched);
		var_View->PutHeaderHeight(24);
		var_View->PutDrawGridLines(EXCASCADETREELib::exAllLines);
		var_View->PutGridLineStyle(EXCASCADETREELib::exGridLinesDash);
	EXCASCADETREELib::IViewPtr var_View1 = spCascadeTree1->GetDefaultView(vtMissing);
		EXCASCADETREELib::IViewPtr var_View2 = var_View1->GetView("Country");
			var_View2->BeginUpdate();
			var_View2->PutColumnAutoResize(VARIANT_TRUE);
			var_View2->GetColumns()->GetItem(long(0))->PutVisible(VARIANT_FALSE);
			var_View2->GetColumns()->GetItem(long(1))->PutHTMLCaption(L"Country <off 4><fgcolor=808080>Name");
			var_View2->EndUpdate();
		EXCASCADETREELib::IViewPtr var_View3 = var_View1->GetView("State");
			var_View3->BeginUpdate();
			var_View3->PutColumnAutoResize(VARIANT_TRUE);
			var_View3->GetColumns()->GetItem(long(0))->PutVisible(VARIANT_FALSE);
			var_View3->GetColumns()->GetItem(long(1))->PutVisible(VARIANT_FALSE);
			var_View3->GetColumns()->GetItem(long(2))->PutHTMLCaption(L"State <off 4><fgcolor=808080>Name");
			var_View3->EndUpdate();
		EXCASCADETREELib::IViewPtr var_View4 = var_View1->GetView("City");
			var_View4->BeginUpdate();
			var_View4->GetColumns()->GetItem(long(0))->PutVisible(VARIANT_FALSE);
			var_View4->GetColumns()->GetItem(long(1))->PutVisible(VARIANT_FALSE);
			EXCASCADETREELib::IColumnPtr var_Column = var_View4->GetColumns()->GetItem(long(2));
				var_Column->PutHTMLCaption(L"City <off 4><fgcolor=808080>Name");
				var_Column->PutWidth(128);
				var_Column->PutDef(EXCASCADETREELib::exCellBackColor,long(15790320));
			var_View4->PutCountLockedColumns(1);
			var_View4->EndUpdate();
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\AK");
spCascadeTree1->EndUpdate();

47
Conditional Format (check)

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		EXCASCADETREELib::IConditionalFormatPtr var_ConditionalFormat = var_View->GetConditionalFormats()->Add(L"%CS0 = 1",vtMissing);
			var_ConditionalFormat->PutBold(VARIANT_TRUE);
		var_View->GetColumns()->GetItem(long(0))->PutDef(EXCASCADETREELib::exCellHasCheckBox,VARIANT_TRUE);
		EXCASCADETREELib::IItemsPtr var_Items = var_View->GetItems();
			var_Items->PutCellState(var_Items->GetFocusItem(),long(0),1);
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\AK");
spCascadeTree1->EndUpdate();

46
Conditional Format (view)

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\AK");
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing)->GetView("City");
	EXCASCADETREELib::IConditionalFormatPtr var_ConditionalFormat = var_View->GetConditionalFormats()->Add(L"(%0 = `US`) and (%2 like `Al*`)",vtMissing);
		var_ConditionalFormat->PutBold(VARIANT_TRUE);
		var_ConditionalFormat->PutBackColor(RGB(240,240,240));
spCascadeTree1->EndUpdate();

45
Conditional Format

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		EXCASCADETREELib::IConditionalFormatPtr var_ConditionalFormat = var_View->GetConditionalFormats()->Add(L"%0 = `US`",vtMissing);
			var_ConditionalFormat->PutBold(VARIANT_TRUE);
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\AK");
spCascadeTree1->EndUpdate();

44
I've seen the AllowSplitView property, the question is how can I load data to

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\AK");
spCascadeTree1->PutAllowSplitView(EXCASCADETREELib::exAllowOneSplitView);
spCascadeTree1->PutSplitViewHeight(L"256");
ObjectPtr var_Object = ((ObjectPtr)(spCascadeTree1->GetDefaultView(long(1))));
spCascadeTree1->EndUpdate();

43
How can I group the items (view)

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	spCascadeTree1->GetView()->PutSingleSel(VARIANT_FALSE);
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
EXCASCADETREELib::IAppearancePtr var_Appearance = spCascadeTree1->GetVisualAppearance();
	var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABa0GACAADACAxRDgMQBQKAAzAJBIYhiG4cYCgMYxXDOCYXABCEYRXBIZQ7BKNIxjSJwFgkAoJDYOMjwlDKEgADDFEgjJBkRxtDCPIDnGQoD") +
"iGI4vSrCQ4yDA8GxCGSfIrjKiYbiGNY8RgZCiOMAFJSpC6gZRoSq4doGGJLQiDMaAdBNHyZKqpbQqeCZPDINQlWzbcrjKKFYQTOi7I4sCbYcqKA5PTbNdYyVBMWxfGIb" +
"aIkXAcBjuO4hWbFdASRQdDYtHTIbzjCxLcgMD4gRwWCYNSAGRZJLDKK4gSh6eorHQAX4AGabFBOP5fC7TNJ0OKLRrkAJub5eFx3LJ97ohbLsOzYZK2ByDFqiMLGQZMZx" +
"vGWUBAnYf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000);
spCascadeTree1->PutSelForeColor(RGB(0,0,0));
spCascadeTree1->PutBackColorHeader(0x2000000);
spCascadeTree1->PutScrollPartVisible(EXCASCADETREELib::exVScroll,EXCASCADETREELib::exExtentThumbPart,VARIANT_TRUE);
spCascadeTree1->PutScrollPartVisible(EXCASCADETREELib::exHScroll,EXCASCADETREELib::exExtentThumbPart,VARIANT_TRUE);
spCascadeTree1->PutScrollPartVisible(EXCASCADETREELib::exScroll,EXCASCADETREELib::exExtentThumbPart,VARIANT_TRUE);
spCascadeTree1->PutScrollWidth(4);
spCascadeTree1->PutBackground(EXCASCADETREELib::exVSBack,RGB(240,240,240));
spCascadeTree1->PutBackground(EXCASCADETREELib::exVSThumb,RGB(128,128,128));
spCascadeTree1->PutScrollHeight(4);
spCascadeTree1->PutBackground(EXCASCADETREELib::exHSBack,spCascadeTree1->GetBackground(EXCASCADETREELib::exVSBack));
spCascadeTree1->PutBackground(EXCASCADETREELib::exHSThumb,spCascadeTree1->GetBackground(EXCASCADETREELib::exVSThumb));
spCascadeTree1->PutBackground(EXCASCADETREELib::exScrollSizeGrip,spCascadeTree1->GetBackground(EXCASCADETREELib::exVSBack));
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutBackground(EXCASCADETREELib::exCSplitBar,spCascadeTree1->GetBackground(EXCASCADETREELib::exSplitBar));
spCascadeTree1->PutBackground(EXCASCADETREELib::exHSplitBar,spCascadeTree1->GetBackground(EXCASCADETREELib::exSplitBar));
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBarSize,RGB(2,0,0));
spCascadeTree1->PutBackColorSortBar(spCascadeTree1->GetBackColor());
spCascadeTree1->EndUpdate();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"RO\\CJ|BV|CS");
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing)->GetView("City");
	var_View->BeginUpdate();
	EXCASCADETREELib::IColumnsPtr var_Columns = var_View->GetColumns();
		var_Columns->GetItem("CountryCode")->PutVisible(VARIANT_FALSE);
		EXCASCADETREELib::IColumnPtr var_Column = var_Columns->GetItem("Name");
			var_Column->PutSortOrder(EXCASCADETREELib::SortAscending);
			var_Column->PutWidth(128);
	var_View->PutSortBarVisible(VARIANT_TRUE);
	var_View->PutAllowGroupBy(VARIANT_TRUE);
	var_View->PutSingleSort(VARIANT_FALSE);
	var_View->GetColumns()->GetItem("StateCode")->PutSortOrder(EXCASCADETREELib::SortAscending);
	var_View->PutTreeColumnIndex(var_View->GetColumns()->GetItem("Name")->GetIndex());
	var_View->EndUpdate();
spCascadeTree1->EndUpdate();

42
How can I group the items

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	// Columns("StateCode").Visible = False
	// Columns("StateName").SortOrder = 1
	// Columns("StateCode").SortOrder = nGroupByIfCity
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	_variant_t nGroupByIfCity = spCascadeTree1->FormatABC(L"( A = `City`) ? 1 : 0",spCascadeTree1->GetView()->GetTag(),vtMissing,vtMissing);
	_variant_t bColumnAutoResize = spCascadeTree1->FormatABC(L" (A = `City`) ? 0 : -1",spCascadeTree1->GetView()->GetTag(),vtMissing,vtMissing);
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		var_View->BeginUpdate();
		var_View->PutSingleSel(VARIANT_FALSE);
		var_View->GetColumns()->GetItem("CountryCode")->PutVisible(VARIANT_FALSE);
		var_View->GetColumns()->GetItem("CountryName")->PutSortOrder(EXCASCADETREELib::SortAscending);
		ObjectPtr var_Object = var_View->GetColumns()->GetItem(long(2));
		var_View->PutTreeColumnIndex(2);
		var_View->PutAllowGroupBy(VARIANT_TRUE);
		var_View->PutSingleSort(VARIANT_FALSE);
		var_View->PutSortBarVisible(VARIANT_FALSE);
		var_View->PutColumnAutoResize(VARIANT_FALSE);
		var_View->EndUpdate();
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
EXCASCADETREELib::IAppearancePtr var_Appearance = spCascadeTree1->GetVisualAppearance();
	var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABa0GACAADACAxRDgMQBQKAAzAJBIYhiG4cYCgMYxXDOCYXABCEYRXBIZQ7BKNIxjSJwFgkAoJDYOMjwlDKEgADDFEgjJBkRxtDCPIDnGQoD") +
"iGI4vSrCQ4yDA8GxCGSfIrjKiYbiGNY8RgZCiOMAFJSpC6gZRoSq4doGGJLQiDMaAdBNHyZKqpbQqeCZPDINQlWzbcrjKKFYQTOi7I4sCbYcqKA5PTbNdYyVBMWxfGIb" +
"aIkXAcBjuO4hWbF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WBa" +
"BZhggTgSgYYZIHYGoDGGaIGBiBpiCiFJdgkIksiiChhliLgsgYYpoj4F4MGMKBWDSDRhngMg4gcIQYnYPoEE6N4ZAMQBAICA=");
spCascadeTree1->PutSelBackColor(0x1000000);
spCascadeTree1->PutSelForeColor(RGB(0,0,0));
spCascadeTree1->PutBackColorHeader(0x2000000);
spCascadeTree1->PutScrollPartVisible(EXCASCADETREELib::exVScroll,EXCASCADETREELib::exExtentThumbPart,VARIANT_TRUE);
spCascadeTree1->PutScrollPartVisible(EXCASCADETREELib::exHScroll,EXCASCADETREELib::exExtentThumbPart,VARIANT_TRUE);
spCascadeTree1->PutScrollPartVisible(EXCASCADETREELib::exScroll,EXCASCADETREELib::exExtentThumbPart,VARIANT_TRUE);
spCascadeTree1->PutScrollWidth(4);
spCascadeTree1->PutBackground(EXCASCADETREELib::exVSBack,RGB(240,240,240));
spCascadeTree1->PutBackground(EXCASCADETREELib::exVSThumb,RGB(128,128,128));
spCascadeTree1->PutScrollHeight(4);
spCascadeTree1->PutBackground(EXCASCADETREELib::exHSBack,spCascadeTree1->GetBackground(EXCASCADETREELib::exVSBack));
spCascadeTree1->PutBackground(EXCASCADETREELib::exHSThumb,spCascadeTree1->GetBackground(EXCASCADETREELib::exVSThumb));
spCascadeTree1->PutBackground(EXCASCADETREELib::exScrollSizeGrip,spCascadeTree1->GetBackground(EXCASCADETREELib::exVSBack));
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutBackground(EXCASCADETREELib::exCSplitBar,spCascadeTree1->GetBackground(EXCASCADETREELib::exSplitBar));
spCascadeTree1->PutBackground(EXCASCADETREELib::exHSplitBar,spCascadeTree1->GetBackground(EXCASCADETREELib::exSplitBar));
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBarSize,RGB(2,0,0));
spCascadeTree1->PutBackColorSortBar(spCascadeTree1->GetBackColor());
spCascadeTree1->EndUpdate();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"RO\\CJ|BV|CS");
spCascadeTree1->EndUpdate();

41
How can I change the visual appearance of the selection/header

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	// Columns("StateCode").Visible = False
	// Columns("StateName").SortOrder = 1
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		var_View->BeginUpdate();
		var_View->PutColumnAutoResize(VARIANT_TRUE);
		var_View->GetColumns()->GetItem("CountryCode")->PutVisible(VARIANT_FALSE);
		var_View->GetColumns()->GetItem("CountryName")->PutSortOrder(EXCASCADETREELib::SortAscending);
		ObjectPtr var_Object = var_View->GetColumns()->GetItem("Name");
		var_View->EndUpdate();
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
EXCASCADETREELib::IAppearancePtr var_Appearance = spCascadeTree1->GetVisualAppearance();
	var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABWYDg6AADACAxRDgMQBQKAAzAJBIYhiG4cYCgMYxXDOCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADCNAwgFBIcBhE4ZIKkEYoMiONoYR5Ac4yF") +
"AcQxHE6TZRgeDZToWN48TZLEB0VRFGL1J4AKbfKKKBiqIZDTpMdKSHIIFQ4BiEaYkGjqQpKVIdDSJMwWTI4ahhNSEbauCZ7DhyXpLUbeNSyXJsXw7GSOZJvGZ5bjuIY+" +
"RxQEK1NQkOyNOiOAosGCQWiDE4DWZZUT3XS+HgAGStY4rWCcSgOYIDZTPOT1DYtIY3NC5c7tS4bPq3NZHXTAeigBa4AZTQafcTvSA5OjOQQ2VhNWIXRxgAZ3YCNbzpTg" +
"sHeD5DmUQh3jSTQ/DuIZBh0bJ8BsG4WlsYwXjEapphuXh/HsRQJAQQhKAaEwZlCahyDKchJlEIgRDedQbA2EIQiECR3BudAgBgRgBgSHZQFSCwzECV4DGCeA6BCBJhCg" +
"VgRgWs4YkgNJKCOMJ2C0T4Dn4IIIiIGIOCaCRiy0HQ9iGIxMhgMAMmKZJ2D+SQThININgiM4In+DhPnIDJhD+RxzgCfwaE2c58F0N4PniSJ/guTJiCiOAygwCJODyDwI" +
"FifhVD+R5JBQcIREYOQgFgNwPnkRJ/qOIgIjEMYMFOVg9hESA5BQfYSCbQx1DcZA5lAXQ2vURh4hoT55hiRgfEqYwMkUPQPnGahgiGJwpmAdYeAaWZgGINoPnEWoQBKa" +
"QKAyf4gAwMZoisMIMGOTJ/B0KQK0EG5NhqDolBmKhRG6JQUX8GJYD+aZaBaGweAqEwEkYPNpDaL4u2kIJXi8a5xgKPwViucQuj8EBr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cU4yRJCmGCHgJYdRODHC4H8ewRGWhLHsL0H4XgvASHMMkPY3g6C9FuB4P4+A" +
"vAJD0EwO4vA1CtHCBMDwEQZjmHwP4SIsgvh6D8C8II6h9geFyDUdQcwVCfF4G0C4xBvjBG2PwQg2RaBfH4MoTI9Rgh9HMNccY+BVDfC+NQL4kxFC3HOPgP4nwjjwBsIY" +
"AAnQ/hPHqP0XwiABgABABMdwgBHj1H0MACItgYAEHoAMPwUAWjbGAPEHgNhjAIE+IIKAFR9AVBwDAE44B+AbEEIULQDxgiBCAP4Q4Sx5CFBGOoCowhMBIBgEUAA2wMBC" +
"EMBQIQqA2gLBAKwGYhgoDRHuEIbAbwFigHoDMDYgwEBRCGFgOIERxAAH+IgMQiA3AMBwIsB4RhuAsEUCMUwKRZh4E2BMAwGBRiFAiFYFIRQRCtAmEUDgTQKCRDcC4YoS" +
"BeBUHGBAbgGBIiMFSI8XAqQNiGG4HARwEQ/A1GMKEJQVRDjYHUBsSI5gejHFQPkDoBQWB2BUMMeAeAHCJASCEUgLBDiQAGHQMQig0gGB4AcHghBJAyCEEkCoaQMApFIL" +
"wR4kg5BuCUJUHILwRgQHiFMSQUhHBKCSAkFgMQig8EYBUCQPA5hICSFpKgeBzCUHEKANwjAwhTBAMcPgrRLgjHkF0ZYmQWgtFKKwW4lApDCCuEwLIYQXjFCYLUCochwB" +
"yGWMkTQOxzB4HKJccQrgyhMGSJ0Go5hCDTA2MMDwZRKgxH2DQEw+ByicBmIQVYTRYhXBsMUMIVhNjjEkHUZw0RvA5BOCgY4FRJiiDqE4BI7QcCmGSFMToExogVCcOkbI" +
"OxzhaBmJ0AYnA1AMdoCsKIJQEgfHoB4QQDAJCtCGGgHoEQMDiFtPIKQrAdDNHiAMEAICAgA==");
spCascadeTree1->PutSelBackColor(0x1000000);
spCascadeTree1->PutSelForeColor(RGB(0,0,0));
spCascadeTree1->PutBackColorHeader(0x2000000);
spCascadeTree1->PutScrollPartVisible(EXCASCADETREELib::exVScroll,EXCASCADETREELib::exExtentThumbPart,VARIANT_TRUE);
spCascadeTree1->PutScrollPartVisible(EXCASCADETREELib::exHScroll,EXCASCADETREELib::exExtentThumbPart,VARIANT_TRUE);
spCascadeTree1->PutScrollPartVisible(EXCASCADETREELib::exScroll,EXCASCADETREELib::exExtentThumbPart,VARIANT_TRUE);
spCascadeTree1->PutScrollWidth(4);
spCascadeTree1->PutBackground(EXCASCADETREELib::exVSBack,RGB(240,240,240));
spCascadeTree1->PutBackground(EXCASCADETREELib::exVSThumb,RGB(128,128,128));
spCascadeTree1->PutScrollHeight(4);
spCascadeTree1->PutBackground(EXCASCADETREELib::exHSBack,spCascadeTree1->GetBackground(EXCASCADETREELib::exVSBack));
spCascadeTree1->PutBackground(EXCASCADETREELib::exHSThumb,spCascadeTree1->GetBackground(EXCASCADETREELib::exVSThumb));
spCascadeTree1->PutBackground(EXCASCADETREELib::exScrollSizeGrip,spCascadeTree1->GetBackground(EXCASCADETREELib::exVSBack));
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutBackground(EXCASCADETREELib::exCSplitBar,spCascadeTree1->GetBackground(EXCASCADETREELib::exSplitBar));
spCascadeTree1->PutBackground(EXCASCADETREELib::exHSplitBar,spCascadeTree1->GetBackground(EXCASCADETREELib::exSplitBar));
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBarSize,RGB(2,0,0));
spCascadeTree1->PutBackColorSortBar(spCascadeTree1->GetBackColor());
spCascadeTree1->EndUpdate();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"RO\\CJ");
spCascadeTree1->EndUpdate();

40
How can I format a column so it display its content in a different way
// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	// Columns("StateCode").Visible = False
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		var_View->BeginUpdate();
		var_View->PutContinueColumnScroll(VARIANT_FALSE);
		var_View->PutScrollBySingleLine(VARIANT_TRUE);
		var_View->PutDrawGridLines(EXCASCADETREELib::exAllLines);
		var_View->EnsureVisibleColumn("Date");
		var_View->GetColumns()->GetItem("CountryCode")->PutVisible(VARIANT_FALSE);
		ObjectPtr var_Object = var_View->GetColumns()->GetItem("Date");
		ObjectPtr var_Object1 = var_View->GetColumns()->GetItem("Function");
		ObjectPtr var_Object2 = var_View->GetColumns()->GetItem("Coordinates");
		ObjectPtr var_Object3 = var_View->GetColumns()->GetItem("Status");
		var_View->EndUpdate();
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutFitCascadeColumns(7);
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutScrollWidth(4);
spCascadeTree1->PutScrollHeight(4);
spCascadeTree1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") +
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" +
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=");
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\OR");
spCascadeTree1->EndUpdate();

39
How can I add a position column

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		EXCASCADETREELib::IColumnPtr var_Column = ((EXCASCADETREELib::IColumnPtr)(var_View->GetColumns()->Add(L"Pos")));
			var_Column->PutWidth(32);
			var_Column->PutAllowSizing(VARIANT_FALSE);
			var_Column->PutPosition(0);
			var_Column->PutFormatColumn(L"1 pos ``");
			var_Column->PutDef(EXCASCADETREELib::exCellBackColor,long(15790320));
			var_Column->PutAlignment(EXCASCADETREELib::RightAlignment);
			var_Column->PutHeaderAlignment(var_Column->GetAlignment());
			var_Column->PutDef(EXCASCADETREELib::exCellPaddingRight,long(2));
			var_Column->PutDef(EXCASCADETREELib::exCellPaddingLeft,long(2));
			var_Column->PutDef(EXCASCADETREELib::exHeaderPaddingLeft,long(2));
			var_Column->PutDef(EXCASCADETREELib::exHeaderPaddingRight,long(2));
		var_View->PutCountLockedColumns(1);
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\IA");
spCascadeTree1->EndUpdate();

38
How can I display icons or images

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		var_View->EnsureVisibleColumn("Function");
		ObjectPtr var_Object = var_View->GetColumns()->GetItem("Function");
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") +
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" +
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=");
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\MN");
spCascadeTree1->EndUpdate();

37
How can I turn-on the control's status bar

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	spCascadeTree1->PutStatusBarLabel(_bstr_t(spCascadeTree1->FormatABC(L"`<b>` + ( value replace `\\\\` with ` </b><font ;6><off 4>` )",spCascadeTree1->GetName(),vtMissing,vtMissing)));
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

// ViewEndChanging event - Occurs once the user is about to change the view.
void OnViewEndChangingCascadeTree1(long   Operation)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	spCascadeTree1->PutStatusBarLabel(_bstr_t(spCascadeTree1->FormatABC(L"`<b>` + ( value replace `\\\\` with ` </b><font ;6><off 4>` )",spCascadeTree1->GetName(),vtMissing,vtMissing)));
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutStatusBarVisible(EXCASCADETREELib::exStatusBarAnchorTop);
spCascadeTree1->PutStatusBarHeight(24);
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutName(L"Romania\\Cluj\\Baciu*");
spCascadeTree1->EndUpdate();

36
How can I disable incremental searching
// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	spCascadeTree1->GetView()->PutAutoSearch(VARIANT_FALSE);
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\AK");
spCascadeTree1->EndUpdate();

35
ScrollBar extension

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	// Columns("StateCode").Visible = False
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		var_View->PutColumnAutoResize(VARIANT_TRUE);
		var_View->GetColumns()->GetItem("CountryCode")->PutVisible(VARIANT_FALSE);
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutScrollPartVisible(EXCASCADETREELib::exVScroll,EXCASCADETREELib::exExtentThumbPart,VARIANT_TRUE);
spCascadeTree1->PutScrollPartVisible(EXCASCADETREELib::exHScroll,EXCASCADETREELib::exExtentThumbPart,VARIANT_TRUE);
spCascadeTree1->PutScrollPartVisible(EXCASCADETREELib::exScroll,EXCASCADETREELib::exExtentThumbPart,VARIANT_TRUE);
spCascadeTree1->PutScrollWidth(4);
spCascadeTree1->PutBackground(EXCASCADETREELib::exVSBack,RGB(240,240,240));
spCascadeTree1->PutBackground(EXCASCADETREELib::exVSThumb,RGB(128,128,128));
spCascadeTree1->PutScrollHeight(4);
spCascadeTree1->PutBackground(EXCASCADETREELib::exHSBack,spCascadeTree1->GetBackground(EXCASCADETREELib::exVSBack));
spCascadeTree1->PutBackground(EXCASCADETREELib::exHSThumb,spCascadeTree1->GetBackground(EXCASCADETREELib::exVSThumb));
spCascadeTree1->PutBackground(EXCASCADETREELib::exScrollSizeGrip,spCascadeTree1->GetBackground(EXCASCADETREELib::exVSBack));
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutBackground(EXCASCADETREELib::exCSplitBar,spCascadeTree1->GetBackground(EXCASCADETREELib::exSplitBar));
spCascadeTree1->PutBackground(EXCASCADETREELib::exHSplitBar,spCascadeTree1->GetBackground(EXCASCADETREELib::exSplitBar));
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBarSize,RGB(2,0,0));
spCascadeTree1->EndUpdate();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\AK");
spCascadeTree1->GetDefaultView(vtMissing)->GetColumns()->GetItem("CountryName")->PutSortOrder(EXCASCADETREELib::SortAscending);
spCascadeTree1->GetDefaultView(vtMissing)->GetNextView()->GetColumns()->GetItem("StateName")->PutSortOrder(EXCASCADETREELib::SortAscending);
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing)->GetNextView()->GetNextView();
	var_View->PutColumnAutoResize(VARIANT_FALSE);
	EXCASCADETREELib::IColumnPtr var_Column = var_View->GetColumns()->GetItem("Name");
		var_Column->PutSortOrder(EXCASCADETREELib::SortAscending);
		var_Column->PutWidth(128);
	EXCASCADETREELib::IItemsPtr var_Items = var_View->GetItems();
		var_Items->PutSelectItem(var_Items->GetFindItem("Anchorage","Name",vtMissing),VARIANT_TRUE);
spCascadeTree1->EndUpdate();

34
How can I access the next/prev/parent/child view

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	// Columns("StateCode").Visible = False
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		var_View->PutColumnAutoResize(VARIANT_TRUE);
		var_View->GetColumns()->GetItem("CountryCode")->PutVisible(VARIANT_FALSE);
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitEqualCascadeMode);
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"RO\\CJ");
spCascadeTree1->GetDefaultView(vtMissing)->GetColumns()->GetItem("CountryName")->PutSortOrder(EXCASCADETREELib::SortAscending);
spCascadeTree1->GetDefaultView(vtMissing)->GetNextView()->GetColumns()->GetItem("StateName")->PutSortOrder(EXCASCADETREELib::SortAscending);
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing)->GetNextView()->GetNextView();
	var_View->BeginUpdate();
	var_View->PutColumnAutoResize(VARIANT_FALSE);
	EXCASCADETREELib::IColumnPtr var_Column = var_View->GetColumns()->GetItem("Name");
		var_Column->PutWidth(128);
		var_Column->PutSortOrder(EXCASCADETREELib::SortAscending);
	var_View->PutSingleSort(VARIANT_FALSE);
	var_View->PutAllowGroupBy(VARIANT_TRUE);
	var_View->GetColumns()->GetItem("Status")->PutSortOrder(EXCASCADETREELib::SortDescending);
	var_View->PutTreeColumnIndex(var_View->GetColumns()->GetItem("Name")->GetIndex());
	var_View->EndUpdate();
spCascadeTree1->EndUpdate();

33
Predefined Keywords of ShowContextMenu property

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	// Columns("StateCode").Visible = False
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		var_View->PutColumnAutoResize(VARIANT_TRUE);
		var_View->GetColumns()->GetItem("CountryCode")->PutVisible(VARIANT_FALSE);
	spCascadeTree1->PutStatusBarLabel(_bstr_t(spCascadeTree1->FormatABC(L"`<b>` + ( value replace `\\\\` with ` </b><font ;6><off 4>` )",spCascadeTree1->GetName(),vtMissing,vtMissing)));
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

// ViewEndChanging event - Occurs once the user is about to change the view.
void OnViewEndChangingCascadeTree1(long   Operation)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	spCascadeTree1->PutStatusBarLabel(_bstr_t(spCascadeTree1->FormatABC(L"`<b>` + ( value replace `\\\\` with ` </b><font ;6><off 4>` )",spCascadeTree1->GetName(),vtMissing,vtMissing)));
	spCascadeTree1->PutExecuteContextMenu(0);
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutAllowSplitView(EXCASCADETREELib::exAllowOneSplitView);
spCascadeTree1->PutFitCascadeColumns(3);
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitEqualCascadeMode);
spCascadeTree1->PutStatusBarVisible(EXCASCADETREELib::exStatusBarAnchorTop);
spCascadeTree1->PutStatusBarHeight(24);
spCascadeTree1->PutScrollPartVisible(EXCASCADETREELib::exVScroll,EXCASCADETREELib::exExtentThumbPart,VARIANT_TRUE);
spCascadeTree1->PutScrollPartVisible(EXCASCADETREELib::exHScroll,EXCASCADETREELib::exExtentThumbPart,VARIANT_TRUE);
spCascadeTree1->PutScrollPartVisible(EXCASCADETREELib::exScroll,EXCASCADETREELib::exExtentThumbPart,VARIANT_TRUE);
spCascadeTree1->PutScrollWidth(4);
spCascadeTree1->PutBackground(EXCASCADETREELib::exVSBack,RGB(240,240,240));
spCascadeTree1->PutBackground(EXCASCADETREELib::exVSThumb,RGB(128,128,128));
spCascadeTree1->PutScrollHeight(4);
spCascadeTree1->PutBackground(EXCASCADETREELib::exHSBack,spCascadeTree1->GetBackground(EXCASCADETREELib::exVSBack));
spCascadeTree1->PutBackground(EXCASCADETREELib::exHSThumb,spCascadeTree1->GetBackground(EXCASCADETREELib::exVSThumb));
spCascadeTree1->PutBackground(EXCASCADETREELib::exScrollSizeGrip,spCascadeTree1->GetBackground(EXCASCADETREELib::exVSBack));
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutBackground(EXCASCADETREELib::exCSplitBar,spCascadeTree1->GetBackground(EXCASCADETREELib::exSplitBar));
spCascadeTree1->PutBackground(EXCASCADETREELib::exHSplitBar,spCascadeTree1->GetBackground(EXCASCADETREELib::exSplitBar));
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBarSize,RGB(2,0,0));
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\AK");
spCascadeTree1->PutShowContextMenu(L"`vlevels=` + vlevels + `,vlevel=` + vlevel + `,hlevels=` + hlevels + `,hlevel=` + hlevel + `,view=` + view ");
spCascadeTree1->PutSplitViewHeight(L"256");
spCascadeTree1->EndUpdate();

32
How can I display the identifiers of the control's context menu (debug)

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	// Columns("StateCode").Visible = False
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		var_View->PutColumnAutoResize(VARIANT_TRUE);
		var_View->GetColumns()->GetItem("CountryCode")->PutVisible(VARIANT_FALSE);
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

// ViewEndChanging event - Occurs once the user is about to change the view.
void OnViewEndChangingCascadeTree1(long   Operation)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( _bstr_t(spCascadeTree1->GetExecuteContextMenu()) );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\AK");
spCascadeTree1->PutShowContextMenu(L"[debug]Popup(Item 1[id=1001],Item 2[id=1002],Item 3[id=1003]),[sep],Exit[def][id=1000]");
spCascadeTree1->EndUpdate();

31
ShowContextMenu usage

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	// Columns("StateCode").Visible = False
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		var_View->PutColumnAutoResize(VARIANT_TRUE);
		var_View->GetColumns()->GetItem("CountryCode")->PutVisible(VARIANT_FALSE);
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

// ViewEndChanging event - Occurs once the user is about to change the view.
void OnViewEndChangingCascadeTree1(long   Operation)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( _bstr_t(spCascadeTree1->GetExecuteContextMenu()) );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\AK");
spCascadeTree1->PutShowContextMenu(L"Popup(Item 1[id=1001],Item 2[id=1002],Item 3[id=1003]),[sep],Exit[def][id=1000]");
spCascadeTree1->EndUpdate();

30
How can I resize automatically all views, when the control is resized

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	// Columns("StateCode").Visible = False
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		var_View->PutColumnAutoResize(VARIANT_TRUE);
		var_View->GetColumns()->GetItem("CountryCode")->PutVisible(VARIANT_FALSE);
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::CascadeModeEnum(EXCASCADETREELib::exAutoFitOnResizeClient | EXCASCADETREELib::exSplitFixCascadeMode));
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\AK");
spCascadeTree1->EndUpdate();

29
How can I hide some columns

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	// Columns("StateCode").Visible = False
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		var_View->PutColumnAutoResize(VARIANT_TRUE);
		var_View->GetColumns()->GetItem("CountryCode")->PutVisible(VARIANT_FALSE);
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\AK");
spCascadeTree1->EndUpdate();

28
Is it possible to disable resizing the cascade columns

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	spCascadeTree1->GetView()->PutColumnAutoResize(VARIANT_TRUE);
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutMode(EXCASCADETREELib::CascadeModeEnum(EXCASCADETREELib::exAutoFitOnResizeClient | EXCASCADETREELib::exDisableResizeCascadeColumns | EXCASCADETREELib::exSplitFixCascadeMode));
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\AK");
spCascadeTree1->EndUpdate();

27
SplitFixCascadeMode Mode

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\AK");
spCascadeTree1->EndUpdate();

26
FixCascadeMode Mode

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutDefColumnWidth(96);
spCascadeTree1->PutMode(EXCASCADETREELib::exFixCascadeMode);
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\AK");
spCascadeTree1->EndUpdate();

25
SplitEqualCascadeMode Mode

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitEqualCascadeMode);
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\AK");
spCascadeTree1->EndUpdate();

24
Default Mode

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutBackground(EXCASCADETREELib::exSplitBar,RGB(196,196,196));
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\AK");
spCascadeTree1->EndUpdate();

23
SingleCascadeMode ( single-view )

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::exSingleCascadeMode);
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing);
	var_View->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Cities Where CountryCode =") +
" 'RO' ");
	var_View->PutAllowGroupBy(VARIANT_TRUE);
	var_View->PutSortBarVisible(VARIANT_TRUE);
	var_View->GetColumns()->GetItem("StateCode")->PutSortOrder(EXCASCADETREELib::SortAscending);
	var_View->PutName("Name");
spCascadeTree1->PutName(L"Isaccea");
spCascadeTree1->EndUpdate();

22
How can I display the current selection, as a path

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	spCascadeTree1->PutStatusBarLabel(spCascadeTree1->GetName());
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

// ViewEndChanging event - Occurs once the user is about to change the view.
void OnViewEndChangingCascadeTree1(long   Operation)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	spCascadeTree1->PutStatusBarLabel(spCascadeTree1->GetName());
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutStatusBarVisible(EXCASCADETREELib::exStatusBarAnchorTop);
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\AK");
spCascadeTree1->EndUpdate();

21
How can I add multiple-views to the control

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitFixCascadeMode);
spCascadeTree1->PutDataSource(_bstr_t("Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb;Member=Select * FROM Countries;Key=CountryCode;") +
"Tag=Country;Name=CountryName >>> Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=St" +
"ateName;Tag=State ||| Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name >>> Member=Se" +
"lect * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=City;Name=Na" +
"me");
spCascadeTree1->PutSelect(L"US\\AK");
spCascadeTree1->EndUpdate();

20
I wish I select items based on names, rather than keys. Is that possible

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	spCascadeTree1->GetView()->PutColumnAutoResize(VARIANT_FALSE);
	_variant_t label = spCascadeTree1->FormatABC(L"`<b>Select = </b>` + value",spCascadeTree1->GetSelect(),vtMissing,vtMissing);
	label = spCascadeTree1->FormatABC(L"A + `<br>` + `<b>Name = </b>` + B replace `|` with ` `",label,spCascadeTree1->GetName(),vtMissing);
	spCascadeTree1->PutStatusBarLabel(L"label");
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

// ViewEndChanging event - Occurs once the user is about to change the view.
void OnViewEndChangingCascadeTree1(long   Operation)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	_variant_t label = spCascadeTree1->FormatABC(L"`<b>Select = </b>` + value",spCascadeTree1->GetSelect(),vtMissing,vtMissing);
	label = spCascadeTree1->FormatABC(L"A + `<br>` + `<b>Name = </b>` + B replace `|` with ` `",label,spCascadeTree1->GetName(),vtMissing);
	spCascadeTree1->PutStatusBarLabel(L"label");
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitEqualCascadeMode);
spCascadeTree1->PutStatusBarVisible(EXCASCADETREELib::StatusBarAnchorEnum(EXCASCADETREELib::exStatusBarWordWrap | EXCASCADETREELib::exStatusBarAnchorTop));
_bstr_t ds = "Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb";
_bstr_t dm1 = "Member=Select * FROM Countries;Key=CountryCode;Tag=Country;Name=CountryName";
ds = spCascadeTree1->FormatABC(L"A + `;` + B",ds,dm1,vtMissing);
_bstr_t dm2 = _bstr_t("Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName;Tag=State ||| Member=Sel") +
"ect * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name";
ds = spCascadeTree1->FormatABC(L"A + ` >>> ` + B",ds,dm2,vtMissing);
_bstr_t dm3 = _bstr_t("Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=Ci") +
"ty;Name=Name";
ds = spCascadeTree1->FormatABC(L"A + ` >>> ` + B",ds,dm3,vtMissing);
spCascadeTree1->PutDataSource(ds);
spCascadeTree1->PutName(L"Romania\\Cluj\\Baciu*");
spCascadeTree1->EndUpdate();

19
I've noticed that I can't select multiple items. How can I do that

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	_variant_t bColumnAutoResize = spCascadeTree1->FormatABC(L"not(A = `City`)",spCascadeTree1->GetView()->GetTag(),vtMissing,vtMissing);
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		var_View->PutSingleSel(VARIANT_FALSE);
		var_View->PutColumnAutoResize(VARIANT_FALSE);
	_variant_t label = spCascadeTree1->FormatABC(L"`<b>Select = </b>` + value",spCascadeTree1->GetSelect(),vtMissing,vtMissing);
	label = spCascadeTree1->FormatABC(L"A + `<br>` + `<b>Name = </b>` + B replace `|` with ` `",label,spCascadeTree1->GetName(),vtMissing);
	spCascadeTree1->PutStatusBarLabel(L"label");
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

// ViewEndChanging event - Occurs once the user is about to change the view.
void OnViewEndChangingCascadeTree1(long   Operation)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	_variant_t label = spCascadeTree1->FormatABC(L"`<b>Select = </b>` + value",spCascadeTree1->GetSelect(),vtMissing,vtMissing);
	label = spCascadeTree1->FormatABC(L"A + `<br>` + `<b>Name = </b>` + B replace `|` with ` `",label,spCascadeTree1->GetName(),vtMissing);
	spCascadeTree1->PutStatusBarLabel(L"label");
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitEqualCascadeMode);
spCascadeTree1->PutStatusBarVisible(EXCASCADETREELib::StatusBarAnchorEnum(EXCASCADETREELib::exStatusBarWordWrap | EXCASCADETREELib::exStatusBarAnchorTop));
spCascadeTree1->PutStatusBarHeight(48);
_bstr_t ds = "Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb";
_bstr_t dm1 = "Member=Select * FROM Countries;Key=CountryCode;Tag=Country;Name=CountryName";
ds = spCascadeTree1->FormatABC(L"A + `;` + B",ds,dm1,vtMissing);
_bstr_t dm2 = _bstr_t("Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Name=StateName;Tag=State ||| Member=Sel") +
"ect * FROM Cities WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City;Name=Name";
ds = spCascadeTree1->FormatABC(L"A + ` >>> ` + B",ds,dm2,vtMissing);
_bstr_t dm3 = _bstr_t("Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=Ci") +
"ty;Name=Name";
ds = spCascadeTree1->FormatABC(L"A + ` >>> ` + B",ds,dm3,vtMissing);
spCascadeTree1->PutDataSource(ds);
spCascadeTree1->PutSelect(L"RO\\CJ|D*");
spCascadeTree1->EndUpdate();

18
How do I programmatically selects a path/item

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	_variant_t bColumnAutoResize = spCascadeTree1->FormatABC(L"not(A = `City`)",spCascadeTree1->GetView()->GetTag(),vtMissing,vtMissing);
	spCascadeTree1->GetView()->PutColumnAutoResize(VARIANT_FALSE);
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

// ViewEndChanging event - Occurs once the user is about to change the view.
void OnViewEndChangingCascadeTree1(long   Operation)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	spCascadeTree1->PutStatusBarLabel(spCascadeTree1->GetSelect());
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::exSplitEqualCascadeMode);
spCascadeTree1->PutStatusBarVisible(EXCASCADETREELib::exStatusBarAnchorBottom);
_bstr_t ds = "Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb";
_bstr_t dm1 = "Member=Select * FROM Countries;Key=CountryCode;Tag=Country";
ds = spCascadeTree1->FormatABC(L"A + `;` + B",ds,dm1,vtMissing);
_bstr_t dm2 = _bstr_t("Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Tag=State ||| Member=Select * FROM Citi") +
"es WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City";
ds = spCascadeTree1->FormatABC(L"A + ` >>> ` + B",ds,dm2,vtMissing);
_bstr_t dm3 = _bstr_t("Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=Ci") +
"ty";
ds = spCascadeTree1->FormatABC(L"A + ` >>> ` + B",ds,dm3,vtMissing);
spCascadeTree1->PutDataSource(ds);
spCascadeTree1->PutSelect(L"RO\\CJ");
spCascadeTree1->EndUpdate();

17
DataSource/DataMember/Key/Tag

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	spCascadeTree1->PutStatusBarLabel(_bstr_t(spCascadeTree1->FormatABC(_bstr_t("value replace `data source` with `<b><fgcolor=808080>Source</fgcolor></b>` replace `Source` with `<b><fgcolor=808080>Source</fg") +
	"color></b>` replace `Member` with `<b><fgcolor=808080>Member</fgcolor></b>` replace `Key` with `<b><fgcolor=808080>Key</fgcolor>" +
	"</b>` replace `Tag` with `<b><fgcolor=808080>Tag</fgcolor></b>` replace `;` with `;<br>`",spCascadeTree1->GetView()->GetDataSource(),vtMissing,vtMissing)));
	_variant_t bColumnAutoResize = spCascadeTree1->FormatABC(L"not(A = `City`)",spCascadeTree1->GetView()->GetTag(),vtMissing,vtMissing);
	_variant_t nWidth = spCascadeTree1->FormatABC(L"A = `City` ? B : C",spCascadeTree1->GetView()->GetTag(),spCascadeTree1->GetView()->GetWidthToFit(),spCascadeTree1->GetView()->GetWidth());
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		var_View->PutColumnAutoResize(VARIANT_FALSE);
		var_View->PutWidth(nWidth);
}

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutStatusBarHeight(58);
spCascadeTree1->PutStatusBarVisible(EXCASCADETREELib::StatusBarAnchorEnum(EXCASCADETREELib::exStatusBarWordWrap | EXCASCADETREELib::exStatusBarAnchorTop));
_bstr_t ds = "Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb";
_bstr_t dm1 = "Member=Select * FROM Countries;Key=CountryCode;Tag=Country";
ds = spCascadeTree1->FormatABC(L"A + `;` + B",ds,dm1,vtMissing);
_bstr_t dm2 = _bstr_t("Member=Select * FROM States WHERE CountryCode IN (<%Parent.CountryCode%>);Key=StateCode;Tag=State ||| Member=Select * FROM Citi") +
"es WHERE CountryCode IN (<%Parent.CountryCode%>);Tag=City";
ds = spCascadeTree1->FormatABC(L"A + ` >>> ` + B",ds,dm2,vtMissing);
_bstr_t dm3 = _bstr_t("Member=Select * FROM Cities WHERE CountryCode IN (<%Parent.Parent.CountryCode%>) AND StateCode IN (<%Parent.StateCode%>);Tag=Ci") +
"ty";
ds = spCascadeTree1->FormatABC(L"A + ` >>> ` + B",ds,dm3,vtMissing);
spCascadeTree1->PutDataSource(ds);
spCascadeTree1->EndUpdate();

16
DataSource (view, data source, data member, ACCDB)

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutStatusBarVisible(EXCASCADETREELib::exStatusBarAnchorTop);
spCascadeTree1->PutStatusBarLabel(L"<b>DataSource</b> could \"Data Source=...;Data Member=...\" or \"Source=...;Member=...\" ");
spCascadeTree1->PutDefColumnWidth(336);
_bstr_t ds = "Data Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb";
_bstr_t dm = "Data Member=Select * FROM Countries";
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing);
	var_View->PutDataSource(spCascadeTree1->FormatABC(L"A + `;` + B",ds,dm,vtMissing));
	var_View->PutColumnAutoResize(VARIANT_TRUE);
spCascadeTree1->EndUpdate();

15
DataSource (view, data source, data member, MDB)

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutStatusBarVisible(EXCASCADETREELib::exStatusBarAnchorTop);
spCascadeTree1->PutStatusBarLabel(L"<b>DataSource</b> could \"Data Source=...;Data Member=...\" or \"Source=...;Member=...\" ");
spCascadeTree1->PutDefColumnWidth(336);
_bstr_t ds = "Data Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.mdb";
_bstr_t dm = "Data Member=Select * FROM Countries";
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing);
	var_View->PutDataSource(spCascadeTree1->FormatABC(L"A + `;` + B",ds,dm,vtMissing));
	var_View->PutColumnAutoResize(VARIANT_TRUE);
spCascadeTree1->EndUpdate();

14
DataSource (view, ADODB, ACCDB)

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutStatusBarVisible(EXCASCADETREELib::exStatusBarAnchorTop);
spCascadeTree1->PutStatusBarLabel(L"<b>DataSource</b> could be string (Source/Member), ADO or DAO objects");
spCascadeTree1->PutDefColumnWidth(336);
/*
	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 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr ado = ::CreateObject(L"ADODB.Recordset");
	ado->Open("Countries","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing);
	var_View->PutDataSource(((ADODB::_RecordsetPtr)(ado)));
	var_View->PutColumnAutoResize(VARIANT_TRUE);
spCascadeTree1->EndUpdate();

13
DataSource (view, ADODB, MDB)

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutStatusBarVisible(EXCASCADETREELib::exStatusBarAnchorTop);
spCascadeTree1->PutStatusBarLabel(L"<b>DataSource</b> could be string (Source/Member), ADO or DAO objects");
spCascadeTree1->PutDefColumnWidth(336);
/*
	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 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr ado = ::CreateObject(L"ADODB.Recordset");
	ado->Open("Countries","Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.mdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing);
	var_View->PutDataSource(((ADODB::_RecordsetPtr)(ado)));
	var_View->PutColumnAutoResize(VARIANT_TRUE);
spCascadeTree1->EndUpdate();

12
DataSource (control, data source, data member, ACCDB)

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutStatusBarVisible(EXCASCADETREELib::exStatusBarAnchorTop);
spCascadeTree1->PutStatusBarLabel(L"<b>DataSource</b> could \"Data Source=...;Data Member=...\" or \"Source=...;Member=...\" ");
spCascadeTree1->PutDefColumnWidth(336);
_bstr_t ds = "Data Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb";
_bstr_t dm = "Data Member=Select * FROM Countries";
spCascadeTree1->PutDataSource(spCascadeTree1->FormatABC(L"A + `;` + B",ds,dm,vtMissing));
spCascadeTree1->GetView()->PutColumnAutoResize(VARIANT_TRUE);
spCascadeTree1->EndUpdate();

11
DataSource (control, data source, data member, MDB)

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutStatusBarVisible(EXCASCADETREELib::exStatusBarAnchorTop);
spCascadeTree1->PutStatusBarLabel(L"<b>DataSource</b> could \"Data Source=...;Data Member=...\" or \"Source=...;Member=...\" ");
spCascadeTree1->PutDefColumnWidth(336);
_bstr_t ds = "Data Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.mdb";
_bstr_t dm = "Data Member=Select * FROM Countries";
spCascadeTree1->PutDataSource(spCascadeTree1->FormatABC(L"A + `;` + B",ds,dm,vtMissing));
spCascadeTree1->GetView()->PutColumnAutoResize(VARIANT_TRUE);
spCascadeTree1->EndUpdate();

10
DataSource (control, ADODB, ACCDB)

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutStatusBarVisible(EXCASCADETREELib::exStatusBarAnchorTop);
spCascadeTree1->PutStatusBarLabel(L"<b>DataSource</b> could be string (Source/Member), ADO or DAO objects");
spCascadeTree1->PutDefColumnWidth(336);
/*
	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 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr ado = ::CreateObject(L"ADODB.Recordset");
	ado->Open("Countries","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spCascadeTree1->PutDataSource(((ADODB::_RecordsetPtr)(ado)));
spCascadeTree1->GetView()->PutColumnAutoResize(VARIANT_TRUE);
spCascadeTree1->EndUpdate();

9
DataSource (control, ADODB, MDB)

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutStatusBarVisible(EXCASCADETREELib::exStatusBarAnchorTop);
spCascadeTree1->PutStatusBarLabel(L"<b>DataSource</b> could be string (Source/Member), ADO or DAO objects");
spCascadeTree1->PutDefColumnWidth(336);
/*
	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 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr ado = ::CreateObject(L"ADODB.Recordset");
	ado->Open("Countries","Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Access\\cities.mdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spCascadeTree1->PutDataSource(((ADODB::_RecordsetPtr)(ado)));
spCascadeTree1->GetView()->PutColumnAutoResize(VARIANT_TRUE);
spCascadeTree1->EndUpdate();

8
DataSource (view, XMLDOMDocument)

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutStatusBarVisible(EXCASCADETREELib::exStatusBarAnchorTop);
spCascadeTree1->PutStatusBarLabel(L"<b>DataSource</b> could be a XML file name, a URL, an IStream, an IXMLDOMDocument");
spCascadeTree1->PutDefColumnWidth(336);
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing);
	/*
	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 'MSXML2' for the library: 'Microsoft XML, v3.0'

	#import <msxml3.dll>
*/
	MSXML2::IXMLDOMDocument2Ptr xml = ::CreateObject(L"MSXML.DOMDocument");
		xml->load("C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Testing.xml");
	var_View->PutDataSource(((MSXML2::IXMLDOMDocument2Ptr)(xml)));
	var_View->PutColumnAutoResize(VARIANT_TRUE);
spCascadeTree1->EndUpdate();

7
DataSource (view, XML, file)

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutStatusBarVisible(EXCASCADETREELib::exStatusBarAnchorTop);
spCascadeTree1->PutStatusBarLabel(L"<b>DataSource</b> could be a XML file name, a URL, an IStream, an IXMLDOMDocument");
spCascadeTree1->PutDefColumnWidth(336);
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetDefaultView(vtMissing);
	var_View->PutDataSource("http://www.exontrol.net/testing.xml");
	var_View->PutColumnAutoResize(VARIANT_TRUE);
spCascadeTree1->EndUpdate();

6
DataSource (control, XMLDOMDocument)

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutStatusBarVisible(EXCASCADETREELib::exStatusBarAnchorTop);
spCascadeTree1->PutStatusBarLabel(L"<b>DataSource</b> could be a XML file name, a URL, an IStream, an IXMLDOMDocument");
spCascadeTree1->PutDefColumnWidth(336);
/*
	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 'MSXML2' for the library: 'Microsoft XML, v3.0'

	#import <msxml3.dll>
*/
MSXML2::IXMLDOMDocument2Ptr xml = ::CreateObject(L"MSXML.DOMDocument");
	xml->load("C:\\Program Files\\Exontrol\\ExCascadeTree\\Sample\\Testing.xml");
spCascadeTree1->PutDataSource(((MSXML2::IXMLDOMDocument2Ptr)(xml)));
spCascadeTree1->GetView()->PutColumnAutoResize(VARIANT_TRUE);
spCascadeTree1->EndUpdate();

5
DataSource (control, XML, file)

// Error event - An internal error occurs.
void OnErrorCascadeTree1(long   Error,LPCTSTR   Description)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Error" );
	OutputDebugStringW( L"Description" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutStatusBarVisible(EXCASCADETREELib::exStatusBarAnchorTop);
spCascadeTree1->PutStatusBarLabel(L"<b>DataSource</b> could be a XML file name, a URL, an IStream, an IXMLDOMDocument");
spCascadeTree1->PutDefColumnWidth(336);
spCascadeTree1->PutDataSource("http://www.exontrol.net/testing.xml");
spCascadeTree1->GetView()->PutColumnAutoResize(VARIANT_TRUE);
spCascadeTree1->EndUpdate();

4
How can I get the selected items (sample 1)

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		_variant_t k = var_View->GetParentView()->GetValue(vtMissing);
		var_View->BeginUpdate();
		var_View->PutColumnAutoResize(VARIANT_TRUE);
		var_View->PutKey(long(-1));
		var_View->GetColumns()->Add(L"k");
		EXCASCADETREELib::IItemsPtr var_Items = var_View->GetItems();
			var_Items->AddItem(spCascadeTree1->FormatABC(L"A + `-> Sub-Item 1`",k,vtMissing,vtMissing));
			var_Items->AddItem(spCascadeTree1->FormatABC(L"A + `-> Sub-Item 2`",k,vtMissing,vtMissing));
			var_Items->AddItem(spCascadeTree1->FormatABC(L"A + `-> Sub-Item 3`",k,vtMissing,vtMissing));
		var_View->EndUpdate();
}

// ViewEndChanging event - Occurs once the user is about to change the view.
void OnViewEndChangingCascadeTree1(long   Operation)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"End" );
	OutputDebugStringW( L"Operation" );
	EXCASCADETREELib::IItemsPtr var_Items = spCascadeTree1->GetView()->GetItems();
		OutputDebugStringW( L"FocusItem" );
		OutputDebugStringW( var_Items->GetCellCaption(var_Items->GetFocusItem(),long(0)) );
		OutputDebugStringW( L"SelectedItem" );
		OutputDebugStringW( var_Items->GetCellCaption(var_Items->GetSelectedItem(0),long(0)) );
}

// ViewStartChanging event - Occurs once the user is about to change the view.
void OnViewStartChangingCascadeTree1(long   Operation)
{
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	OutputDebugStringW( L"Start" );
	OutputDebugStringW( L"Operation" );
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
	var_View->BeginUpdate();
	var_View->PutColumnAutoResize(VARIANT_TRUE);
	var_View->GetColumns()->Add(L"Default");
	var_View->PutKey(long(0));
	var_View->PutLinesAtRoot(EXCASCADETREELib::exLinesAtRoot);
	EXCASCADETREELib::IItemsPtr var_Items = var_View->GetItems();
		var_Items->AddItem("Item A");
		var_Items->PutSelectItem(var_Items->AddItem("Item B"),VARIANT_TRUE);
		var_Items->AddItem("Item C");
	var_View->EndUpdate();
spCascadeTree1->EndUpdate();

3
Can I use this control as a simple tree

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'

	#import <ExCascadeTree.dll>
	using namespace EXCASCADETREELib;
*/
EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
spCascadeTree1->PutMode(EXCASCADETREELib::exSingleCascadeMode);
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
	var_View->BeginUpdate();
	var_View->PutColumnAutoResize(VARIANT_TRUE);
	var_View->GetColumns()->Add(L"Default");
	var_View->PutKey(long(-1));
	var_View->PutLinesAtRoot(EXCASCADETREELib::exLinesAtRoot);
	EXCASCADETREELib::IItemsPtr var_Items = var_View->GetItems();
		var_Items->AddItem("Item A");
		var_Items->InsertItem(var_Items->AddItem("Item B"),vtMissing,"Child");
		var_Items->AddItem("Item C");
	var_View->EndUpdate();
spCascadeTree1->EndUpdate();

2
How can I use this control

// CreateView event - A view has been created.
void OnCreateViewCascadeTree1(LPDISPATCH   View)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'
		#import <ExCascadeTree.dll>
		using namespace EXCASCADETREELib;
	*/
	EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
	EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
		_variant_t k = var_View->GetParentView()->GetValue(vtMissing);
		var_View->BeginUpdate();
		var_View->PutColumnAutoResize(VARIANT_TRUE);
		var_View->GetColumns()->Add(L"k");
		EXCASCADETREELib::IItemsPtr var_Items = var_View->GetItems();
			var_Items->AddItem(spCascadeTree1->FormatABC(L"A + `-> Sub-Item 1`",k,vtMissing,vtMissing));
			var_Items->AddItem(spCascadeTree1->FormatABC(L"A + `-> Sub-Item 2`",k,vtMissing,vtMissing));
			var_Items->AddItem(spCascadeTree1->FormatABC(L"A + `-> Sub-Item 3`",k,vtMissing,vtMissing));
		var_View->EndUpdate();
}

EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->BeginUpdate();
EXCASCADETREELib::IViewPtr var_View = spCascadeTree1->GetView();
	var_View->BeginUpdate();
	var_View->PutColumnAutoResize(VARIANT_TRUE);
	var_View->GetColumns()->Add(L"Default");
	var_View->PutKey(long(0));
	EXCASCADETREELib::IItemsPtr var_Items = var_View->GetItems();
		var_Items->AddItem("Item A");
		var_Items->PutSelectItem(var_Items->AddItem("Item B"),VARIANT_TRUE);
		var_Items->AddItem("Item C");
	var_View->EndUpdate();
spCascadeTree1->EndUpdate();

1
How do I change the control's background color
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCASCADETREELib' for the library: 'ExCascadeTree 1.0 Control Library'

	#import <ExCascadeTree.dll>
	using namespace EXCASCADETREELib;
*/
EXCASCADETREELib::ICascadeTreePtr spCascadeTree1 = GetDlgItem(IDC_CASCADETREE1)->GetControlUnknown();
spCascadeTree1->PutBackColor(RGB(240,240,240));