1968:
How do I get the duration/working count of the bar (sample 6,excrd)

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDefaultItemHeight(48);
spG2antt1->PutShowFocusRect(VARIANT_FALSE);
spG2antt1->PutSelBackMode(EXG2ANTTLib::exTransparent);
spG2antt1->PutBackColorLevelHeader(spG2antt1->GetBackColor());
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exHLines);
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,12,26,0,00,00).operator DATE());
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->Add(L"Task:Split");
		var_Bar->PutShortcut(L"Task");
		var_Bar->PutDef(EXG2ANTTLib::exBarToolTip,"<%=%263%>");
		var_Bar->PutDef(EXG2ANTTLib::exBarOffset,long(-12));
	var_Chart->PutColumnsFormatLevel(L"1,2/3");
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Duration")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(513));
	var_Column->PutVisible(VARIANT_FALSE);
	var_Column->PutAlignment(EXG2ANTTLib::LeftAlignment);
	var_Column->PutFormatColumn(L"value + `d`");
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Working")));
	var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(258));
	var_Column1->PutVisible(VARIANT_FALSE);
	var_Column1->PutAlignment(EXG2ANTTLib::RightAlignment);
	var_Column1->PutFormatColumn(L"value + `w`");
EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Working-Period")));
	var_Column2->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(263));
	var_Column2->PutVisible(VARIANT_FALSE);
	var_Column2->PutAlignment(EXG2ANTTLib::CenterAlignment);
	var_Column2->PutFormatColumn(L"((value replace `\\r\\n` with `,`) replace `#` with ``) replace ` ` with ``");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2002,1,2,0,00,00).operator DATE(),COleDateTime(2002,1,11,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2002,1,3,0,00,00).operator DATE(),COleDateTime(2002,1,15,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2001,12,31,0,00,00).operator DATE(),COleDateTime(2002,1,13,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1967:
How do I get the duration/working count of the bar (sample 5)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->PutItemMaxHeight(Item,64);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutBackColorAlternate(RGB(240,240,240));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2002,1,1,0,00,00).operator DATE());
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->Add(L"Task:Split");
		var_Bar->PutShortcut(L"Task");
		var_Bar->PutDef(EXG2ANTTLib::exBarToolTip,"<%=%263%>");
	var_Chart->PutColumnsFormatLevel(L"1,2");
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Task")));
	var_Column->PutAllowSizing(VARIANT_FALSE);
	var_Column->PutWidth(48);
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Duration")));
	var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(513));
	var_Column1->PutVisible(VARIANT_FALSE);
	var_Column1->PutAlignment(EXG2ANTTLib::LeftAlignment);
EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Working")));
	var_Column2->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(258));
	var_Column2->PutVisible(VARIANT_FALSE);
	var_Column2->PutAlignment(EXG2ANTTLib::RightAlignment);
EXG2ANTTLib::IColumnPtr var_Column3 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Working-Period")));
	var_Column3->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(263));
	var_Column3->PutDef(EXG2ANTTLib::exCellSingleLine,VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2002,1,2,0,00,00).operator DATE(),COleDateTime(2002,1,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2002,1,3,0,00,00).operator DATE(),COleDateTime(2002,1,15,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2002,1,4,0,00,00).operator DATE(),COleDateTime(2002,1,16,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1966:
How do I get the duration/working count of the bar (sample 4)

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,12,26,0,00,00).operator DATE());
	var_Chart->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task");
	var_Chart->PutColumnsFormatLevel(L"1,2");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Task")))->PutWidth(48);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Duration")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(513));
	var_Column->PutVisible(VARIANT_FALSE);
	var_Column->PutAlignment(EXG2ANTTLib::LeftAlignment);
	var_Column->PutFormatColumn(L"value + `d`");
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Working")));
	var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(258));
	var_Column1->PutVisible(VARIANT_FALSE);
	var_Column1->PutAlignment(EXG2ANTTLib::RightAlignment);
	var_Column1->PutFormatColumn(L"value + `w`");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2002,1,2,0,00,00).operator DATE(),COleDateTime(2002,1,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2002,1,3,0,00,00).operator DATE(),COleDateTime(2002,1,15,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1965:
How do I get the duration/working count of the bar (sample 3)

// BarResizing event - Occurs when a bar is moving or resizing.
void OnBarResizingG2antt1(long   Item,VARIANT   Key)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		OutputDebugStringW( var_Items->GetCellCaption(Item,long(0)) );
		OutputDebugStringW( L"Working" );
		OutputDebugStringW( _bstr_t(var_Items->GetItemBar(Item,Key,EXG2ANTTLib::exBarWorkingCount)) );
		OutputDebugStringW( var_Items->GetCellCaption(Item,long(0)) );
		OutputDebugStringW( L"Duration" );
		OutputDebugStringW( _bstr_t(var_Items->GetItemBar(Item,Key,EXG2ANTTLib::exBarDuration)) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,12,26,0,00,00).operator DATE());
	var_Chart->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Task")))->PutWidth(48);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2002,1,2,0,00,00).operator DATE(),COleDateTime(2002,1,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2002,1,3,0,00,00).operator DATE(),COleDateTime(2002,1,15,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1964:
How do I get the duration/working count of the bar (sample 2)

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,12,26,0,00,00).operator DATE());
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->Add(L"Task:Split");
		var_Bar->PutShortcut(L"Task");
		var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<%=%258%>w");
		var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
		var_Bar->PutDef(EXG2ANTTLib::exBarExtraCaption,"<%=%513%>d");
		var_Bar->PutDef(EXG2ANTTLib::exBarExtraCaptionHAlign,long(16));
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Task")))->PutWidth(48);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2002,1,2,0,00,00).operator DATE(),COleDateTime(2002,1,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2002,1,3,0,00,00).operator DATE(),COleDateTime(2002,1,15,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1963:
How do I get the duration/working count of the bar (sample 1)

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,196);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2002,1,1,0,00,00).operator DATE());
	var_Chart->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Task")))->PutWidth(48);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Duration")))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(513));
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Working")))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(258));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2002,1,2,0,00,00).operator DATE(),COleDateTime(2002,1,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2002,1,3,0,00,00).operator DATE(),COleDateTime(2002,1,15,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1962:
How can I draw a solid frame around the the focusing item

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSingleSel(VARIANT_FALSE);
spG2antt1->PutDefaultItemHeight(20);
EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance();
	var_Appearance->PutRenderType(-1);
	var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABOkGACAADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBKUQSDqEYyjGLIXAWCYSAAMIwDKAUEwpFAZBhgeDYMiSNoYDJCM4wH") +
"IURRJFCUJSGWQpTgSIgyT5HFIxXKoASbJabZLhWS6EpWOotTbIQQRYCkEyfKKfZyGURZQqOKA1DBZErWTJESRFJqLazgO4LAhyQYrVgAErzVKVCRNOqbJzADApdpGQJT" +
"ULDNTQHRFIyhOSnIRrWbMAhid6JUZiVT4dBOIYhSYANAqCwLFqrDJmWrpV5WZjlZ47V6BdAyXJsIrmFJEXaOGhyDDlGybSDZYryfZhUziUw4XjbWwZDqPF6DKTTdSGLR" +
"EE8WZVlURZvDaep3C+AY8kAYRgGCCBJECUhjDoHROEYWgoAGTQ1CEEx9lGMY0CQUYSnuZQDBGBYFlOH5+H+igGAKAJgEgFgGgGVgDn4CoCmCSA2A6A5hAgDgQgSYRIE4" +
"EoFGGCBiBeBhhkgPgbgcYgICoH4IGGWIOCSBhiGiHgVgoYooFoAoLGIWI+DCCgjCiTgrgII4ImYOoOmOSJ2AYOpWlQDQBICA=");
spG2antt1->PutShowFocusRect(VARIANT_TRUE);
spG2antt1->PutBackground(EXG2ANTTLib::exShowFocusRect,0x1000000);
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,1);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"P1")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

1961:
The frame around the focusing item is not very clear. Can I show it larger or more cleared (sample 2)

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSingleSel(VARIANT_FALSE);
spG2antt1->PutDefaultItemHeight(20);
spG2antt1->PutShowFocusRect(VARIANT_TRUE);
EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance();
	var_Appearance->PutRenderType(-1);
	var_Appearance->Add(2,_bstr_t("gBFLBCJwBAEHhEJAAEhABPEGACAADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBKUQSDqEYyjGLIXAWCYSAAMIwDKAUEwpFAZBhgeCRUgyJI3RgMUIzV") +
"AcRRFEiUJQlIZZCjOAw0SIMU7xZRcNxsACnaZnCR4NiuRYiUhOcqzRIQIQ4CiEahqOgJbDUJYwWZKAyjBY8XTZFCSJCpeJ6egOc5jRxQUp1WAEXx3GSsJKvCZ5cADBY+" +
"VLQNS0JBtMSTKSLaiuWoIJqCPaDRheWKQJh1NSnLqEcjyYANDxDCZlWzAYxWTZ2Uz7N7PbB0HY4DyPGKZYrfESVRbQcZNS6nNigPI9XhfGq6VjRe63ZaOaYpWrnOJqTR" +
"WjOKYujWdZ2BGO5lkuBAAkmcQkDmDBEAwEQJCgGhMGcQ4pkiSxGAAOYmkQIhvkYNg2gSCgyj+LI4GIMIwF2XQoAYAoAmASAWAaAZgggJgKFiT54DYDoDmECBGBKBJgGg" +
"TgWgWYRoFYGIGmGOBqByB5hCgegggiYJYgoJIICIaIeByChiigYgsgsYYYBYMIKCMKJOCuDRjGiOgLg6Y5InYPoPmQCAkmsXAQDQBCAg=");
	var_Appearance->Add(3,"CP:2 -3 0 3 0");
spG2antt1->PutBackground(EXG2ANTTLib::exShowFocusRect,0x3010101);
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,1);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"P1")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

1960:
The frame around the focusing item is not very clear. Can I show it larger or more cleared (sample 1)

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSingleSel(VARIANT_FALSE);
spG2antt1->PutShowFocusRect(VARIANT_TRUE);
EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance();
	var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABHoDg6AADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBIZQ7BKNIxjSJwFiCCQwSDKEjyCKcGRHF6MI6gOYpCgOIYjRJNIASV") +
"AceAAGaUZrjSgobjmOYhAJCLqhYIgASXJqLaBlOCaAieSc+QhjQJIJoeCZXU5TFg1BTsOhqEqcRiseaRVDCaIJWzbdYWLDdNQHHKYLjnWorbpSJZ5XjNEySDQkMS9PrE" +
"J7vST8FBCdAABLJUB2BR9RwxRafKpnWwJDpmCaOQLXEB5DK1PyVMTKYrtGy7GrIAJxWxbV4UHh+QABOzIMAvHKJMwvHYcUZne5XVLeF41HbONogPaJZyIAK2cLROq6Xo" +
"7GEcJZEcLASB4DwvgWUZlE6AQQhKAYkkYdA6hyDIwHgSoqFwQgmnsYxjGgSIiBOTpSEiAwRgOJI7j4JAHA6U5wm0MpPlOBIjD8TZiGYCICiCGAuA6AxhAgMgSgOYQ4DY" +
"Bg/g6cw1n+ABOmMMJ9DmCwjnScw4RsVJngkYh4hoKIKmKKI2CmC5ikiQgqgiT5jhyMw8g4QwIn0OIKEiCJhD8DwTGyfA7k0WQOEWEQkGkJhIhKZB5DYSoTiSCQEn4PQO" +
"COXJcCeIJjliaIQk0aRyF4O5llmAhfhgZhJg4ZoYiaAxYn4PZOhOZJaCUZYTiYQw1mcOZUm+HQnHmWh4h6Z4pnYeYfk0eYsmqG4nAgNJ2DqD5DkCWoiGiOgqgyI5omoR" +
"oNiSaQKFKEojCaM4ugSFhOjkAJcieKgDkaH4oioGoOiaKRqgqEoqDddwyhuAxPgOMJ8DyDZqk6NYtCsapmjiLprHqdo6i+K5K1oPhOlqPgKD4DpjnII4yiOewuk6MxtA" +
"sMpSjObQ7EaT4wk6ewYn0PgPAiCJkjeLgDk6X44i4G4OmaORuguEpqDkLAzkaWg+E8GIUmaPIvEOVpzj2Lxbl6eo+G+S5in4OYPmOaJyjuTwjnYWpBg6DAjAqQZwkwJw" +
"NkKcJsEcEJCDBEpaD6Dw8BiapGjGSgfB2RpxmyBwgkicZ8haBw/g+M5TBcPQPlOXJskscp8jsMJMnMLJXDGTZzEyYw2kwMoDlcFw9i2M4/EGUJPg0CxFlENBtCcSJSnQ" +
"fQ0m+SgPHsaJ7lALZLG6XZVHWDRfFqVY1k0ZxdladYTnifJUGaeAWAeMnSGcGWgBObJ3lWbwdjKW5cHcTZPHaLkN4GxXDlFqFsA4uRbBOGAFAEIzAsDEFOBkfYqR4D6A" +
"OBEYo8QuBvAmMceInBDgcD0JwOIqQyJ1DMAwG4IANDnHSMoK4QhOgMBGNEIQvQWAdGenETIswGiddsAAQAgCAgA==");
	var_Appearance->Add(2,_bstr_t("gBFLBCJwBAEHhEJAAEhABeEGACAADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADDFIBQSLAYROGSDJBGODJDjWGIeQLOEhQH") +
"IMRxPE6UYLhWYpBDKPYcUbGc7yBBMVwGf59XzACoKSheQIVSDQkw6Fo6NYhAxHALyNRkBy8f60KjtGpodDUJYvW5JYyjBZ8EznOqbJBkeJ7BgOe5NQjaD72VgdWQJFSW" +
"JajWYYJDOJY2ZAAE5TVINEwxJbDaylChIdxaF6WAzZEBhBYoATPNLBMrhWqKDw2XaQWBCOgwHYeR5LU7BdRwbIrRq2eAAXbcVyXfDddZlBK+QA0SK9lRVTKvJZmKgBWw" +
"1COSxmAAGw4kcNx1iKFBiCAfQsG8lJemucg7nsXpUHOOxrm+DI3jOH4XAOBx2nscw0j2HhPG4L5uGEVIECQCBCEUAYkGMHQHFGSBlGaAxkEgQgTGCVBsDYQhCgQJZrHK" +
"UggGEShkFGNgIlsNpPnMHJHD+TADAIJIJiIWIeCqChikiIgmgiD5zHyXxgiACJKCuC4jHiZgtg6I4IlkCQwkwOIonMPJjEkFhGhGZBpA4KoMBCGJuEiE5lAkGg7hMY4J" +
"EYVoUCUNAOE6FZl0KWQACWOR2GKF5mBmChchkJRZhoXYaCKKYqGuDglEmNhuhWZpIiYc4dCcCRqGmHZlgm2YxAwSQKESHwkFkKgpiAIAIH4PIimOOg2DiChoiQJRRD+T" +
"ZDHCfwyAyCgyg+JpiioYJ/DgDgIlECQ6lwRAEICA=");
	var_Appearance->Add(3,"CP:2 -2 0 2 0");
spG2antt1->PutSelBackColor(0x1000000);
spG2antt1->PutSelForeColor(RGB(0,0,0));
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,1);
spG2antt1->PutBackground(EXG2ANTTLib::exShowFocusRect,0x3ff0000);
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"P1")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

1959:
How can I display the start/end margins of bars, when cursor hovers it like a tooltip

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"exBarToolTip");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->GetBars()->GetItem("Task")->PutDef(EXG2ANTTLib::exBarToolTip,"<b><%=%9 + '/' + %C0%></b><br><upline><dotline>Start: <%=%1%><br>End: <%=%2%><br>Duration: <%=(%2-%1)%><br>Working: <%=%258%>");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Bar.Def"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Bar.Def"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"K1",vtMissing);
	long h = var_Items->AddItem("Items.ItemBar");
	var_Items->AddBar(h,"Unknown",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,11,0,00,00).operator DATE(),"K",vtMissing);
	var_Items->PutItemBar(h,"K",EXG2ANTTLib::exBarToolTip,"Start:<%=%1%><br>End:<%=%2%>");
spG2antt1->EndUpdate();

1958:
Is it possible to define different kinds of summary bars with using the EBN files

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance();
	var_Appearance->PutRenderType(-16777216);
	var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABN0GACAADACAxRDAMgBQKAAzQFAYahuGSGAAGMYxQgmFgAQhFcZQSKUOQTDKMIziYBYJhEMQyDAAUIjOKsIhkGYcZAGQBJCjWGodQLOEgwH") +
"IERQjEyUJAGGQIHhyPYbUbGUpQHKkeRtGqgBgoKhKEouNYgAbGYIwTRsdyfDSXBpEWwbDgkNQwWTDNoRDIUQStCysaYjOpnfrUAJ1P7FdQ1NJkXRhGSSK7maapaiCSZ6" +
"STCMj1FhVKSNJ7DQKhGpgKh/ApgYpQOK4fLNXyRBK4QAyKA6bgPFZOZbFViaXY1V5bNKrcjhHQwAyHJ4XXRdV4YRAkUT4GqiJKGSYcQhuXZWbRqO6ABhef6DRThc6jKp" +
"FHIE4llEcojHqSZNgoIxnlgd5thsLREleL43gsYZ9BkaAYkMAgAm+CxGDWWAtiKCRfjcdRgHoHYnicUwgAIEIREAaQYkcQZUHIGRUDQJBOEYRAhDYCxGgMZAkCgdYQha" +
"XQIAYERwQuahXggdgeG6VZ4H4IhdiIGIOB8YIiGiHZZgqYpGF4KYHiKCI+CAU5jCiTQ2g0YhEFyax4gABAEIC");
	var_Appearance->Add(2,_bstr_t("gBFLBCJwBAEHhEJAAEhABU0IQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRhGcTAJBMIhiGQYAChEZxVhEMgzDjIAxSJAcQRFESaAABGCQG") +
"h+N4/S4NIi0CIsZQjCaiZ7pKA5bgMCo+UrNMixZQVCSOGChYRpCaZWpGGodQRUFbVHAlKypJKCKrEWSrDhuYAAW7XM7yBS1TzVNSuLZtaLqSroAJ1WTWMB0Ra8NzZEKf" +
"aZACj4arKejrRDCMAggI=");
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
		var_Bar->PutColor(RGB(1,0,0));
	EXG2ANTTLib::IBarPtr var_Bar1 = var_Chart->GetBars()->GetItem("Summary");
		var_Bar1->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
		var_Bar1->PutColor(0x2000000);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long hSummaryJ = var_Items->AddItem("Summary A");
	var_Items->AddBar(hSummaryJ,"Summary",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,2,0,00,00).operator DATE(),"J",vtMissing);
	long hTaskJ = var_Items->InsertItem(hSummaryJ,vtMissing,"Task A.1");
	var_Items->AddBar(hTaskJ,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"J1",vtMissing);
	hTaskJ = var_Items->InsertItem(hSummaryJ,vtMissing,"Task A.2");
	var_Items->AddBar(hTaskJ,"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"J2",vtMissing);
	var_Items->DefineSummaryBars(hSummaryJ,"J",-1,"<*>");
	long hSummaryK = var_Items->AddItem("Summary B");
	var_Items->AddBar(hSummaryK,"Summary",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,2,0,00,00).operator DATE(),"K",vtMissing);
	long hTaskK = var_Items->InsertItem(hSummaryK,vtMissing,"Task B.1");
	var_Items->AddBar(hTaskK,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K1",vtMissing);
	hTaskK = var_Items->InsertItem(hSummaryK,vtMissing,"Task B.2");
	var_Items->AddBar(hTaskK,"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->DefineSummaryBars(hSummaryK,"K",-1,"<*>");
	var_Items->PutItemBar(0,"<K*>",EXG2ANTTLib::exBarColor,long(255));
	long hSummaryZ = var_Items->AddItem("Summary B");
	var_Items->AddBar(hSummaryZ,"Summary",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,2,0,00,00).operator DATE(),"Z",vtMissing);
	long hTaskZ = var_Items->InsertItem(hSummaryZ,vtMissing,"Task B.1");
	var_Items->AddBar(hTaskZ,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"Z1",vtMissing);
	hTaskZ = var_Items->InsertItem(hSummaryZ,vtMissing,"Task B.2");
	var_Items->AddBar(hTaskZ,"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"Z2",vtMissing);
	var_Items->DefineSummaryBars(hSummaryZ,"Z",-1,"<*>");
	var_Items->PutItemBar(hSummaryZ,"Z",EXG2ANTTLib::exBarColor,long(16842496));
	var_Items->PutItemBar(0,"<Z1>",EXG2ANTTLib::exBarColor,long(50266112));
	var_Items->PutItemBar(0,"<Z2>",EXG2ANTTLib::exBarColor,long(33554176));
	var_Items->PutExpandItem(0,VARIANT_TRUE);
spG2antt1->EndUpdate();

1957:
How can I display the week-number in ISO8601 format

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2007,12,12,0,00,00).operator DATE());
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines);
	var_Chart->PutUnitScale(EXG2ANTTLib::exWeek);
	var_Chart->GetLevel(0)->PutFormatLabel(L"value + `<r><off -4><fgcolor=808080><font ;6>` + year(dvalue)");
	var_Chart->GetLevel(1)->PutFormatLabel(L"(value = 1 ? `<bgcolor=000000><fgcolor=FFFFFF>` : ``) + value");
	var_Chart->PutWeekNumberAs(EXG2ANTTLib::exISO8601WeekNumber);
	var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday);
spG2antt1->EndUpdate();

1956:
I have a column right-aligned. How can I display its check box aligned to the right, as it appears to the left of the cell's caption

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutColumnAutoResize(VARIANT_TRUE);
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exVLines);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Left")));
		var_Column->PutAllowSizing(VARIANT_FALSE);
		var_Column->PutWidth(96);
		var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column->PutFormatColumn(L"0 pos `A-Z`");
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Center")));
		var_Column1->PutHeaderAlignment(EXG2ANTTLib::CenterAlignment);
		var_Column1->PutAlignment(var_Column1->GetHeaderAlignment());
		var_Column1->PutAllowSizing(VARIANT_FALSE);
		var_Column1->PutWidth(96);
		var_Column1->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column1->PutFormatColumn(L"0 pos `A-Z`");
	EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Right")));
		var_Column2->PutHeaderAlignment(EXG2ANTTLib::RightAlignment);
		var_Column2->PutAlignment(var_Column2->GetHeaderAlignment());
		var_Column2->PutAllowSizing(VARIANT_FALSE);
		var_Column2->PutWidth(96);
		var_Column2->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column2->PutFormatColumn(L"0 pos `A-Z`");
		var_Column2->PutDef(EXG2ANTTLib::exCellDrawPartsOrder,"caption,check,icon,icons,picture");
	var_Columns->Add(L"");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellState(var_Items->AddItem("Item 1"),long(3),1);
	var_Items->PutCellState(var_Items->AddItem("Item 2"),long(2),1);
	var_Items->PutCellState(var_Items->AddItem("Item 3"),long(1),1);
spG2antt1->EndUpdate();

1955:
Can I display the column's multiple-lines caption vertically oriented (method 2)

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutHeaderHeight(48);
spG2antt1->PutColumnAutoResize(VARIANT_TRUE);
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"And others ...");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"")));
		var_Column->PutHTMLCaption(L"First Column");
		var_Column->PutHeaderVertical(VARIANT_TRUE);
		var_Column->PutWidth(36);
		var_Column->PutAllowSizing(VARIANT_FALSE);
		var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column->PutDef(EXG2ANTTLib::exCellPaddingLeft,long(8));
		var_Column->PutPosition(0);
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"")));
		var_Column1->PutHTMLCaption(L"<c><b>Second Column");
		var_Column1->PutHeaderVertical(VARIANT_TRUE);
		var_Column1->PutWidth(36);
		var_Column1->PutAllowSizing(VARIANT_FALSE);
		var_Column1->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column1->PutDef(EXG2ANTTLib::exCellPaddingLeft,long(8));
		var_Column1->PutPosition(1);
	EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"")));
		var_Column2->PutHTMLCaption(L"<r>Third Column");
		var_Column2->PutHeaderVertical(VARIANT_TRUE);
		var_Column2->PutWidth(36);
		var_Column2->PutAllowSizing(VARIANT_FALSE);
		var_Column2->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column2->PutDef(EXG2ANTTLib::exCellPaddingLeft,long(8));
		var_Column2->PutPosition(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellState(var_Items->AddItem("Item 1"),long(3),1);
	var_Items->PutCellState(var_Items->AddItem("Item 2"),long(2),1);
	var_Items->PutCellState(var_Items->AddItem("Item 3"),long(1),1);
spG2antt1->EndUpdate();

1954:
Can I display the column's multiple-lines caption vertically oriented (method 1)

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutHeaderHeight(48);
spG2antt1->PutHeaderSingleLine(VARIANT_FALSE);
spG2antt1->PutColumnAutoResize(VARIANT_TRUE);
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"And others ...");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"First Column")));
		var_Column->PutHeaderVertical(VARIANT_TRUE);
		var_Column->PutWidth(36);
		var_Column->PutAllowSizing(VARIANT_FALSE);
		var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column->PutDef(EXG2ANTTLib::exCellPaddingLeft,long(8));
		var_Column->PutPosition(0);
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Second Column")));
		var_Column1->PutHeaderBold(VARIANT_TRUE);
		var_Column1->PutHeaderVertical(VARIANT_TRUE);
		var_Column1->PutWidth(36);
		var_Column1->PutAllowSizing(VARIANT_FALSE);
		var_Column1->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column1->PutDef(EXG2ANTTLib::exCellPaddingLeft,long(8));
		var_Column1->PutPosition(1);
	EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Third Column")));
		var_Column2->PutHeaderVertical(VARIANT_TRUE);
		var_Column2->PutWidth(36);
		var_Column2->PutAllowSizing(VARIANT_FALSE);
		var_Column2->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column2->PutDef(EXG2ANTTLib::exCellPaddingLeft,long(8));
		var_Column2->PutPosition(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellState(var_Items->AddItem("Item 1"),long(3),1);
	var_Items->PutCellState(var_Items->AddItem("Item 2"),long(2),1);
	var_Items->PutCellState(var_Items->AddItem("Item 3"),long(1),1);
spG2antt1->EndUpdate();

1953:
Can I display the column's caption vertically oriented (method 2)

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutHeaderHeight(48);
spG2antt1->PutColumnAutoResize(VARIANT_TRUE);
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"And others ...");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"")));
		var_Column->PutHTMLCaption(L"First");
		var_Column->PutHeaderVertical(VARIANT_TRUE);
		var_Column->PutWidth(20);
		var_Column->PutAllowSizing(VARIANT_FALSE);
		var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column->PutPosition(0);
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"")));
		var_Column1->PutHTMLCaption(L"<c><b>Second");
		var_Column1->PutHeaderVertical(VARIANT_TRUE);
		var_Column1->PutWidth(20);
		var_Column1->PutAllowSizing(VARIANT_FALSE);
		var_Column1->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column1->PutPosition(1);
	EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"")));
		var_Column2->PutHTMLCaption(L"<r>Third");
		var_Column2->PutHeaderVertical(VARIANT_TRUE);
		var_Column2->PutWidth(20);
		var_Column2->PutAllowSizing(VARIANT_FALSE);
		var_Column2->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column2->PutPosition(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellState(var_Items->AddItem("Item 1"),long(3),1);
	var_Items->PutCellState(var_Items->AddItem("Item 2"),long(2),1);
	var_Items->PutCellState(var_Items->AddItem("Item 3"),long(1),1);
spG2antt1->EndUpdate();

1952:
Can I display the column's caption vertically oriented (method 1)

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutHeaderHeight(48);
spG2antt1->PutColumnAutoResize(VARIANT_TRUE);
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"And others ...");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"First")));
		var_Column->PutHeaderVertical(VARIANT_TRUE);
		var_Column->PutWidth(20);
		var_Column->PutAllowSizing(VARIANT_FALSE);
		var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column->PutPosition(0);
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Second")));
		var_Column1->PutHeaderBold(VARIANT_TRUE);
		var_Column1->PutHeaderVertical(VARIANT_TRUE);
		var_Column1->PutWidth(20);
		var_Column1->PutAllowSizing(VARIANT_FALSE);
		var_Column1->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column1->PutPosition(1);
	EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Third")));
		var_Column2->PutHeaderVertical(VARIANT_TRUE);
		var_Column2->PutWidth(20);
		var_Column2->PutAllowSizing(VARIANT_FALSE);
		var_Column2->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column2->PutPosition(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellState(var_Items->AddItem("Item 1"),long(3),1);
	var_Items->PutCellState(var_Items->AddItem("Item 2"),long(2),1);
	var_Items->PutCellState(var_Items->AddItem("Item 3"),long(1),1);
spG2antt1->EndUpdate();

1951:
How can I resize all task-bars 0-length

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,3,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,5,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBarEx("itembar(513) = 0 and itembar(0) = `Task`",EXG2ANTTLib::exBarColor,long(255));
	var_Items->PutItemBarEx("itembar(513) = 0 and itembar(0) = `Task`",EXG2ANTTLib::exBarDuration,"value + 1");
spG2antt1->EndUpdate();

1950:
Is it possible to mark items that holds items with 0-length (zero,empty, sample 3)
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Duration")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(513));
	var_Column->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"%1 = 0",vtMissing);
	var_ConditionalFormat->PutBold(VARIANT_TRUE);
	var_ConditionalFormat->PutBackColor(RGB(190,190,190));
	var_ConditionalFormat->PutChartBackColor(var_ConditionalFormat->GetBackColor());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,3,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,5,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1949:
Is it possible to mark items that holds items with 0-length (zero,empty, sample 2)

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,3,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,5,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBarEx("itembar(513) = 0",EXG2ANTTLib::exBarCaption,"`zero-length`");
spG2antt1->EndUpdate();

1948:
Is it possible to mark items that holds items with 0-length (zero,empty, sample 1)

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,3,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,5,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBarEx("itembar(513) = 0",EXG2ANTTLib::exBarBackgroundExt,"`[frame=RGB(255,0,0),framethick,pattern=6,patterncolor=RGB(255,0,0)]`");
	var_Items->PutItemBarEx("itembar(513) = 0",EXG2ANTTLib::exBarBackgroundExtInflate,"`-4,-4,4,4`");
spG2antt1->EndUpdate();

1947:
How can I find how many tasks/bars of 0-length (zero,empty) do I have

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,3,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,5,0,00,00).operator DATE(),vtMissing,vtMissing);
	OutputDebugStringW( _bstr_t(var_Items->GetItemBarEx("itembar(513) = 0",EXG2ANTTLib::exBarsCount)) );
spG2antt1->EndUpdate();

1946:
How can I remove all bars from selected items

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSingleSel(VARIANT_FALSE);
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutSelBackColor(RGB(240,240,240));
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutOverlaidType(EXG2ANTTLib::exOverlaidBarsStack);
		var_Bar->PutOverlaidGroup(L"Task,Task-Diff");
		var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<font ;6><%=%0%>");
		var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
	EXG2ANTTLib::IBarPtr var_Bar1 = var_Chart->GetBars()->Copy(L"Task",L"Task-Diff");
		var_Bar1->PutHeight(4);
		var_Bar1->PutColor(RGB(255,0,0));
		var_Bar1->PutDef(EXG2ANTTLib::exBarCaption,"<font ;6><%=%0%>");
		var_Bar1->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(16));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	long h = var_Items->AddItem("Task 2");
	var_Items->AddBar(h,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,9,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Task 3");
	var_Items->AddBar(h,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(h,"Task-Diff",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,14,0,00,00).operator DATE(),"P",vtMissing);
	var_Items->PutSelectItem(h,VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,16,0,00,00).operator DATE(),vtMissing,vtMissing);
	OutputDebugStringW( L"Bars before remove: " );
	OutputDebugStringW( _bstr_t(var_Items->GetItemBar(0,"<*>",EXG2ANTTLib::exBarsCount)) );
	var_Items->PutItemBarEx("itemisselected",EXG2ANTTLib::exBarKey,"`toberemove` + value ");
	var_Items->RemoveBar(0,"<toberemove*>");
	OutputDebugStringW( L"Bars after remove: " );
	OutputDebugStringW( _bstr_t(var_Items->GetItemBar(0,"<*>",EXG2ANTTLib::exBarsCount)) );
spG2antt1->EndUpdate();

1945:
How can I remove task bars from selected items

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSingleSel(VARIANT_FALSE);
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutSelBackColor(RGB(240,240,240));
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutOverlaidType(EXG2ANTTLib::exOverlaidBarsStack);
		var_Bar->PutOverlaidGroup(L"Task,Task-Diff");
		var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<font ;6><%=%0%>");
		var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
	EXG2ANTTLib::IBarPtr var_Bar1 = var_Chart->GetBars()->Copy(L"Task",L"Task-Diff");
		var_Bar1->PutHeight(4);
		var_Bar1->PutColor(RGB(255,0,0));
		var_Bar1->PutDef(EXG2ANTTLib::exBarCaption,"<font ;6><%=%0%>");
		var_Bar1->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(16));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	long h = var_Items->AddItem("Task 2");
	var_Items->AddBar(h,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,9,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Task 3");
	var_Items->AddBar(h,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(h,"Task-Diff",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,14,0,00,00).operator DATE(),"P",vtMissing);
	var_Items->PutSelectItem(h,VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,16,0,00,00).operator DATE(),vtMissing,vtMissing);
	OutputDebugStringW( L"Bars before remove: " );
	OutputDebugStringW( _bstr_t(var_Items->GetItemBar(0,"<*>",EXG2ANTTLib::exBarsCount)) );
	var_Items->PutItemBarEx("itemisselected and itembar(0) = `Task`",EXG2ANTTLib::exBarKey,"`toberemove` + value ");
	var_Items->RemoveBar(0,"<toberemove*>");
	OutputDebugStringW( L"Bars after remove: " );
	OutputDebugStringW( _bstr_t(var_Items->GetItemBar(0,"<*>",EXG2ANTTLib::exBarsCount)) );
spG2antt1->EndUpdate();

1944:
How can I change the pattern for some bars only

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")))->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	long h = var_Items->AddItem("Task 2");
	var_Items->AddBar(h,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,9,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(h,long(0),1);
	h = var_Items->AddItem("Task 3");
	var_Items->AddBar(h,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(h,long(0),1);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,16,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBarEx("cellstate(0)",EXG2ANTTLib::exBarPattern,long(6));
spG2antt1->EndUpdate();

1943:
How do I apply the same effort to all bars

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutHistogramView(EXG2ANTTLib::exHistogramAllItems);
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	var_Chart->PutHistogramHeight(64);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutHistogramPattern(EXG2ANTTLib::exPatternBDiagonal);
		var_Bar->PutHistogramType(EXG2ANTTLib::exHistOverAllocation);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,9,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,16,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBarEx(VARIANT_TRUE,EXG2ANTTLib::exBarEffort,long(2));
spG2antt1->EndUpdate();

1942:
How do I apply the same percent to all bars

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->Add(L"Task%Progress");
		var_Bar->PutShortcut(L"Task");
		var_Bar->PutDef(EXG2ANTTLib::exBarShowPercentCaption,VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,9,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,16,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBarEx(VARIANT_TRUE,EXG2ANTTLib::exBarPercent,double(0.5));
spG2antt1->EndUpdate();

1941:
How can I set the same duration for all bars

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,9,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,16,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBarEx(VARIANT_TRUE,EXG2ANTTLib::exBarDuration,long(4));
spG2antt1->EndUpdate();

1940:
How do I move all bars to end at the same date-time

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,9,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,16,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBarEx(VARIANT_TRUE,EXG2ANTTLib::exBarMoveEnd,"#8/15/2017#");
spG2antt1->EndUpdate();

1939:
How do I move all bars to start at the same date-time

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,9,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,16,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBarEx(VARIANT_TRUE,EXG2ANTTLib::exBarMoveStart,"#8/2/2017#");
spG2antt1->EndUpdate();

1938:
How do I apply a new color for some bars, while others should be shown with a different color

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutSelBackColor(RGB(240,240,240));
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutOverlaidType(EXG2ANTTLib::exOverlaidBarsStack);
		var_Bar->PutOverlaidGroup(L"Task,Task-Diff");
		var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<font ;6><%=%0%>");
		var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
	EXG2ANTTLib::IBarPtr var_Bar1 = var_Chart->GetBars()->Copy(L"Task",L"Task-Diff");
		var_Bar1->PutHeight(4);
		var_Bar1->PutColor(RGB(255,0,0));
		var_Bar1->PutDef(EXG2ANTTLib::exBarCaption,"<font ;6><%=%0%>");
		var_Bar1->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(16));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,9,0,00,00).operator DATE(),vtMissing,vtMissing);
	long h = var_Items->AddItem("Task 3");
	var_Items->AddBar(h,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(h,"Task-Diff",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,14,0,00,00).operator DATE(),"P",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,16,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBarEx(VARIANT_TRUE,EXG2ANTTLib::exBarColor,"cellcaption(0) like `*2` ? 0x0000FF : 0x00FF00");
spG2antt1->EndUpdate();

1937:
How do I hide some bars, and show others

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSingleSel(VARIANT_FALSE);
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutSelBackColor(RGB(240,240,240));
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutOverlaidType(EXG2ANTTLib::exOverlaidBarsStack);
		var_Bar->PutOverlaidGroup(L"Task,Task-Diff");
		var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<font ;6><%=%0%>");
		var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
	EXG2ANTTLib::IBarPtr var_Bar1 = var_Chart->GetBars()->Copy(L"Task",L"Task-Diff");
		var_Bar1->PutHeight(4);
		var_Bar1->PutColor(RGB(255,0,0));
		var_Bar1->PutDef(EXG2ANTTLib::exBarCaption,"<font ;6><%=%0%>");
		var_Bar1->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(16));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	long h = var_Items->AddItem("Task 2");
	var_Items->AddBar(h,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,9,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Task 3");
	var_Items->AddBar(h,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(h,"Task-Diff",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,14,0,00,00).operator DATE(),"P",vtMissing);
	var_Items->PutSelectItem(h,VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,16,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBarEx("-1",EXG2ANTTLib::exBarTransparent,"itembar(0) = `Task` ? 0 : 100");
spG2antt1->EndUpdate();

1936:
I like how ItemBarEx works, the question is how can I remove the bars based on the same criteria

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,9,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,16,0,00,00).operator DATE(),vtMissing,vtMissing);
	OutputDebugStringW( L"Bars before remove: " );
	OutputDebugStringW( _bstr_t(var_Items->GetItemBar(0,"<*>",EXG2ANTTLib::exBarsCount)) );
	var_Items->PutItemBarEx("cellcaption(0) like `*2 *3`",EXG2ANTTLib::exBarKey,"`toberemove` + value ");
	var_Items->RemoveBar(0,"<toberemove*>");
	OutputDebugStringW( L"Bars after remove: " );
	OutputDebugStringW( _bstr_t(var_Items->GetItemBar(0,"<*>",EXG2ANTTLib::exBarsCount)) );
spG2antt1->EndUpdate();

1935:
Is it possible to automatically color the bar being checked

// CellStateChanged event - Fired after cell's state has been changed.
void OnCellStateChangedG2antt1(long   Item,long   ColIndex)
{
}

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSelBackMode(EXG2ANTTLib::exTransparent);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,1,1,0,00,00).operator DATE());
EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"%CS0","check");
	var_ConditionalFormat->PutBold(VARIANT_TRUE);
	var_ConditionalFormat->PutApplyToBars(L"Task");
	var_ConditionalFormat->PutBarColor(RGB(0,0,1));
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Items")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutWidth(256);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(spG2antt1->GetConditionalFormats()->GetItem("check")->GetExpression())))->PutFormatColumn(spG2antt1->GetConditionalFormats()->GetItem("check")->GetExpression());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Item 1"),"Task",COleDateTime(2017,1,2,0,00,00).operator DATE(),COleDateTime(2017,1,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	long h = var_Items->AddItem("Item 2");
	var_Items->AddBar(h,"Task",COleDateTime(2017,1,3,0,00,00).operator DATE(),COleDateTime(2017,1,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(h,long(0),1);
	h = var_Items->AddItem("Item 3");
	var_Items->AddBar(h,"Task",COleDateTime(2017,1,4,0,00,00).operator DATE(),COleDateTime(2017,1,14,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(h,long(0),1);
spG2antt1->EndUpdate();

1934:
How do I automatically bold items being checked

// CellStateChanged event - Fired after cell's state has been changed.
void OnCellStateChangedG2antt1(long   Item,long   ColIndex)
{
}

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSelBackMode(EXG2ANTTLib::exTransparent);
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"%CS0","check");
	var_ConditionalFormat->PutBold(VARIANT_TRUE);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Items")))->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(spG2antt1->GetConditionalFormats()->GetItem("check")->GetExpression())))->PutFormatColumn(spG2antt1->GetConditionalFormats()->GetItem("check")->GetExpression());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Item 1");
	var_Items->PutCellState(var_Items->AddItem("Item 2"),long(0),1);
	var_Items->AddItem("Item 3");
spG2antt1->EndUpdate();

1933:
Can I display the radio-button with a solid color

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spG2antt1->PutRadioImage(VARIANT_FALSE,32699122);
spG2antt1->PutRadioImage(VARIANT_TRUE,16777216);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Check")))->PutDef(EXG2ANTTLib::exCellHasRadioButton,VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Radio 1");
	var_Items->PutCellState(var_Items->AddItem("Radio 2"),long(0),1);
	var_Items->AddItem("Radio 1");
spG2antt1->EndUpdate();

1932:
Can I display the check-box with a solid color

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spG2antt1->PutCheckImage(EXG2ANTTLib::Unchecked,32699122);
spG2antt1->PutCheckImage(EXG2ANTTLib::Checked,16777216);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Check")))->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Check 1");
	var_Items->PutCellState(var_Items->AddItem("Check 2"),long(0),1);
	var_Items->AddItem("Check 3");
spG2antt1->EndUpdate();

1931:
How can I use the CellState with ConditionalFormat/ComputedField/FormatColumn

// CellStateChanged event - Fired after cell's state has been changed.
void OnCellStateChangedG2antt1(long   Item,long   ColIndex)
{
}

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exGroupLinesInsideLeaf);
spG2antt1->PutSelBackMode(EXG2ANTTLib::exTransparent);
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Items")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Format")));
	var_Column1->PutFormatColumn(L"%CS0");
	var_Column1->PutCaption(var_Column1->GetFormatColumn());
	var_Column1->PutDef(EXG2ANTTLib::exCellForeColor,long(8421504));
	var_Column1->PutDef(EXG2ANTTLib::exHeaderForeColor,var_Column1->GetDef(EXG2ANTTLib::exCellForeColor));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->InsertItem(h,vtMissing,"Item 1");
	var_Items->PutCellState(var_Items->InsertItem(h,vtMissing,"Item 2"),long(0),1);
	var_Items->PutCellState(var_Items->InsertItem(h,vtMissing,"Item 3"),long(0),1);
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

1930:
How can I use the CellData with ConditionalFormat/ComputedField/FormatColumn

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spG2antt1->GetColumns()->Add(L"Items");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Format")));
	var_Column->PutFormatColumn(L"%CD0");
	var_Column->PutCaption(var_Column->GetFormatColumn());
	var_Column->PutDef(EXG2ANTTLib::exCellForeColor,long(8421504));
	var_Column->PutDef(EXG2ANTTLib::exHeaderForeColor,var_Column->GetDef(EXG2ANTTLib::exCellForeColor));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellData(var_Items->AddItem("Item 1"),long(0),long(1234));
	var_Items->PutCellData(var_Items->AddItem("Item 2"),long(0),"this is just an user data");
	var_Items->PutCellData(var_Items->AddItem("Item 3"),long(0),COleDateTime(2001,1,1,0,00,00).operator DATE());
spG2antt1->EndUpdate();

1929:
How can I use the CellValue/CellCaption with ConditionalFormat/ComputedField/FormatColumn

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Items")));
	EXG2ANTTLib::IEditorPtr var_Editor = var_Column->GetEditor();
		var_Editor->PutEditType(EXG2ANTTLib::DropDownListType);
		var_Editor->AddItem(1,L"Item 1",vtMissing);
		var_Editor->AddItem(2,L"Item 2",vtMissing);
		var_Editor->AddItem(3,L"Item 3",vtMissing);
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Format")));
	var_Column1->PutFormatColumn(L"%0");
	var_Column1->PutCaption(var_Column1->GetFormatColumn());
	var_Column1->PutDef(EXG2ANTTLib::exCellForeColor,long(8421504));
	var_Column1->PutDef(EXG2ANTTLib::exHeaderForeColor,var_Column1->GetDef(EXG2ANTTLib::exCellForeColor));
	var_Column1->PutAllowSizing(VARIANT_FALSE);
EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Format")));
	var_Column2->PutFormatColumn(L"%C0");
	var_Column2->PutCaption(var_Column2->GetFormatColumn());
	var_Column2->PutDef(EXG2ANTTLib::exCellForeColor,long(8421504));
	var_Column2->PutDef(EXG2ANTTLib::exHeaderForeColor,var_Column2->GetDef(EXG2ANTTLib::exCellForeColor));
	var_Column2->PutAllowSizing(VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem(long(1));
	var_Items->PutCellValue(var_Items->AddItem(long(0)),long(0),long(2));
	var_Items->AddItem(long(2));
spG2antt1->EndUpdate();

1928:
How can I use the ShowNonworkingHours property (hide the non-working hours)

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutLevelCount(2);
	var_Chart->PutUnitScale(EXG2ANTTLib::exHour);
	var_Chart->PutNonworkingHours(16253183);
	var_Chart->PutShowNonworkingHours(VARIANT_FALSE);
	var_Chart->PutShowNonworkingUnits(VARIANT_FALSE);
spG2antt1->EndUpdate();

1927:
How can I use the ShowNonworkingDates property (hide the non-working days)

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutLevelCount(2);
	var_Chart->PutUnitScale(EXG2ANTTLib::exDay);
	var_Chart->PutShowNonworkingDates(VARIANT_FALSE);
	var_Chart->PutShowNonworkingUnits(VARIANT_FALSE);
spG2antt1->EndUpdate();

1926:
How can I show/hide bars once the user checks or un-checks a column

// CellStateChanged event - Fired after cell's state has been changed.
void OnCellStateChangedG2antt1(long   Item,long   ColIndex)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->PutItemBarEx(VARIANT_TRUE,EXG2ANTTLib::exBarTransparent,"cellstate(0) = 1 ? 0 : 100");
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,vtMissing,1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutItemBarEx(VARIANT_TRUE,EXG2ANTTLib::exBarTransparent,"cellstate(0) = 1 ? 0 : 100");
spG2antt1->EndUpdate();

1925:
How can I change the color for all Task bars

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,vtMissing,1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,vtMissing,1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutItemBarEx("itembar(0) = `Task`",EXG2ANTTLib::exBarColor,long(65280));
spG2antt1->EndUpdate();

1924:
Is it possible to automatically select bars only when user selects a new item

// SelectionChanged event - Fired after a new item has been selected.
void OnSelectionChangedG2antt1()
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->PutItemBarEx(VARIANT_TRUE,EXG2ANTTLib::exBarSelected,"itemisselected");
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
spG2antt1->GetColumns()->Add(L"Tasks");
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutAllowSelectObjects(EXG2ANTTLib::exNoSelectObjects);
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,vtMissing,1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,vtMissing,1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

1923:
Is it possible to automatically select bars only when the user clicks the column's checkbox

// CellStateChanged event - Fired after cell's state has been changed.
void OnCellStateChangedG2antt1(long   Item,long   ColIndex)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->PutItemBarEx(VARIANT_TRUE,EXG2ANTTLib::exBarSelected,"cellstate(0) = 1");
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutAllowSelectObjects(EXG2ANTTLib::exNoSelectObjects);
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,vtMissing,1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,vtMissing,1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

1922:
How do I select all bars on leaf items

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,vtMissing,1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,vtMissing,1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutItemBarEx("itemlevel = 1",EXG2ANTTLib::exBarSelected,VARIANT_TRUE);
spG2antt1->EndUpdate();

1921:
How can I change the caption for all checked Task bars

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,vtMissing,1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,vtMissing,1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutItemBarEx("(cellstate(0) = 1) and (itembar(0) = `Task`)",EXG2ANTTLib::exBarCaption,"`new caption`");
spG2antt1->EndUpdate();

1920:
How can I change the caption for all Task bars

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,vtMissing,1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,vtMissing,1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutItemBarEx("(itembar(0) = `Task`)",EXG2ANTTLib::exBarCaption,"`new caption`");
spG2antt1->EndUpdate();

1919:
How can I change the caption for all bars

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,vtMissing,1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,vtMissing,1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutItemBarEx(VARIANT_TRUE,EXG2ANTTLib::exBarCaption,"`new caption`");
spG2antt1->EndUpdate();

1918:
How can I move all Task bars to end at the same date time

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,vtMissing,1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,vtMissing,1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutItemBarEx("(itembar(0) = `Task`)",EXG2ANTTLib::exBarMove,"#8/14/2017# - itembar(2)");
spG2antt1->EndUpdate();

1917:
How can I move all Task bars to start at the same date time

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,vtMissing,1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,vtMissing,1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutItemBarEx("(itembar(0) = `Task`)",EXG2ANTTLib::exBarMove,"#8/3/2017# - itembar(1)");
spG2antt1->EndUpdate();

1916:
How can I change the color for checked Task bars

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,vtMissing,1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,vtMissing,1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutItemBarEx("cellstate(0) = 1 and itembar(0) = `Task`",EXG2ANTTLib::exBarColor,long(255));
spG2antt1->EndUpdate();

1915:
How do I resize all Task bars programatically

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,vtMissing,1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,vtMissing,1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutItemBarEx("itembar(0) = `Task`",EXG2ANTTLib::exBarEnd,"value + 2");
spG2antt1->EndUpdate();

1914:
How do I move just the checked Task bars in the chart

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,vtMissing,1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,vtMissing,1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutItemBarEx("cellstate(0) = 1 and itembar(0) = `Task`",EXG2ANTTLib::exBarMove,long(-2));
spG2antt1->EndUpdate();

1913:
How do I move all Task bars in the chart

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,vtMissing,1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,vtMissing,1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutItemBarEx("itembar(0) = `Task`",EXG2ANTTLib::exBarMove,long(1));
spG2antt1->EndUpdate();

1912:
How do I count all Task bars in the chart
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
spG2antt1->GetColumns()->Add(L"Tasks");
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	OutputDebugStringW( _bstr_t(var_Items->GetItemBarEx("itembar(0) = `Task`",EXG2ANTTLib::exBarsCount)) );
spG2antt1->EndUpdate();

1911:
How do I select bars whose items are checked

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutSelBackColor(RGB(240,240,240));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,vtMissing,1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,vtMissing,1);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutItemBarEx("cellstate(0) = 1",EXG2ANTTLib::exBarSelected,VARIANT_TRUE);
spG2antt1->EndUpdate();

1910:
How can I select all bars, where a specified column matches a specified criteria

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
spG2antt1->GetChart()->PutPaneWidth(VARIANT_FALSE,48);
spG2antt1->GetChart()->PutSelBarColor(RGB(255,0,0));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1","K1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"K2","K2");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"P","P");
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"Q","Q");
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"M","M");
	var_Items->PutItemBarEx("cellcaption(0) = `Task 1`",EXG2ANTTLib::exBarSelected,VARIANT_TRUE);
spG2antt1->EndUpdate();

1909:
How can I select/unselect all bars

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
spG2antt1->GetChart()->PutPaneWidth(VARIANT_FALSE,48);
spG2antt1->GetChart()->PutSelBarColor(RGB(255,0,0));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1","K1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"K2","K2");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"P","P");
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"Q","Q");
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"M","M");
	var_Items->PutItemBarEx(VARIANT_TRUE,EXG2ANTTLib::exBarSelected,VARIANT_TRUE);
spG2antt1->EndUpdate();

1908:
Is it possible to set the background color of the chart for one item and one day
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Items");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Item");
	long h = var_Items->AddItem("Item");
	var_Items->AddBar(h,"",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,3,0,00,00).operator DATE(),"Back"," ");
	var_Items->PutItemBar(h,"Back",EXG2ANTTLib::exBarBackColor,long(255));
	var_Items->PutItemBar(h,"Back",EXG2ANTTLib::exBarSelectable,VARIANT_FALSE);
	var_Items->AddItem("Item");
spG2antt1->EndUpdate();

1907:
It is possible to search for an item ( inside the Editor ), case insensitive

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IEditorPtr var_Editor = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"DropDownList")))->GetEditor();
	var_Editor->PutEditType(EXG2ANTTLib::DropDownListType);
	var_Editor->AddItem(1,L"One",vtMissing);
	var_Editor->AddItem(2,L"Two",vtMissing);
	var_Editor->AddItem(3,L"Three",vtMissing);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem(spG2antt1->GetColumns()->GetItem(long(0))->GetEditor()->GetFindItem(">ONE"));
	var_Items->AddItem(spG2antt1->GetColumns()->GetItem(long(0))->GetEditor()->GetFindItem(">ThRee"));
	var_Items->AddItem(spG2antt1->GetColumns()->GetItem(long(0))->GetEditor()->GetFindItem("ONE"));
	var_Items->AddItem(spG2antt1->GetColumns()->GetItem(long(0))->GetEditor()->GetFindItem(">tWo"));
spG2antt1->EndUpdate();

1906:
The text after the BR-tag is in same line as the text before the BR-tag (entire column)

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exHLines);
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Default")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueFormat,long(1));
	var_Column->PutDef(EXG2ANTTLib::exCellSingleLine,VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("This is the first line.<br>This is the second line.");
	var_Items->AddItem("This is the first line.<br>This is the second line.");
	var_Items->AddItem("This is the first line.<br>This is the second line.");
spG2antt1->EndUpdate();

1905:
The text after the BR-tag is in same line as the text before the BR-tag (individual)

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exHLines);
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spG2antt1->GetColumns()->Add(L"Default");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellValueFormat(var_Items->AddItem("This is the first line.<br>This is the second line."),long(0),EXG2ANTTLib::exHTML);
	long h = var_Items->AddItem("<b>This is the first line.<br>This is the second line.</b>");
	var_Items->PutCellValueFormat(h,long(0),EXG2ANTTLib::exHTML);
	var_Items->PutCellSingleLine(h,long(0),VARIANT_FALSE);
	var_Items->PutCellValueFormat(var_Items->AddItem("This is the first line.<br>This is the second line."),long(0),EXG2ANTTLib::exHTML);
spG2antt1->EndUpdate();

1904:
How do I prevent showing the control's BackColorAlternate property on empty / non-items part of the control

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines);
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
spG2antt1->PutBackColorAlternate(0x7ff0f0f0);
spG2antt1->PutBackColorLevelHeader(spG2antt1->GetBackColor());
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Item 1"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Item 3"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Item 4"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Item 5"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1903:
Can I disable an item once the user selects a new value into a different item

// Change event - Occurs when the user changes the cell's content.
void OnChangeG2antt1(long   Item,long   ColIndex,VARIANT FAR*   NewValue)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->PutEnableItem(var_Items->GetItemByIndex(1),VARIANT_FALSE);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->FreezeEvents(VARIANT_TRUE);
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spG2antt1->PutScrollBySingleLine(VARIANT_TRUE);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exRowLines);
spG2antt1->GetColumns()->Add(L"Q");
spG2antt1->GetColumns()->Add(L"A");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("What's your gender?");
	EXG2ANTTLib::IEditorPtr var_Editor = var_Items->GetCellEditor(h1,long(1));
		var_Editor->PutEditType(EXG2ANTTLib::DropDownListType);
		var_Editor->AddItem(1,L"Male",vtMissing);
		var_Editor->AddItem(0,L"Female",vtMissing);
	var_Items->PutCellValue(h1,long(1),long(1));
	long h2 = var_Items->AddItem("What's pet name?");
	var_Items->PutCellValue(h2,long(1),"This is my pet favorite long long long name, that shoul break the line in multiple pieces");
	var_Items->PutCellSingleLine(h2,long(1),VARIANT_FALSE);
spG2antt1->EndUpdate();
spG2antt1->FreezeEvents(VARIANT_FALSE);

1902:
How can I get a row expanded / enlarged to fit the cell's text (entire column)

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spG2antt1->PutScrollBySingleLine(VARIANT_TRUE);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exRowLines);
spG2antt1->GetColumns()->Add(L"Q");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"A")));
	var_Column->PutDef(EXG2ANTTLib::exCellSingleLine,VARIANT_FALSE);
	EXG2ANTTLib::IEditorPtr var_Editor = var_Column->GetEditor();
		var_Editor->PutEditType(EXG2ANTTLib::MemoType);
		var_Editor->PutAppearance(EXG2ANTTLib::SingleApp);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("What's name?");
	var_Items->PutCellValue(h1,long(1),"This is my pet favorite long long long name, that shoul break the line in multiple pieces");
	long h2 = var_Items->AddItem("What's your pet name?");
	var_Items->PutCellValue(h2,long(1),"This is my pet favorite long long long name, that shoul break the line in multiple pieces");
spG2antt1->EndUpdate();

1901:
How can I get a row expanded / enlarged to fit the cell's text (individual cell)

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

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spG2antt1->PutScrollBySingleLine(VARIANT_TRUE);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exRowLines);
spG2antt1->GetColumns()->Add(L"Q");
spG2antt1->GetColumns()->Add(L"A");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("What's name?");
	var_Items->PutCellValue(h1,long(1),"This is my pet favorite long long long name, that shoul break the line in multiple pieces");
	long h2 = var_Items->AddItem("What's your pet name?");
	EXG2ANTTLib::IEditorPtr var_Editor = var_Items->GetCellEditor(h2,long(1));
		var_Editor->PutEditType(EXG2ANTTLib::MemoType);
		var_Editor->PutAppearance(EXG2ANTTLib::SingleApp);
	var_Items->PutCellValue(h2,long(1),"This is my pet favorite long long long name, that shoul break the line in multiple pieces");
	var_Items->PutCellSingleLine(h2,long(1),VARIANT_FALSE);
spG2antt1->EndUpdate();