1809:
How can I display the limits/margins of the project, in the overview 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->GetVisualAppearance()->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABVADg6AADACAxSDEMQBQKAAzQFAYbhgHCGAAGUYBRgmFgAQhFcZQSBcEgTDaMYzgMBYJhEMQyDSAUIjPEyMg0DjIIwgJIUaw0GSXIRkGQZC") +
"hGJooTJQMrTZIEbQxHSkIyRVTmZACS5NRZPYy0FAkQhlFSbJBCOKwVomR5KUxTVg1DJwahLCKULLhGI7KgObIRSJOcZ1XAdCQ0cB0XpAC6LaqSA4nSjKcqwJKEZRJIyj" +
"JwgSrrWhePoJYBVAAQPQdDYaCivK5uWK6PqKUIlZBQGQVNS1MRrLSEcwgPKgAyzDadZzfQAWTZFTQjN61RgtXR6eyoAJ0aziFDVFo0WRlEwacorGhcbgPPrCRrxGBVNw" +
"gGOJo4kIeASB0Zw/iGDoym6dobh2XpiDWJo5HMd56h6dxjlICIEhQDQmDOIZUmQZZlAADpYHIEQ3nUGgNhCEIhAkawamAAAYEWRAGB2bA2EqYg2AyA4glgPgSgQYRIEI" +
"FoEmEeBWBiBphFAAgPDwDgDEycQ4A0Q5IwkDwjgyWA8k4SIsmUNoPEOFJbD0DhjHINA3E8Q4eDiDojhiYJmg+Ixokic4LmKQxiCkNk2CCX4DmGaA0nAN4NBiDJSDwTgT" +
"Eycg4E0WIYlcPJiiiMJZhCTYpgCcw5g2OYOGWGQmCkEJkheYopGoVw1GSGQuA2ExIlOQJcDOZJzEDSJNBiAgiU4Q5GCeChNHkHJygsaBzGaCYimiCY0mMNZoCMWhUDUJ" +
"5pkYTIDk6YxwkwO5NlMOoch6JQJm4U4JCIMxWFSKbCBoKIgmJDAuDgKhohKIoTk0GhaHOJgNiMKJuDaaYzHCTYnAyaZmjSKIiDiCghjEYg6AaR4yk0OpOiFSQLAKNgjG" +
"cQ40lkMhOmqZo7DKTpzG6Pw3CmYx2HiNAsCqBh8h6Z5bh6T4oC0G4Im+OAtlMNpTjUTYDCKVo2C3QBLi6a5bH6YY4EyehzAGO4wEwDoejwK5rnK95vDgPJsDWTBjjSWA" +
"xnEK5aleNhriuawKi8Lp7H8HpHHGXBskyQpxguXwNgMTpDFiRZDnEExfBSPRvHuXwYkycYslae5NjMQwrDGNZxFyHINDsDRTBMKZKnKLIwm2S4xF0Jw8lKTIcm9eA0hy" +
"QwuksM5jiyVQwnQDQIlaVo0EyLwQlGcRNCME5EjKfYXGSWEhDMQ5QnOahHG6KwoFOCoFiOaBNlcdIjiQag7HOL0dwuxKC1aeNQI4BQihNDoEwXowxmh8CIL8Yg8ROBfA" +
"SMcaIOR6CHBkMgLgrwUjLHkHMG4NQaBzE4MQaIyw5gxEsH0Dw9FBBNA6PUDoLwpjTHqF0N4WQShSHgGwcY2RkhdFCL8bYdwOivDqNse4fRnh5G+PYEgaR1B0E4B4D4ix" +
"xB4G8E8SI5R8D+DeJUc4eRPB/EaJ8DwpwojDHUPofwtxYjtH2F4d4sx3j7E+AcXo8B9geFCNYOIHhfg/GmPQPoXw3jZHuPoX4hxuj1H8J8T43RPhDEgM8eo/B/iQGuPw" +
"fxEh1guAIAwQAgCAg");
spG2antt1->PutBackColorLevelHeader(spG2antt1->GetBackColor());
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutOverviewVisible(EXG2ANTTLib::OverviewVisibleEnum(0x400 | EXG2ANTTLib::exOverviewShowSelMargins | EXG2ANTTLib::exOverviewShowMargins | EXG2ANTTLib::exOverviewShowDateTimeScaleBottom | EXG2ANTTLib::exOverviewShowAllVisible));
	var_Chart->PutOverviewHeight(64);
	var_Chart->PutOverviewSelBackColor(0x1000000);
	var_Chart->PutOverviewBackColor(RGB(250,250,250));
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,11,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2001,2,2,0,00,00).operator DATE(),COleDateTime(2001,2,11,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Item 3"),"Task",COleDateTime(2001,3,2,0,00,00).operator DATE(),COleDateTime(2001,3,11,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1808:
Is it possible to display a time-scale for the overview part of the control (separated)

/*
	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->PutBackColorLevelHeader(spG2antt1->GetBackColor());
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutOverviewVisible(EXG2ANTTLib::OverviewVisibleEnum(EXG2ANTTLib::exOverviewShowDateTimeScaleSplit | EXG2ANTTLib::exOverviewShowAllVisible));
	var_Chart->PutOverviewHeight(48);
	var_Chart->PutLevelCount(2);
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,11,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2001,2,2,0,00,00).operator DATE(),COleDateTime(2001,2,11,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Item 3"),"Task",COleDateTime(2001,3,2,0,00,00).operator DATE(),COleDateTime(2001,3,11,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1807:
Is it possible to display a time-scale for the overview 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->PutBackColorLevelHeader(spG2antt1->GetBackColor());
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutOverviewVisible(EXG2ANTTLib::OverviewVisibleEnum(EXG2ANTTLib::exOverviewShowDateTimeScale | EXG2ANTTLib::exOverviewShowAllVisible));
	var_Chart->PutLevelCount(2);
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,11,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2001,2,2,0,00,00).operator DATE(),COleDateTime(2001,2,11,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Item 3"),"Task",COleDateTime(2001,3,2,0,00,00).operator DATE(),COleDateTime(2001,3,11,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1806:
How can I display the time-scale only, in the overview 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->PutBackColorLevelHeader(spG2antt1->GetBackColor());
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutOverviewVisible(EXG2ANTTLib::OverviewVisibleEnum(EXG2ANTTLib::exOverviewShowDateTimeScale | EXG2ANTTLib::exOverviewHideBars | EXG2ANTTLib::exOverviewShowAllVisible));
	var_Chart->PutLevelCount(2);
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,11,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2001,2,2,0,00,00).operator DATE(),COleDateTime(2001,2,11,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Item 3"),"Task",COleDateTime(2001,3,2,0,00,00).operator DATE(),COleDateTime(2001,3,11,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1805:
How can I detect that the mouse pointer is within an InsideZoom object
// MouseMove event - Occurs when the user moves the mouse.
void OnMouseMoveG2antt1(short   Button,short   Shift,long   X,long   Y)
{
	/*
		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::IChartPtr var_Chart = spG2antt1->GetChart();
		Date d = var_Chart->GetDateFromPoint(-1,-1);
		ObjectPtr iz = ((ObjectPtr)(var_Chart->GetInsideZooms()->GetContains(d)));
		OutputDebugStringW( L"d" );
		OutputDebugStringW( L"If the iz object is nothing, the date is not zoomed, else it is." );
		OutputDebugStringW( L"iz" );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday);
	var_Chart->PutAllowInsideZoom(VARIANT_TRUE);
	var_Chart->GetInsideZooms()->Add(COleDateTime(2001,1,10,0,00,00).operator DATE());
spG2antt1->EndUpdate();

1804:
Is it possible to word-wrap text/caption on the bar, so it gets displayed on multiple lines

/*
	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->PutScrollBySingleLine(VARIANT_TRUE);
spG2antt1->PutItemsAllowSizing(EXG2ANTTLib::exResizeItem);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exHLines);
spG2antt1->PutHeaderHeight(28);
spG2antt1->PutDefaultItemHeight(24);
spG2antt1->PutBackColorLevelHeader(spG2antt1->GetBackColor());
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Bump);
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exHLines);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->Copy(L"Task",L"TaskB");
		var_Bar->PutHeight(15);
		var_Bar->PutPattern(EXG2ANTTLib::exPatternBox);
		var_Bar->PutStartColor(RGB(204,232,255));
		var_Bar->PutEndColor(var_Bar->GetStartColor());
		var_Bar->PutColor(RGB(0,0,255));
	EXG2ANTTLib::IBarPtr var_Bar1 = var_Chart->GetBars()->GetItem("Task");
		var_Bar1->PutHeight(-1);
		var_Bar1->PutPattern(EXG2ANTTLib::exPatternBox);
		var_Bar1->PutStartColor(RGB(204,232,255));
		var_Bar1->PutEndColor(var_Bar1->GetStartColor());
		var_Bar1->PutColor(RGB(0,0,255));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Word-Wrap Inside");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,9,0,00,00).operator DATE(),COleDateTime(2001,1,13,0,00,00).operator DATE(),"A1",vtMissing);
	var_Items->PutItemBar(h,"A1",EXG2ANTTLib::exBarBackgroundExt,"none[(2,2,100%-4,100%-4),text=`This is a bit of text that should break the line`,wordwrap]");
	h = var_Items->AddItem("Word-Wrap Inside");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,19,0,00,00).operator DATE(),"A2",vtMissing);
	var_Items->PutItemBar(h,"A2",EXG2ANTTLib::exBarBackgroundExt,"none[(2,2,100%-4,100%-4),align=0x11,text=`This is a bit of text that should break the line`,wordwrap]");
	h = var_Items->AddItem("Word-Wrap Back");
	var_Items->AddBar(h,"TaskB",COleDateTime(2001,1,9,0,00,00).operator DATE(),COleDateTime(2001,1,13,0,00,00).operator DATE(),"A3",vtMissing);
	var_Items->PutItemBar(h,"A3",EXG2ANTTLib::exBarBackgroundExt,"client[align=0x11,text=`This is a bit of text that should break the line`,wordwrap]");
	var_Items->PutItemBar(h,"A3",EXG2ANTTLib::exBarBackgroundExtFlags,long(2));
spG2antt1->EndUpdate();

1803:
Can I set the search box / filterbarprompt to invisible, so I can use my own input and *string* via VBA
/*
	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->PutContinueColumnScroll(VARIANT_FALSE);
spG2antt1->PutMarkSearchColumn(VARIANT_FALSE);
spG2antt1->PutSearchColumnIndex(1);
spG2antt1->PutFilterBarHeight(0);
spG2antt1->PutFilterBarPromptVisible(VARIANT_TRUE);
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96);
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96);
	var_Columns->Add(L"City");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h0 = var_Items->AddItem("Nancy Davolio");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Andrew Fuller");
	var_Items->PutCellValue(h0,long(1),"Vice President, Sales");
	var_Items->PutCellValue(h0,long(2),"Tacoma");
	var_Items->PutSelectItem(h0,VARIANT_TRUE);
	h0 = var_Items->AddItem("Janet Leverling");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Kirkland");
	h0 = var_Items->AddItem("Margaret Peacock");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"Redmond");
	h0 = var_Items->AddItem("Steven Buchanan");
	var_Items->PutCellValue(h0,long(1),"Sales Manager");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Michael Suyama");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Robert King");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
	h0 = var_Items->AddItem("Laura Callahan");
	var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator");
	var_Items->PutCellValue(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Anne Dodsworth");
	var_Items->PutCellValue(h0,long(1),"Sales Representative");
	var_Items->PutCellValue(h0,long(2),"London");
spG2antt1->PutFilterBarPromptPattern(L"London");
spG2antt1->EndUpdate();

1802:
How to load a hierarchy using the control's DataSource property (Parent-ID-Relation)

// 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->SetParent(Item,var_Items->GetFindItem(var_Items->GetCellValue(Item,"ReportsTo"),"EmployeeID",vtMissing));
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
spG2antt1->PutContinueColumnScroll(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

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

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("SELECT * FROM Employees ORDER BY ReportsTo","Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Program Files\\Exontrol\\ExTree\\Sample\\VB\\SAMPLE.MDB",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->GetItems()->PutExpandItem(0,VARIANT_TRUE);
spG2antt1->EndUpdate();

1801:
How can I highlight the limits/margins of a summary bar, according with the child 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();
EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance();
	var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABRkIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjhwkAIIQK/cZRPC0Ow8GSEZAgOKIch6FgCQjEIxDKIsVRZEiDYRmGLpIiOJoWSQBUIyJKoA") +
"Q0f6fIziaTpNiGL4yTBPMzyJRcEx1GyBZ5negaAo2AwIQiUBomGahajkMqZQAJaCSCI2Y4eDZCIoTXR1WAxDq3ZruKpLUpOc4DOrEMIwCEBA=");
	var_Appearance->Add(2,"CP:1 -4 0 5 0");
	var_Appearance->Add(3,_bstr_t("gBFLBCJwBAEHhEJAAEhABOMGACAADACAxSDEMQBQKAAzQFAYbhgHCGAAGUYBRgmFgAQhFcZQSKUOQTDKMIziYBYJhEMQyDAAUIjOKsIhkGYcZAGQBJCjWGodQRHc5TN") +
"CMTRRECDY4kAYpAiKRYbSpAcyQHQ8bQtHwYKAoOg6JjWIAHRqCMI0XINHQ3FwaRJsCwoJhOZIDWZENDQTSsLSxJSkIRfe4wArNf4XVBVMqSdKEZRJLybJwADApAo2eIl" +
"QjJdQ4TSdBSdQwDLYhECpbwCT6JT7jGLQJZsNyvBLIYDrKA8UozFqHQRYNhxDZNShhM6rMigPQQAq8AKlRbVNzXLamLwHRS9BpoORhUjHD4bVxVOyaPpAAaBFbhI44QZ" +
"OHYNYfjgaI0BySp8HMVZdlgaxtBqexWkqOw1lGbZzlwfQ0AwYR/gka5FiMGpgkQYYviGV4kBUWpmlsaYGHMEgACECQUAaEYMHQHRHCGFRBECRJkGQQgTGCVBoDYQhCgQ" +
"JZoG4EIAGEFwGB+dwxHaB5iAabReggYhGnUToJGIRgCCiCBdjiNguGmYo4gIKoMGIKIeDSCYTGiXg4EITo3hAiJAICA==");
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());
	var_Chart->GetBars()->GetItem("Summary")->PutColor(0x3000000);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long hSummary = var_Items->AddItem("Summary");
	var_Items->AddBar(hSummary,"Summary",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,2,0,00,00).operator DATE(),"",vtMissing);
	long hTask = var_Items->InsertItem(hSummary,vtMissing,"Task A");
	var_Items->AddBar(hTask,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K1",vtMissing);
	hTask = var_Items->InsertItem(hSummary,vtMissing,"Task B");
	var_Items->AddBar(hTask,"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K2",vtMissing);
	hTask = var_Items->InsertItem(hSummary,vtMissing,"Task C");
	var_Items->AddBar(hTask,"Task",COleDateTime(2001,1,6,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"K3",vtMissing);
	var_Items->PutExpandItem(hSummary,VARIANT_TRUE);
	var_Items->DefineSummaryBars(hSummary,"",-1,"<*>");
	var_Items->PutItemBar(hSummary,"",EXG2ANTTLib::exSummaryBarBackColor,long(33554432));
spG2antt1->EndUpdate();

1800:
How can I highlight somehow the child bars of a summary bar

/*
	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");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->GetBars()->GetItem("Task")->PutColor(RGB(240,240,240));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long hSummary = var_Items->AddItem("Summary");
	var_Items->AddBar(hSummary,"Project Summary",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,2,0,00,00).operator DATE(),"",vtMissing);
	long hTask = var_Items->InsertItem(hSummary,vtMissing,"Task A");
	var_Items->AddBar(hTask,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K1",vtMissing);
	hTask = var_Items->InsertItem(hSummary,vtMissing,"Task B");
	var_Items->AddBar(hTask,"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K2",vtMissing);
	hTask = var_Items->InsertItem(hSummary,vtMissing,"Task C");
	var_Items->AddBar(hTask,"Task",COleDateTime(2001,1,6,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"K3",vtMissing);
	var_Items->PutExpandItem(hSummary,VARIANT_TRUE);
	var_Items->DefineSummaryBars(hSummary,"",-1,"<*>");
	var_Items->PutItemBar(hSummary,"",EXG2ANTTLib::exSummaryBarBackColor,long(65536));
	var_Items->PutItemBar(hSummary,"",EXG2ANTTLib::exSummaryBarBackColorTransparent,long(50));
spG2antt1->EndUpdate();

1799:
How do I change the color for the selected bars, without showing the frame arround

/*
	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->PutFirstVisibleDate(COleDateTime(2002,1,1,0,00,00).operator DATE());
	var_Chart->PutSelBarColor(0x7f0000ff);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
spG2antt1->GetColumns()->Add(L"Task");
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,4,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2002,1,6,0,00,00).operator DATE(),COleDateTime(2002,1,10,0,00,00).operator DATE(),"B",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2002,1,11,0,00,00).operator DATE(),COleDateTime(2002,1,14,0,00,00).operator DATE(),"C",vtMissing);
	var_Items->PutItemBar(0,"<A B>",EXG2ANTTLib::exBarSelected,VARIANT_TRUE);
spG2antt1->EndUpdate();

1798:
Is it possible to enumerate the activities/bars of critical path

// BarResize event - Occurs when a bar is moved or resized.
void OnBarResizeG2antt1(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();
	spG2antt1->GetItems()->SchedulePDM(Item,Key);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->GetBars()->GetItem("Task")->PutDef(EXG2ANTTLib::exBarCaption,"<%=int(%269) > 0 ? (`<b>` + %269 + `</b>`) : ``%>");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long hSummary1 = var_Items->AddItem("Summary");
	var_Items->PutItemBold(hSummary1,VARIANT_TRUE);
	var_Items->AddBar(hSummary1,"Summary",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,2,0,00,00).operator DATE(),"sum",vtMissing);
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->DefineSummaryBars(hSummary1,"sum",h1,"");
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->DefineSummaryBars(hSummary1,"sum",h2,"");
	var_Items->AddLink("L1",h1,"",h2,"");
	long h3 = var_Items->AddItem("Task 3");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->DefineSummaryBars(hSummary1,"sum",h3,"");
	var_Items->AddLink("L2",h2,"",h3,"");
	long h4 = var_Items->AddItem("Task 4");
	var_Items->AddBar(h4,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->DefineSummaryBars(hSummary1,"sum",h4,"");
	var_Items->AddLink("L3",h1,"",h4,"");
	var_Items->PutDefSchedulePDM(EXG2ANTTLib::exPDMCriticalPathBarColor,long(65280));
	var_Items->SchedulePDM(h1,"");
spG2antt1->EndUpdate();

1797:
How can I add a SF link

/*
	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");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,25,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutLevelCount(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K2",vtMissing);
	long h3 = var_Items->AddItem("Task 3");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K3",vtMissing);
	long h4 = var_Items->AddItem("Task 4");
	var_Items->AddBar(h4,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K4",vtMissing);
	long h5 = var_Items->AddItem("Task 5");
	var_Items->AddBar(h5,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K5",vtMissing);
	var_Items->AddLink("L1",h1,"K1",h2,"K2");
	var_Items->AddLink("L2",h2,"K2",h3,"K3");
	var_Items->AddLink("L3",h3,"K3",h4,"K4");
	var_Items->AddLink("L4",h4,"K4",h5,"K5");
	var_Items->PutLink("L4",EXG2ANTTLib::exLinkStartPos,long(0));
	var_Items->PutLink("L4",EXG2ANTTLib::exLinkEndPos,long(2));
	var_Items->PutLink("L4",EXG2ANTTLib::exLinkColor,long(65280));
	var_Items->SchedulePDM(0,"K5");
spG2antt1->GetChart()->PutShowLinks(EXG2ANTTLib::exShowExtendedLinks);
spG2antt1->EndUpdate();

1796:
How do I get the Start and End date of a bar

/*
	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");
spG2antt1->PutDebug(VARIANT_TRUE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,24,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2006,9,22,0,00,00).operator DATE(),COleDateTime(2006,9,25,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2006,9,23,0,00,00).operator DATE(),COleDateTime(2006,9,26,0,00,00).operator DATE(),"K3",vtMissing);
	long h = var_Items->GetItemByIndex(1);
	var_Items->PutItemBold(h,VARIANT_TRUE);
	OutputDebugStringW( L"Start of " );
	OutputDebugStringW( _bstr_t(var_Items->GetFirstItemBar(h)) );
	OutputDebugStringW( _bstr_t(var_Items->GetItemBar(h,var_Items->GetFirstItemBar(h),EXG2ANTTLib::exBarStart)) );
	OutputDebugStringW( L"End of  " );
	OutputDebugStringW( _bstr_t(var_Items->GetFirstItemBar(h)) );
	OutputDebugStringW( _bstr_t(var_Items->GetItemBar(h,var_Items->GetFirstItemBar(h),EXG2ANTTLib::exBarEnd)) );
spG2antt1->EndUpdate();

1795:
I haven't found options to change/localize (in German, or my current regional settings) the captions/text/strings ( dates, tooltip ) that shows in the chart area (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();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstWeekDay(var_Chart->GetLocFirstWeekDay());
	var_Chart->PutMonthNames(var_Chart->GetLocMonthNames());
	var_Chart->PutWeekDays(var_Chart->GetLocWeekDays());
	var_Chart->PutAMPM(var_Chart->GetLocAMPM());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutUnitScale(EXG2ANTTLib::exDay);

1794:
Is it possible to change caption of the print and print preview, as it just says "Untitled Document", but I cant find the code that writes this 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->GetColumns()->Add(L"Task");
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->AddLink("L1",h1,"K1",h2,"K2");
spG2antt1->EndUpdate();
/*
	Includes the definition for CreateObject function like follows:

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

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

	#import <ExPrint.dll>
	using namespace EXPRINTLib;
*/
EXPRINTLib::IExPrintPtr var_Print = ::CreateObject(L"Exontrol.Print");
	var_Print->PutCaption(L"This is your new caption for print and print preview");
	var_Print->PutAutoRelease(VARIANT_FALSE);
	var_Print->PutPrintExt(((EXG2ANTTLib::IG2anttPtr)(spG2antt1)));
	var_Print->Preview();

1793:
Is it possible to specify the A4 paper size for the print preview
/*
	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());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->AddLink("L1",h1,"K1",h2,"K2");
spG2antt1->EndUpdate();
/*
	Includes the definition for CreateObject function like follows:

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

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

	#import <ExPrint.dll>
	using namespace EXPRINTLib;
*/
EXPRINTLib::IExPrintPtr var_Print = ::CreateObject(L"Exontrol.Print");
	var_Print->PutSettings(EXPRINTLib::exPaperSize,long(9));
	var_Print->PutAutoRelease(VARIANT_FALSE);
	var_Print->PutPrintExt(((EXG2ANTTLib::IG2anttPtr)(spG2antt1)));
	var_Print->Preview();

1792:
Is it possible to tell the print preview to open up in "landscape mode" by default, not in "portrait mode"
/*
	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());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->AddLink("L1",h1,"K1",h2,"K2");
spG2antt1->EndUpdate();
/*
	Includes the definition for CreateObject function like follows:

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

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

	#import <ExPrint.dll>
	using namespace EXPRINTLib;
*/
EXPRINTLib::IExPrintPtr var_Print = ::CreateObject(L"Exontrol.Print");
	var_Print->PutPageOrientation(EXPRINTLib::exLandscape);
	var_Print->PutAutoRelease(VARIANT_FALSE);
	var_Print->PutPrintExt(((EXG2ANTTLib::IG2anttPtr)(spG2antt1)));
	var_Print->Preview();

1791:
How do I prevent a caption outside the bar from overlapping other 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->PutScrollBySingleLine(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->GetBars()->Copy(L"Task",L"Default-Task");
	var_Chart->GetBars()->GetItem("Task")->PutOverlaidType(EXG2ANTTLib::OverlaidBarsTypeEnum(EXG2ANTTLib::exOverlaidBarsIncludeCaption | EXG2ANTTLib::exOverlaidBarsStackAutoArrange | EXG2ANTTLib::exOverlaidBarsStack));
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(),"A1","task");
	var_Items->PutItemBar(h,"A1",EXG2ANTTLib::exBarHAlignCaption,long(18));
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,6,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"A2","task");
	var_Items->PutItemBar(h,"A2",EXG2ANTTLib::exBarHAlignCaption,long(16));
	h = var_Items->AddItem("Task 2");
	var_Items->AddBar(h,"Default-Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A1","task");
	var_Items->PutItemBar(h,"A1",EXG2ANTTLib::exBarHAlignCaption,long(18));
	var_Items->AddBar(h,"Default-Task",COleDateTime(2001,1,6,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"A2","task");
	var_Items->PutItemBar(h,"A2",EXG2ANTTLib::exBarHAlignCaption,long(16));
spG2antt1->EndUpdate();

1790:
How do I clip/hide/align the bar's extra-caption/text based on the bar's size/width/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"Clip");
spG2antt1->PutScrollBySingleLine(VARIANT_TRUE);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exRowLines);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutAllowResizeChart(EXG2ANTTLib::ResizeChartEnum(EXG2ANTTLib::exAllowResizeChartMiddle | EXG2ANTTLib::exAllowResizeChartHeader));
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exRowLines);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,23,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,216);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutPattern(EXG2ANTTLib::exPatternBox);
		var_Bar->PutColor(RGB(164,164,164));
		var_Bar->PutStartColor(RGB(240,240,240));
		var_Bar->PutEndColor(var_Bar->GetStartColor());
		var_Bar->PutOverlaidType(EXG2ANTTLib::OverlaidBarsTypeEnum(EXG2ANTTLib::exOverlaidBarsIncludeCaption | EXG2ANTTLib::exOverlaidBarsStackAutoArrange | EXG2ANTTLib::exOverlaidBarsStack));
		var_Bar->PutHeight(15);
	var_Chart->PutMinUnitWidth(var_Chart->GetUnitWidth());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("no clip, (0-2)");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarExtraCaption,"no clip, right(<b>2</b>)");
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarExtraCaptionHAlign,long(2));
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarExtraCaption,"no clip, center(<b>1</b>)");
	var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarExtraCaptionHAlign,long(1));
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K3","");
	var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarExtraCaption,"no clip, left(<b>0</b>)");
	var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarExtraCaptionHAlign,long(0));
	h = var_Items->AddItem("clip, inside (3-5)");
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,28,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarExtraCaption,"clip, inside, right(<b>5</b>)");
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarExtraCaptionHAlign,long(5));
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,28,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarExtraCaption,"clip, inside, center(<b>4</b>)");
	var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarExtraCaptionHAlign,long(4));
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,28,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K3",vtMissing);
	var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarExtraCaption,"clip, inside, left(<b>3</b>)");
	var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarExtraCaptionHAlign,long(3));
	h = var_Items->AddItem("hide on min width, clip if not fit, inside (6-8)");
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,26,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarExtraCaption,"hide on min width, clip if not fit, inside, right(<b>8</b>)");
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarExtraCaptionHAlign,long(8));
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,26,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarExtraCaption,"hide on min width, clip if not fit, inside, center(<b>7</b>)");
	var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarExtraCaptionHAlign,long(7));
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,26,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"K3",vtMissing);
	var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarExtraCaption,"hide on min width, clip if not fit, inside, left(<b>6</b>)");
	var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarExtraCaptionHAlign,long(6));
	h = var_Items->AddItem("hide if not fit, no clip, inside (9-11)");
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,28,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarExtraCaption,"hide if not fit, no clip, inside, right(<b>11</b>)");
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarExtraCaptionHAlign,long(11));
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,28,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarExtraCaption,"hide if not fit, no clip, center(<b>10</b>)");
	var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarExtraCaptionHAlign,long(10));
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,28,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K3",vtMissing);
	var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarExtraCaption,"hide if not fit, no clip, inside, left(<b>9</b>)");
	var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarExtraCaptionHAlign,long(9));
	h = var_Items->AddItem("no clip, inside, outside (12-14)");
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,28,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarExtraCaption,"no clip, inside, outside, right(<b>14</b>)");
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarExtraCaptionHAlign,long(14));
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,28,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarExtraCaption,"no clip, inside, outside, center(<b>13</b>)");
	var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarExtraCaptionHAlign,long(13));
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,28,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K3",vtMissing);
	var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarExtraCaption,"no clip, inside, outside, left(<b>12</b>)");
	var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarExtraCaptionHAlign,long(12));
	h = var_Items->AddItem("no clip, outside (16-18)");
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,30,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarExtraCaption,"no clip, outside, right(<b>18</b>)");
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarExtraCaptionHAlign,long(18));
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,30,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarExtraCaption,"no clip, outside, center(<b>17</b>)");
	var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarExtraCaptionHAlign,long(17));
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,30,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K3",vtMissing);
	var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarExtraCaption,"no clip, outside, left(<b>16</b>)");
	var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarExtraCaptionHAlign,long(16));
spG2antt1->EndUpdate();

1789:
What options do I have to show the links between bars (rectangular SEV, starts vertically, ends vertically)

/*
	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->PutAntiAliasing(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutNonworkingDays(0);
	var_Chart->PutLinksWidth(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("");
	long h3 = var_Items->AddItem("Task 3");
	var_Items->AddItem("");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,13,0,00,00).operator DATE(),COleDateTime(2001,1,15,0,00,00).operator DATE(),"K3",vtMissing);
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddItem("");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,7,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->AddItem("");
	var_Items->AddLink("L1",h1,"K1",h2,"K2");
	var_Items->AddLink("L2",h2,"K2",h3,"K3");
	var_Items->PutLink("<*>",EXG2ANTTLib::exLinkShowRound,long(5));
spG2antt1->EndUpdate();

1788:
What options do I have to show the links between bars (rectangular SV, starts vertically, ends horizontally)

/*
	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->PutAntiAliasing(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutNonworkingDays(0);
	var_Chart->PutLinksWidth(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("");
	long h3 = var_Items->AddItem("Task 3");
	var_Items->AddItem("");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,13,0,00,00).operator DATE(),COleDateTime(2001,1,15,0,00,00).operator DATE(),"K3",vtMissing);
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddItem("");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,7,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->AddItem("");
	var_Items->AddLink("L1",h1,"K1",h2,"K2");
	var_Items->AddLink("L2",h2,"K2",h3,"K3");
	var_Items->PutLink("<*>",EXG2ANTTLib::exLinkShowRound,long(4));
spG2antt1->EndUpdate();

1787:
What options do I have to show the links between bars (rectangular EV, starts horizontally, ends vertically)

/*
	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->PutAntiAliasing(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutNonworkingDays(0);
	var_Chart->PutLinksWidth(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("");
	long h3 = var_Items->AddItem("Task 3");
	var_Items->AddItem("");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,13,0,00,00).operator DATE(),COleDateTime(2001,1,15,0,00,00).operator DATE(),"K3",vtMissing);
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddItem("");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,7,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->AddItem("");
	var_Items->AddLink("L1",h1,"K1",h2,"K2");
	var_Items->AddLink("L2",h2,"K2",h3,"K3");
	var_Items->PutLink("<*>",EXG2ANTTLib::exLinkShowRound,long(3));
spG2antt1->EndUpdate();

1786:
What options do I have to show the links between bars (straight)

/*
	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->PutAntiAliasing(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutNonworkingDays(0);
	var_Chart->PutLinksWidth(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("");
	long h3 = var_Items->AddItem("Task 3");
	var_Items->AddItem("");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,13,0,00,00).operator DATE(),COleDateTime(2001,1,15,0,00,00).operator DATE(),"K3",vtMissing);
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddItem("");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,7,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->AddItem("");
	var_Items->AddLink("L1",h1,"K1",h2,"K2");
	var_Items->AddLink("L2",h2,"K2",h3,"K3");
	var_Items->PutLink("<*>",EXG2ANTTLib::exLinkShowRound,long(2));
spG2antt1->EndUpdate();

1785:
What options do I have to show the links between bars (direct)

/*
	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->PutAntiAliasing(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutNonworkingDays(0);
	var_Chart->PutLinksWidth(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("");
	long h3 = var_Items->AddItem("Task 3");
	var_Items->AddItem("");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,13,0,00,00).operator DATE(),COleDateTime(2001,1,15,0,00,00).operator DATE(),"K3",vtMissing);
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddItem("");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,7,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->AddItem("");
	var_Items->AddLink("L1",h1,"K1",h2,"K2");
	var_Items->AddLink("L2",h2,"K2",h3,"K3");
	var_Items->PutLink("<*>",EXG2ANTTLib::exLinkShowRound,long(1));
spG2antt1->EndUpdate();

1784:
What options do I have to show the links between bars (round)

/*
	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->PutAntiAliasing(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutNonworkingDays(0);
	var_Chart->PutLinksWidth(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("");
	long h3 = var_Items->AddItem("Task 3");
	var_Items->AddItem("");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,13,0,00,00).operator DATE(),COleDateTime(2001,1,15,0,00,00).operator DATE(),"K3",vtMissing);
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddItem("");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,7,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->AddItem("");
	var_Items->AddLink("L1",h1,"K1",h2,"K2");
	var_Items->AddLink("L2",h2,"K2",h3,"K3");
	var_Items->PutLink("<*>",EXG2ANTTLib::exLinkShowRound,long(-1));
spG2antt1->EndUpdate();

1783:
What options do I have to show the links between bars (rectangular, default)

/*
	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->PutAntiAliasing(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutNonworkingDays(0);
	var_Chart->PutLinksWidth(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("");
	long h3 = var_Items->AddItem("Task 3");
	var_Items->AddItem("");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,13,0,00,00).operator DATE(),COleDateTime(2001,1,15,0,00,00).operator DATE(),"K3",vtMissing);
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddItem("");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,7,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->AddItem("");
	var_Items->AddLink("L1",h1,"K1",h2,"K2");
	var_Items->AddLink("L2",h2,"K2",h3,"K3");
	var_Items->PutLink("<*>",EXG2ANTTLib::exLinkShowRound,long(0));
spG2antt1->EndUpdate();

1782:
I have a question about whether the control has the functionality to add two bars on the same item, as one would correspond to the item bar and another bar their progress, but progress is required to show dividedly at different times outside the activity bar 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->GetColumns()->Add(L"Tasks");
spG2antt1->PutBackColorLevelHeader(spG2antt1->GetBackColor());
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->Copy(L"Progress",L"TProgressD");
		var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
		var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
	EXG2ANTTLib::IBarPtr var_Bar1 = var_Chart->GetBars()->Copy(L"Progress",L"TProgressC");
		var_Bar1->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
	EXG2ANTTLib::IBarPtr var_Bar2 = var_Chart->GetBars()->Copy(L"Progress",L"TProgressU");
		var_Bar2->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
		var_Bar2->PutShape(EXG2ANTTLib::exShapeThinUp);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task");
	var_Items->AddBar(h,"Task",COleDateTime(2006,9,25,0,00,00).operator DATE(),COleDateTime(2006,9,30,0,00,00).operator DATE(),"T1",vtMissing);
	var_Items->AddBar(h,"TProgressU",COleDateTime(2006,9,25,0,00,00).operator DATE(),COleDateTime(2006,10,4,0,00,00).operator DATE(),"TP1",vtMissing);
	var_Items->GroupBars(h,"T1",VARIANT_TRUE,h,"TP1",VARIANT_TRUE,long(3),vtMissing);
	var_Items->PutItemBar(h,"TP1",EXG2ANTTLib::exBarCaption,"<font ;6>progress up");
	h = var_Items->AddItem("Task");
	var_Items->AddBar(h,"Task",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,10,1,0,00,00).operator DATE(),"T2",vtMissing);
	var_Items->AddBar(h,"TProgressC",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,10,5,0,00,00).operator DATE(),"TP2",vtMissing);
	var_Items->GroupBars(h,"T2",VARIANT_TRUE,h,"TP2",VARIANT_TRUE,long(3),vtMissing);
	var_Items->PutItemBar(h,"TP2",EXG2ANTTLib::exBarCaption,"<font ;6>progress center");
	h = var_Items->AddItem("Task");
	var_Items->AddBar(h,"Task",COleDateTime(2006,9,25,0,00,00).operator DATE(),COleDateTime(2006,9,30,0,00,00).operator DATE(),"T3",vtMissing);
	var_Items->AddBar(h,"TProgressD",COleDateTime(2006,9,25,0,00,00).operator DATE(),COleDateTime(2006,10,6,0,00,00).operator DATE(),"TP3",vtMissing);
	var_Items->GroupBars(h,"T3",VARIANT_TRUE,h,"TP3",VARIANT_TRUE,long(3),vtMissing);
	var_Items->PutItemBar(h,"TP3",EXG2ANTTLib::exBarCaption,"<font ;6>progress down");
spG2antt1->EndUpdate();

1781:
I have a column of date-type, the question is how can I move the associated bar, instead of resizing it (summary, inclusive, working)

/*
	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->PutMarkSearchColumn(VARIANT_FALSE);
spG2antt1->PutIndent(11);
spG2antt1->PutHasLines(EXG2ANTTLib::exSolidLine);
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Tasks");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start")));
		var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(544));
		var_Column->GetEditor()->PutEditType(EXG2ANTTLib::DateType);
		var_Column->PutLevelKey(long(1));
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"End")));
		var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(546));
		var_Column1->GetEditor()->PutEditType(EXG2ANTTLib::DateType);
		var_Column1->PutLevelKey(long(1));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE());
	var_Chart->PutAllowLinkBars(VARIANT_FALSE);
	var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar);
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,224);
	EXG2ANTTLib::IBarsPtr var_Bars = var_Chart->GetBars();
		EXG2ANTTLib::IBarPtr var_Bar = var_Bars->Add(L"Underline");
			var_Bar->PutColor(RGB(0,0,255));
			var_Bar->PutShape(EXG2ANTTLib::exShapeThinDown);
		EXG2ANTTLib::IBarPtr var_Bar1 = var_Bars->Add(L"Task:Underline");
			var_Bar1->PutShortcut(L"T");
			var_Bar1->PutDef(EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	var_Items->AddBar(h,"Summary",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,10,3,0,00,00).operator DATE(),vtMissing,vtMissing);
	long h1 = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(h1,"T",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,24,0,00,00).operator DATE(),vtMissing,vtMissing);
	long h2 = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(h2,"T",COleDateTime(2006,9,24,0,00,00).operator DATE(),COleDateTime(2006,9,28,0,00,00).operator DATE(),vtMissing,vtMissing);
	long h3 = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(h3,"T",COleDateTime(2006,9,28,0,00,00).operator DATE(),COleDateTime(2006,10,3,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->DefineSummaryBars(h,"",h1,"");
	var_Items->DefineSummaryBars(h,"",h2,"");
	var_Items->DefineSummaryBars(h,"",h3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutItemBold(h,VARIANT_TRUE);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarMoveStart,COleDateTime(2006,9,22,0,00,00).operator DATE());
spG2antt1->EndUpdate();

1780:
I have a column of date-type, the question is how can I move the associated bar, instead of resizing it (summary)

/*
	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->PutMarkSearchColumn(VARIANT_FALSE);
spG2antt1->PutIndent(11);
spG2antt1->PutHasLines(EXG2ANTTLib::exSolidLine);
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Tasks");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start")));
		var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(544));
		var_Column->GetEditor()->PutEditType(EXG2ANTTLib::DateType);
		var_Column->PutLevelKey(long(1));
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"End")));
		var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(545));
		var_Column1->GetEditor()->PutEditType(EXG2ANTTLib::DateType);
		var_Column1->PutLevelKey(long(1));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE());
	var_Chart->PutAllowLinkBars(VARIANT_FALSE);
	var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar);
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,224);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	var_Items->AddBar(h,"Summary",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,10,3,0,00,00).operator DATE(),vtMissing,vtMissing);
	long h1 = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,24,0,00,00).operator DATE(),vtMissing,vtMissing);
	long h2 = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2006,9,24,0,00,00).operator DATE(),COleDateTime(2006,9,28,0,00,00).operator DATE(),vtMissing,vtMissing);
	long h3 = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(h3,"Task",COleDateTime(2006,9,28,0,00,00).operator DATE(),COleDateTime(2006,10,3,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->DefineSummaryBars(h,"",h1,"");
	var_Items->DefineSummaryBars(h,"",h2,"");
	var_Items->DefineSummaryBars(h,"",h3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutItemBold(h,VARIANT_TRUE);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarMoveStart,COleDateTime(2006,9,22,0,00,00).operator DATE());
spG2antt1->EndUpdate();

1779:
Is it possible to programmatically move all bars of specified key to end at specified date (inclusive)

/*
	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->PutDebug(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task A.1"),"Task",COleDateTime(2001,1,1,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task A.2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task B.1"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"B",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task B.2"),"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),"B",vtMissing);
	var_Items->PutItemBar(0,"<A*>",EXG2ANTTLib::exBarMoveEndInclusive,COleDateTime(2001,1,2,0,00,00).operator DATE());
spG2antt1->EndUpdate();

1778:
Is it possible to programmatically move all bars to end at specified date (inclusive)

/*
	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->PutDebug(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task A.1"),"Task",COleDateTime(2001,1,1,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task A.2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task B.1"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"B",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task B.2"),"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),"B",vtMissing);
	var_Items->PutItemBar(0,"<*>",EXG2ANTTLib::exBarMoveEndInclusive,COleDateTime(2001,1,2,0,00,00).operator DATE());
spG2antt1->EndUpdate();

1777:
Is it possible to programmatically move all bars of specified key to end at specified date

/*
	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->PutDebug(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task A.1"),"Task",COleDateTime(2001,1,1,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task A.2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task B.1"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"B",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task B.2"),"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),"B",vtMissing);
	var_Items->PutItemBar(0,"<A*>",EXG2ANTTLib::exBarMoveEnd,COleDateTime(2001,1,2,0,00,00).operator DATE());
spG2antt1->EndUpdate();

1776:
Is it possible to programmatically move all bars to end at specified date

/*
	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->PutDebug(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task A.1"),"Task",COleDateTime(2001,1,1,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task A.2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task B.1"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"B",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task B.2"),"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),"B",vtMissing);
	var_Items->PutItemBar(0,"<*>",EXG2ANTTLib::exBarMoveEnd,COleDateTime(2001,1,2,0,00,00).operator DATE());
spG2antt1->EndUpdate();

1775:
Is it possible to programmatically move all bars of specified key to start at specified date

/*
	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->PutDebug(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task A.1"),"Task",COleDateTime(2001,1,1,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task A.2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task B.1"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"B",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task B.2"),"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),"B",vtMissing);
	var_Items->PutItemBar(0,"<A*>",EXG2ANTTLib::exBarMoveStart,COleDateTime(2001,1,2,0,00,00).operator DATE());
spG2antt1->EndUpdate();

1774:
Is it possible to programmatically move all bars to start at specified date

/*
	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->PutDebug(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task A.1"),"Task",COleDateTime(2001,1,1,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task A.2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task B.1"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"B",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task B.2"),"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),"B",vtMissing);
	var_Items->PutItemBar(0,"<*>",EXG2ANTTLib::exBarMoveStart,COleDateTime(2001,1,2,0,00,00).operator DATE());
spG2antt1->EndUpdate();

1773:
Is it possible to programmatically move all bars of specified 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();
spG2antt1->BeginUpdate();
spG2antt1->PutDebug(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task A.1"),"Task",COleDateTime(2001,1,1,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task A.2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task B.1"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"B",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task B.2"),"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),"B",vtMissing);
	var_Items->PutItemBar(0,"<A*>",EXG2ANTTLib::exBarMove,long(2));
spG2antt1->EndUpdate();

1772:
Is it possible to programmatically move 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->PutDebug(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task A.1"),"Task",COleDateTime(2001,1,1,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task A.2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task B.1"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"B",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task B.2"),"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),"B",vtMissing);
	var_Items->PutItemBar(0,"<*>",EXG2ANTTLib::exBarMove,long(2));
spG2antt1->EndUpdate();

1771:
How can I programmatically move a bar, so it ends at specified date (inclusive)
/*
	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->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,1,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->PutItemBar(h,"A",EXG2ANTTLib::exBarMoveEndInclusive,COleDateTime(2001,1,4,0,00,00).operator DATE());

1770:
How can I programmatically move a bar, so it ends at specified date
/*
	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->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,1,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->PutItemBar(h,"A",EXG2ANTTLib::exBarMoveEnd,COleDateTime(2001,1,4,0,00,00).operator DATE());

1769:
How can I programmatically move a bar, so it starts at specified date
/*
	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->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,1,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->PutItemBar(h,"A",EXG2ANTTLib::exBarMoveStart,COleDateTime(2001,1,4,0,00,00).operator DATE());

1768:
I canít figure out how to control the date and time format (in level 0, 1 and 2) when the user click on the OverviewZoom bottom

/*
	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(22);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2016,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutLevelCount(2);
	var_Chart->PutDrawLevelSeparator(EXG2ANTTLib::exLevelSolidLine);
	var_Chart->PutAllowResizeChart(EXG2ANTTLib::ResizeChartEnum(EXG2ANTTLib::exAllowResizeChartMiddle | EXG2ANTTLib::exAllowResizeChartHeader));
	var_Chart->PutMaxUnitWidth(196);
	EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0);
		var_Level->PutAlignment(EXG2ANTTLib::AlignmentEnum(EXG2ANTTLib::exHOutside | EXG2ANTTLib::CenterAlignment));
		var_Level->PutDrawTickLines(EXG2ANTTLib::exLevelSolidLine);
	EXG2ANTTLib::ILevelPtr var_Level1 = var_Chart->GetLevel(1);
		var_Level1->PutDrawTickLines(EXG2ANTTLib::LevelLineEnum(EXG2ANTTLib::exLevelMiddleLine | EXG2ANTTLib::exLevelDotLine));
		var_Level1->DrawTickLinesFrom(0,EXG2ANTTLib::exLevelSolidLine);
		var_Level1->PutBackColor(RGB(240,240,240));
	var_Chart->PutOverviewVisible(EXG2ANTTLib::exOverviewShowAllVisible);
	var_Chart->PutAllowOverviewZoom(EXG2ANTTLib::exAlwaysZoom);
	var_Chart->PutUnitWidth(24);
	var_Chart->PutLabel(EXG2ANTTLib::exSecond,L"");
	var_Chart->PutLabel(EXG2ANTTLib::exMinute,L"");
	var_Chart->PutLabel(EXG2ANTTLib::exHour,L"");
	var_Chart->PutLabel(EXG2ANTTLib::exWeek,L"");
	var_Chart->PutLabel(EXG2ANTTLib::exDay,_bstr_t("<font ;6><%d%><|><%d%><|><%d%> <fgcolor=A0A0A0><off -4><%d1%><|><%d%> <fgcolor=A0A0A0><off -4><%d2%><|><%d%> <fgcolor=A0A0A0><o") +
"ff -4><%d3%><|><%d%> <fgcolor=A0A0A0><off -4><%dddd%><||><||>4096");
	var_Chart->PutUnitScale(EXG2ANTTLib::exDay);
	var_Chart->ScrollTo(var_Chart->GetFirstVisibleDate(),long(1));
spG2antt1->GetColumns()->Add(L"Default");
spG2antt1->EndUpdate();

1767:
Can I use GroupBars with OverlaidType method

/*
	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");
spG2antt1->PutDebug(VARIANT_TRUE);
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
spG2antt1->PutScrollBySingleLine(VARIANT_TRUE);
spG2antt1->PutBackColorLevelHeader(spG2antt1->GetBackColor());
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->GetBars()->GetItem("Task")->PutOverlaidType(EXG2ANTTLib::exOverlaidBarsStack);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	var_Items->AddBar(h,"Summary",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,10,4,0,00,00).operator DATE(),vtMissing,vtMissing);
	long h1 = var_Items->InsertItem(h,vtMissing,"Tasks");
	var_Items->AddBar(h1,"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,26,0,00,00).operator DATE(),"h1",vtMissing);
	_bstr_t h2 = h1;
	var_Items->AddBar(h2,"Task",COleDateTime(2006,9,25,0,00,00).operator DATE(),COleDateTime(2006,9,30,0,00,00).operator DATE(),"h2",vtMissing);
	var_Items->AddLink("L1",h1,"h1",h2,"h2");
	_bstr_t h3 = h1;
	var_Items->AddBar(h3,"Task",COleDateTime(2006,9,29,0,00,00).operator DATE(),COleDateTime(2006,10,4,0,00,00).operator DATE(),"h3",vtMissing);
	var_Items->AddLink("L2",h2,"h2",h3,"h3");
	var_Items->DefineSummaryBars(h,"",h1,"h1");
	var_Items->DefineSummaryBars(h,"",h2,"h2");
	var_Items->DefineSummaryBars(h,"",h3,"h3");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutItemBold(h,VARIANT_TRUE);
	var_Items->GroupBars(h1,"h1",VARIANT_FALSE,h2,"h2",VARIANT_TRUE,long(31),"0;5;-1");
	var_Items->GroupBars(h2,"h2",VARIANT_FALSE,h3,"h3",VARIANT_TRUE,long(31),"0;5;-1");
spG2antt1->EndUpdate();

1766:
How do I change the link's lag so I can schedule bars to start later (with nonworking part)

// 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();
	spG2antt1->GetItems()->SchedulePDM(Item,Key);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDefaultItemHeight(22);
spG2antt1->PutHeaderHeight(spG2antt1->GetDefaultItemHeight());
spG2antt1->PutBackColorLevelHeader(spG2antt1->GetBackColor());
spG2antt1->PutAntiAliasing(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLinksStyle(EXG2ANTTLib::exLinkSolid);
	var_Chart->PutLinksColor(RGB(128,128,128));
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutDef(EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE);
		var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
		var_Bar->PutColor(RGB(0,0,0));
		var_Bar->PutStartColor(RGB(190,190,190));
		var_Bar->PutEndColor(var_Bar->GetStartColor());
		var_Bar->PutPattern(EXG2ANTTLib::exPatternBox);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K1","FS lag=0 (default)");
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K2","FS lag=4");
	var_Items->AddLink("L1",h1,"K1",h2,"K2");
	long h3 = var_Items->AddItem("Task 3");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K3","FS lag=-1");
	var_Items->AddLink("L2",h2,"K2",h3,"K3");
	var_Items->PutLink("L2",EXG2ANTTLib::exLinkPDMWorkingDelay,long(4));
	long h4 = var_Items->AddItem("Task 4");
	var_Items->AddBar(h4,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K4",vtMissing);
	var_Items->AddLink("L3",h3,"K3",h4,"K4");
	var_Items->PutLink("L3",EXG2ANTTLib::exLinkPDMWorkingDelay,long(-1));
	var_Items->SchedulePDM(0,"K1");
spG2antt1->EndUpdate();

1765:
How do I change the link's lag so I can schedule bars to start later (without nonworking part)

// 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();
	spG2antt1->GetItems()->SchedulePDM(Item,Key);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDefaultItemHeight(22);
spG2antt1->PutHeaderHeight(spG2antt1->GetDefaultItemHeight());
spG2antt1->PutBackColorLevelHeader(spG2antt1->GetBackColor());
spG2antt1->PutAntiAliasing(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLinksStyle(EXG2ANTTLib::exLinkSolid);
	var_Chart->PutLinksColor(RGB(128,128,128));
	var_Chart->PutLevelCount(2);
	var_Chart->PutNonworkingDays(0);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
		var_Bar->PutColor(RGB(0,0,0));
		var_Bar->PutStartColor(RGB(190,190,190));
		var_Bar->PutEndColor(var_Bar->GetStartColor());
		var_Bar->PutPattern(EXG2ANTTLib::exPatternBox);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K1","FS lag=0 (default)");
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K2","FS lag=4");
	var_Items->AddLink("L1",h1,"K1",h2,"K2");
	long h3 = var_Items->AddItem("Task 3");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K3","FS lag=-1");
	var_Items->AddLink("L2",h2,"K2",h3,"K3");
	var_Items->PutLink("L2",EXG2ANTTLib::exLinkPDMDelay,long(4));
	long h4 = var_Items->AddItem("Task 4");
	var_Items->AddBar(h4,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K4",vtMissing);
	var_Items->AddLink("L3",h3,"K3",h4,"K4");
	var_Items->PutLink("L3",EXG2ANTTLib::exLinkPDMDelay,long(-1));
	var_Items->SchedulePDM(0,"K1");
spG2antt1->EndUpdate();

1764:
Is it possible to select the entire row/line, when user clicks the first column, and select individually the rest of cells, while user clicks any other column

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void OnAddGroupItemG2antt1(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->AddBar(Item,"Summary",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
		var_Items->DefineSummaryBars(Item,"",-3,"");
}

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->AddBar(Item,"Task",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
}

// MouseDown event - Occurs when the user presses a mouse button.
void OnMouseDownG2antt1(short   Button,short   Shift,long   X,long   Y)
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	long i = spG2antt1->GetItemFromPoint(-1,-1,c,hit);
	spG2antt1->PutFullRowSelect(spG2antt1->GetColumns()->GetItem(c)->GetData());
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutHeaderHeight(22);
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Flat);
spG2antt1->PutBackColorLock(RGB(240,240,240));
spG2antt1->PutBackColorHeader(spG2antt1->GetBackColorLock());
spG2antt1->PutHasLines(EXG2ANTTLib::exNoLine);
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
spG2antt1->PutSortBarVisible(VARIANT_FALSE);
spG2antt1->PutAllowGroupBy(VARIANT_TRUE);
spG2antt1->PutReadOnly(EXG2ANTTLib::exReadOnly);
spG2antt1->PutShowFocusRect(VARIANT_FALSE);
spG2antt1->PutCountLockedColumns(1);
spG2antt1->PutAutoDrag(EXG2ANTTLib::exAutoDragScroll);
spG2antt1->PutSingleSort(VARIANT_FALSE);
spG2antt1->PutColumnsAllowSizing(VARIANT_TRUE);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines);
spG2antt1->PutGridLineStyle(EXG2ANTTLib::exGridLinesSolid);
spG2antt1->PutGridLineColor(RGB(220,220,220));
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(1994,9,1,0,00,00).operator DATE());
spG2antt1->GetChart()->PutLevelCount(2);
spG2antt1->GetChart()->PutPaneWidth(VARIANT_FALSE,256);
spG2antt1->PutBackColorSortBar(spG2antt1->GetBackColor());
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

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

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access2007\\sample.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->GetColumns()->GetItem(long(0))->PutData(long(-1));
spG2antt1->PutLayout(L"singlesort=\"C5:1\";multiplesort=\" C1:2\"");
spG2antt1->EndUpdate();

1763:
I've also hit a strange problem with the BeforeExpandItem event - the Cancel parameter is declared as const in Delphi when I believe it should be declared as var or out so I can use it to return OleVariant(True) to cancel the operation, or am I missing something, or how can I disable expanding / collapsing the items
// BeforeExpandItem event - Fired before an item is about to be expanded (collapsed).
void OnBeforeExpandItemG2antt1(long   Item,VARIANT FAR*   Cancel)
{
	/*
		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->PutEventParam(1,VARIANT_TRUE);
}

// Event event - Notifies the application once the control fires an event.
void OnEventG2antt1(long   EventID)
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	OutputDebugStringW( _bstr_t(spG2antt1->GetEventParam(-2)) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
spG2antt1->GetColumns()->Add(L"Default");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Root A");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Root B");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

1762:
Is there any way I can get rid / hide of the vertical blue lines ( today, selected date )
/*
	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,128);
	var_Chart->PutLevelCount(2);
	var_Chart->PutMarkSelectDateColor(var_Chart->GetBackColor());
	var_Chart->PutMarkTodayColor(var_Chart->GetBackColor());
spG2antt1->EndUpdate();

1761:
Is it possible to search for a bar through items only ( not including the locked 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->PutDebug(VARIANT_TRUE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2015,12,31,0,00,00).operator DATE());
spG2antt1->PutBackColorAlternate(RGB(250,250,250));
spG2antt1->PutShowLockedItems(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Find")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueFormat,long(1));
	var_Column->PutVisible(VARIANT_FALSE);
	var_Column->PutFormatColumn(L"int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` ");
spG2antt1->GetChart()->PutColumnsFormatLevel(L"1");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutLockedItemCount(EXG2ANTTLib::exTop,3);
	long h = var_Items->GetLockedItem(EXG2ANTTLib::exTop,0);
	var_Items->PutCellValue(h,long(0),"locked-top 1");
	var_Items->AddBar(h,"Task",COleDateTime(2016,1,4,0,00,00).operator DATE(),COleDateTime(2016,1,8,0,00,00).operator DATE(),"T1",vtMissing);
	h = var_Items->GetLockedItem(EXG2ANTTLib::exTop,1);
	var_Items->PutCellValue(h,long(0),"locked-top 2");
	var_Items->AddBar(h,"Task",COleDateTime(2016,1,5,0,00,00).operator DATE(),COleDateTime(2016,1,9,0,00,00).operator DATE(),"T2",vtMissing);
	h = var_Items->GetLockedItem(EXG2ANTTLib::exTop,2);
	var_Items->PutSelectItem(h,VARIANT_FALSE);
	var_Items->PutItemDivider(h,0);
	var_Items->PutItemHeight(h,2);
	var_Items->AddBar(var_Items->AddItem("un-locked item 1"),"Task",COleDateTime(2016,1,4,0,00,00).operator DATE(),COleDateTime(2016,1,8,0,00,00).operator DATE(),"T3",vtMissing);
	var_Items->AddBar(var_Items->AddItem("un-locked item 2"),"Task",COleDateTime(2016,1,5,0,00,00).operator DATE(),COleDateTime(2016,1,9,0,00,00).operator DATE(),"T4",vtMissing);
	var_Items->PutLockedItemCount(EXG2ANTTLib::exMiddle,3);
	h = var_Items->GetLockedItem(EXG2ANTTLib::exMiddle,0);
	var_Items->PutSelectItem(h,VARIANT_FALSE);
	var_Items->PutItemDivider(h,0);
	var_Items->PutItemHeight(h,2);
	h = var_Items->GetLockedItem(EXG2ANTTLib::exMiddle,1);
	var_Items->PutCellValue(h,long(0),"locked-bottom 1");
	var_Items->AddBar(h,"Task",COleDateTime(2016,1,4,0,00,00).operator DATE(),COleDateTime(2016,1,8,0,00,00).operator DATE(),"T5",vtMissing);
	h = var_Items->GetLockedItem(EXG2ANTTLib::exMiddle,2);
	var_Items->PutCellValue(h,long(0),"locked-bottom 2");
	var_Items->AddBar(h,"Task",COleDateTime(2016,1,5,0,00,00).operator DATE(),COleDateTime(2016,1,9,0,00,00).operator DATE(),"T6",vtMissing);
EXG2ANTTLib::IItemsPtr var_Items1 = spG2antt1->GetItems();
	h = var_Items1->GetFindBar("T4",long(0));
	var_Items1->PutItemBar(h,var_Items1->GetFirstItemBar(h),EXG2ANTTLib::exBarColor,long(255));
	var_Items1->PutCellValue(h,long(1),h);
spG2antt1->EndUpdate();

1760:
Is it possible to search for a bar through bottom-locked-items 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();
spG2antt1->PutDebug(VARIANT_TRUE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2015,12,31,0,00,00).operator DATE());
spG2antt1->PutBackColorAlternate(RGB(250,250,250));
spG2antt1->PutShowLockedItems(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Find")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueFormat,long(1));
	var_Column->PutVisible(VARIANT_FALSE);
	var_Column->PutFormatColumn(L"int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` ");
spG2antt1->GetChart()->PutColumnsFormatLevel(L"1");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutLockedItemCount(EXG2ANTTLib::exTop,3);
	long h = var_Items->GetLockedItem(EXG2ANTTLib::exTop,0);
	var_Items->PutCellValue(h,long(0),"locked-top 1");
	var_Items->AddBar(h,"Task",COleDateTime(2016,1,4,0,00,00).operator DATE(),COleDateTime(2016,1,8,0,00,00).operator DATE(),"T1",vtMissing);
	h = var_Items->GetLockedItem(EXG2ANTTLib::exTop,1);
	var_Items->PutCellValue(h,long(0),"locked-top 2");
	var_Items->AddBar(h,"Task",COleDateTime(2016,1,5,0,00,00).operator DATE(),COleDateTime(2016,1,9,0,00,00).operator DATE(),"T2",vtMissing);
	h = var_Items->GetLockedItem(EXG2ANTTLib::exTop,2);
	var_Items->PutSelectItem(h,VARIANT_FALSE);
	var_Items->PutItemDivider(h,0);
	var_Items->PutItemHeight(h,2);
	var_Items->AddBar(var_Items->AddItem("un-locked item 1"),"Task",COleDateTime(2016,1,4,0,00,00).operator DATE(),COleDateTime(2016,1,8,0,00,00).operator DATE(),"T3",vtMissing);
	var_Items->AddBar(var_Items->AddItem("un-locked item 2"),"Task",COleDateTime(2016,1,5,0,00,00).operator DATE(),COleDateTime(2016,1,9,0,00,00).operator DATE(),"T4",vtMissing);
	var_Items->PutLockedItemCount(EXG2ANTTLib::exMiddle,3);
	h = var_Items->GetLockedItem(EXG2ANTTLib::exMiddle,0);
	var_Items->PutSelectItem(h,VARIANT_FALSE);
	var_Items->PutItemDivider(h,0);
	var_Items->PutItemHeight(h,2);
	h = var_Items->GetLockedItem(EXG2ANTTLib::exMiddle,1);
	var_Items->PutCellValue(h,long(0),"locked-bottom 1");
	var_Items->AddBar(h,"Task",COleDateTime(2016,1,4,0,00,00).operator DATE(),COleDateTime(2016,1,8,0,00,00).operator DATE(),"T5",vtMissing);
	h = var_Items->GetLockedItem(EXG2ANTTLib::exMiddle,2);
	var_Items->PutCellValue(h,long(0),"locked-bottom 2");
	var_Items->AddBar(h,"Task",COleDateTime(2016,1,5,0,00,00).operator DATE(),COleDateTime(2016,1,9,0,00,00).operator DATE(),"T6",vtMissing);
EXG2ANTTLib::IItemsPtr var_Items1 = spG2antt1->GetItems();
	h = var_Items1->GetFindBar("T6",long(-4));
	var_Items1->PutItemBar(h,var_Items1->GetFirstItemBar(h),EXG2ANTTLib::exBarColor,long(255));
	var_Items1->PutCellValue(h,long(1),h);
spG2antt1->EndUpdate();

1759:
Is it possible to search for a bar through top-locked-items 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();
spG2antt1->PutDebug(VARIANT_TRUE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2015,12,31,0,00,00).operator DATE());
spG2antt1->PutBackColorAlternate(RGB(250,250,250));
spG2antt1->PutShowLockedItems(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Find")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueFormat,long(1));
	var_Column->PutVisible(VARIANT_FALSE);
	var_Column->PutFormatColumn(L"int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` ");
spG2antt1->GetChart()->PutColumnsFormatLevel(L"1");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutLockedItemCount(EXG2ANTTLib::exTop,3);
	long h = var_Items->GetLockedItem(EXG2ANTTLib::exTop,0);
	var_Items->PutCellValue(h,long(0),"locked-top 1");
	var_Items->AddBar(h,"Task",COleDateTime(2016,1,4,0,00,00).operator DATE(),COleDateTime(2016,1,8,0,00,00).operator DATE(),"T1",vtMissing);
	h = var_Items->GetLockedItem(EXG2ANTTLib::exTop,1);
	var_Items->PutCellValue(h,long(0),"locked-top 2");
	var_Items->AddBar(h,"Task",COleDateTime(2016,1,5,0,00,00).operator DATE(),COleDateTime(2016,1,9,0,00,00).operator DATE(),"T2",vtMissing);
	h = var_Items->GetLockedItem(EXG2ANTTLib::exTop,2);
	var_Items->PutSelectItem(h,VARIANT_FALSE);
	var_Items->PutItemDivider(h,0);
	var_Items->PutItemHeight(h,2);
	var_Items->AddBar(var_Items->AddItem("un-locked item 1"),"Task",COleDateTime(2016,1,4,0,00,00).operator DATE(),COleDateTime(2016,1,8,0,00,00).operator DATE(),"T3",vtMissing);
	var_Items->AddBar(var_Items->AddItem("un-locked item 2"),"Task",COleDateTime(2016,1,5,0,00,00).operator DATE(),COleDateTime(2016,1,9,0,00,00).operator DATE(),"T4",vtMissing);
	var_Items->PutLockedItemCount(EXG2ANTTLib::exMiddle,3);
	h = var_Items->GetLockedItem(EXG2ANTTLib::exMiddle,0);
	var_Items->PutSelectItem(h,VARIANT_FALSE);
	var_Items->PutItemDivider(h,0);
	var_Items->PutItemHeight(h,2);
	h = var_Items->GetLockedItem(EXG2ANTTLib::exMiddle,1);
	var_Items->PutCellValue(h,long(0),"locked-bottom 1");
	var_Items->AddBar(h,"Task",COleDateTime(2016,1,4,0,00,00).operator DATE(),COleDateTime(2016,1,8,0,00,00).operator DATE(),"T5",vtMissing);
	h = var_Items->GetLockedItem(EXG2ANTTLib::exMiddle,2);
	var_Items->PutCellValue(h,long(0),"locked-bottom 2");
	var_Items->AddBar(h,"Task",COleDateTime(2016,1,5,0,00,00).operator DATE(),COleDateTime(2016,1,9,0,00,00).operator DATE(),"T6",vtMissing);
EXG2ANTTLib::IItemsPtr var_Items1 = spG2antt1->GetItems();
	h = var_Items1->GetFindBar("T1",long(-3));
	var_Items1->PutItemBar(h,var_Items1->GetFirstItemBar(h),EXG2ANTTLib::exBarColor,long(255));
	var_Items1->PutCellValue(h,long(1),h);
spG2antt1->EndUpdate();

1758:
Is it possible to search for a bar through all locked-items 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();
spG2antt1->PutDebug(VARIANT_TRUE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2015,12,31,0,00,00).operator DATE());
spG2antt1->PutBackColorAlternate(RGB(250,250,250));
spG2antt1->PutShowLockedItems(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Find")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueFormat,long(1));
	var_Column->PutVisible(VARIANT_FALSE);
	var_Column->PutFormatColumn(L"int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` ");
spG2antt1->GetChart()->PutColumnsFormatLevel(L"1");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutLockedItemCount(EXG2ANTTLib::exTop,3);
	long h = var_Items->GetLockedItem(EXG2ANTTLib::exTop,0);
	var_Items->PutCellValue(h,long(0),"locked-top 1");
	var_Items->AddBar(h,"Task",COleDateTime(2016,1,4,0,00,00).operator DATE(),COleDateTime(2016,1,8,0,00,00).operator DATE(),"T1",vtMissing);
	h = var_Items->GetLockedItem(EXG2ANTTLib::exTop,1);
	var_Items->PutCellValue(h,long(0),"locked-top 2");
	var_Items->AddBar(h,"Task",COleDateTime(2016,1,5,0,00,00).operator DATE(),COleDateTime(2016,1,9,0,00,00).operator DATE(),"T2",vtMissing);
	h = var_Items->GetLockedItem(EXG2ANTTLib::exTop,2);
	var_Items->PutSelectItem(h,VARIANT_FALSE);
	var_Items->PutItemDivider(h,0);
	var_Items->PutItemHeight(h,2);
	var_Items->AddBar(var_Items->AddItem("un-locked item 1"),"Task",COleDateTime(2016,1,4,0,00,00).operator DATE(),COleDateTime(2016,1,8,0,00,00).operator DATE(),"T3",vtMissing);
	var_Items->AddBar(var_Items->AddItem("un-locked item 2"),"Task",COleDateTime(2016,1,5,0,00,00).operator DATE(),COleDateTime(2016,1,9,0,00,00).operator DATE(),"T4",vtMissing);
	var_Items->PutLockedItemCount(EXG2ANTTLib::exMiddle,3);
	h = var_Items->GetLockedItem(EXG2ANTTLib::exMiddle,0);
	var_Items->PutSelectItem(h,VARIANT_FALSE);
	var_Items->PutItemDivider(h,0);
	var_Items->PutItemHeight(h,2);
	h = var_Items->GetLockedItem(EXG2ANTTLib::exMiddle,1);
	var_Items->PutCellValue(h,long(0),"locked-bottom 1");
	var_Items->AddBar(h,"Task",COleDateTime(2016,1,4,0,00,00).operator DATE(),COleDateTime(2016,1,8,0,00,00).operator DATE(),"T5",vtMissing);
	h = var_Items->GetLockedItem(EXG2ANTTLib::exMiddle,2);
	var_Items->PutCellValue(h,long(0),"locked-bottom 2");
	var_Items->AddBar(h,"Task",COleDateTime(2016,1,5,0,00,00).operator DATE(),COleDateTime(2016,1,9,0,00,00).operator DATE(),"T6",vtMissing);
EXG2ANTTLib::IItemsPtr var_Items1 = spG2antt1->GetItems();
	h = var_Items1->GetFindBar("T2",long(-2));
	var_Items1->PutItemBar(h,var_Items1->GetFirstItemBar(h),EXG2ANTTLib::exBarColor,long(255));
	var_Items1->PutCellValue(h,long(1),h);
spG2antt1->EndUpdate();

1757:
Is it possible to search for a bar through all items ( including locked 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->PutDebug(VARIANT_TRUE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2015,12,31,0,00,00).operator DATE());
spG2antt1->PutBackColorAlternate(RGB(250,250,250));
spG2antt1->PutShowLockedItems(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Find")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueFormat,long(1));
	var_Column->PutVisible(VARIANT_FALSE);
	var_Column->PutFormatColumn(L"int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` ");
spG2antt1->GetChart()->PutColumnsFormatLevel(L"1");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutLockedItemCount(EXG2ANTTLib::exTop,3);
	long h = var_Items->GetLockedItem(EXG2ANTTLib::exTop,0);
	var_Items->PutCellValue(h,long(0),"locked-top 1");
	var_Items->AddBar(h,"Task",COleDateTime(2016,1,4,0,00,00).operator DATE(),COleDateTime(2016,1,8,0,00,00).operator DATE(),"T1",vtMissing);
	h = var_Items->GetLockedItem(EXG2ANTTLib::exTop,1);
	var_Items->PutCellValue(h,long(0),"locked-top 2");
	var_Items->AddBar(h,"Task",COleDateTime(2016,1,5,0,00,00).operator DATE(),COleDateTime(2016,1,9,0,00,00).operator DATE(),"T2",vtMissing);
	h = var_Items->GetLockedItem(EXG2ANTTLib::exTop,2);
	var_Items->PutSelectItem(h,VARIANT_FALSE);
	var_Items->PutItemDivider(h,0);
	var_Items->PutItemHeight(h,2);
	var_Items->AddBar(var_Items->AddItem("un-locked item 1"),"Task",COleDateTime(2016,1,4,0,00,00).operator DATE(),COleDateTime(2016,1,8,0,00,00).operator DATE(),"T3",vtMissing);
	var_Items->AddBar(var_Items->AddItem("un-locked item 2"),"Task",COleDateTime(2016,1,5,0,00,00).operator DATE(),COleDateTime(2016,1,9,0,00,00).operator DATE(),"T4",vtMissing);
	var_Items->PutLockedItemCount(EXG2ANTTLib::exMiddle,3);
	h = var_Items->GetLockedItem(EXG2ANTTLib::exMiddle,0);
	var_Items->PutSelectItem(h,VARIANT_FALSE);
	var_Items->PutItemDivider(h,0);
	var_Items->PutItemHeight(h,2);
	h = var_Items->GetLockedItem(EXG2ANTTLib::exMiddle,1);
	var_Items->PutCellValue(h,long(0),"locked-bottom 1");
	var_Items->AddBar(h,"Task",COleDateTime(2016,1,4,0,00,00).operator DATE(),COleDateTime(2016,1,8,0,00,00).operator DATE(),"T5",vtMissing);
	h = var_Items->GetLockedItem(EXG2ANTTLib::exMiddle,2);
	var_Items->PutCellValue(h,long(0),"locked-bottom 2");
	var_Items->AddBar(h,"Task",COleDateTime(2016,1,5,0,00,00).operator DATE(),COleDateTime(2016,1,9,0,00,00).operator DATE(),"T6",vtMissing);
EXG2ANTTLib::IItemsPtr var_Items1 = spG2antt1->GetItems();
	h = var_Items1->GetFindBar("T5",long(-1));
	var_Items1->PutItemBar(h,var_Items1->GetFirstItemBar(h),EXG2ANTTLib::exBarColor,long(255));
	var_Items1->PutCellValue(h,long(1),h);
spG2antt1->EndUpdate();

1756:
How do I clip/hide/align the bar's caption/text based on the bar's size/width/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"Clip");
spG2antt1->PutScrollBySingleLine(VARIANT_TRUE);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exRowLines);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutAllowResizeChart(EXG2ANTTLib::ResizeChartEnum(EXG2ANTTLib::exAllowResizeChartMiddle | EXG2ANTTLib::exAllowResizeChartHeader));
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exRowLines);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,23,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,216);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutPattern(EXG2ANTTLib::exPatternBox);
		var_Bar->PutColor(RGB(164,164,164));
		var_Bar->PutStartColor(RGB(240,240,240));
		var_Bar->PutEndColor(var_Bar->GetStartColor());
		var_Bar->PutOverlaidType(EXG2ANTTLib::OverlaidBarsTypeEnum(EXG2ANTTLib::exOverlaidBarsIncludeCaption | EXG2ANTTLib::exOverlaidBarsStackAutoArrange | EXG2ANTTLib::exOverlaidBarsStack));
		var_Bar->PutHeight(15);
	var_Chart->PutMinUnitWidth(var_Chart->GetUnitWidth());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("no clip, (0-2)");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1","no clip, right(<b>2</b>)");
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarHAlignCaption,long(2));
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K2","no clip, center(<b>1</b>)");
	var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarHAlignCaption,long(1));
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K3","no clip, left(<b>0</b>)");
	var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarHAlignCaption,long(0));
	h = var_Items->AddItem("clip, inside (3-5)");
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,28,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K1","clip, inside, right(<b>5</b>)");
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarHAlignCaption,long(5));
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,28,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K2","clip, inside, center(<b>4</b>)");
	var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarHAlignCaption,long(4));
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,28,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K3","clip, inside, left(<b>3</b>)");
	var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarHAlignCaption,long(3));
	h = var_Items->AddItem("hide on min width, clip if not fit, inside (6-8)");
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,26,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"K1","hide on min width, clip if not fit, inside, right(<b>8</b>)");
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarHAlignCaption,long(8));
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,26,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"K2","hide on min width, clip if not fit, inside, center(<b>7</b>)");
	var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarHAlignCaption,long(7));
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,26,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"K3","hide on min width, clip if not fit, inside, left(<b>6</b>)");
	var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarHAlignCaption,long(6));
	h = var_Items->AddItem("hide if not fit, no clip, inside (9-11)");
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,28,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K1","hide if not fit, no clip, inside, right(<b>11</b>)");
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarHAlignCaption,long(11));
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,28,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K2","hide if not fit, no clip, center(<b>10</b>)");
	var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarHAlignCaption,long(10));
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,28,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K3","hide if not fit, no clip, inside, left(<b>9</b>)");
	var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarHAlignCaption,long(9));
	h = var_Items->AddItem("no clip, inside, outside (12-14)");
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,28,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K1","no clip, inside, outside, right(<b>14</b>)");
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarHAlignCaption,long(14));
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,28,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K2","no clip, inside, outside, center(<b>13</b>)");
	var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarHAlignCaption,long(13));
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,28,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K3","no clip, inside, outside, left(<b>12</b>)");
	var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarHAlignCaption,long(12));
	h = var_Items->AddItem("no clip, outside (16-18)");
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,30,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K1","no clip, outside, right(<b>18</b>)");
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarHAlignCaption,long(18));
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,30,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K2","no clip, outside, center(<b>17</b>)");
	var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarHAlignCaption,long(17));
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,30,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K3","no clip, outside, left(<b>16</b>)");
	var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarHAlignCaption,long(16));
spG2antt1->EndUpdate();

1755:
Is there a way to prevent the automatic horizontal scrolling of the chart when moving or resizing a bar (method 2)
// DateChange event - Occurs when the first visible date is changed.
void OnDateChangeG2antt1()
{
	/*
		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->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,2,0,00,00).operator DATE());
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Start")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
	var_Column->PutVisible(VARIANT_FALSE);
	var_Column->PutAlignment(EXG2ANTTLib::LeftAlignment);
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"End")));
	var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
	var_Column1->PutVisible(VARIANT_FALSE);
	var_Column1->PutAlignment(EXG2ANTTLib::RightAlignment);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,2,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutColumnsFormatLevel(L"1[bg=12500670]:52,|,2[bg=12500670]:52");
	var_Chart->PutColumnsTransparent(50);
	var_Chart->PutScrollBar(VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1754:
Is there a way to prevent the automatic horizontal scrolling of the chart when moving or resizing a bar, including limiting the bars
// 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();
		var_Items->PutItemBar(Item,Key,EXG2ANTTLib::exBarMinStart,COleDateTime(2001,1,1,0,00,00).operator DATE());
		var_Items->PutItemBar(Item,Key,EXG2ANTTLib::exBarMaxEnd,COleDateTime(2001,2,1,0,00,00).operator DATE());
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Start")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
	var_Column->PutVisible(VARIANT_FALSE);
	var_Column->PutAlignment(EXG2ANTTLib::LeftAlignment);
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"End")));
	var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
	var_Column1->PutVisible(VARIANT_FALSE);
	var_Column1->PutAlignment(EXG2ANTTLib::RightAlignment);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,2,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutColumnsFormatLevel(L"1[bg=12500670]:52,|,2[bg=12500670]:52");
	var_Chart->PutColumnsTransparent(50);
	var_Chart->PutScrollRange(EXG2ANTTLib::exStartDate,COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutScrollRange(EXG2ANTTLib::exEndDate,COleDateTime(2001,1,31,0,00,00).operator DATE());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1753:
Is there a way to prevent the automatic horizontal scrolling of the chart when moving or resizing a bar (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->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Start")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
	var_Column->PutVisible(VARIANT_FALSE);
	var_Column->PutAlignment(EXG2ANTTLib::LeftAlignment);
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"End")));
	var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
	var_Column1->PutVisible(VARIANT_FALSE);
	var_Column1->PutAlignment(EXG2ANTTLib::RightAlignment);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,2,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutColumnsFormatLevel(L"1[bg=12500670]:52,|,2[bg=12500670]:52");
	var_Chart->PutColumnsTransparent(50);
	var_Chart->PutScrollRange(EXG2ANTTLib::exStartDate,COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutScrollRange(EXG2ANTTLib::exEndDate,COleDateTime(2001,1,31,0,00,00).operator DATE());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1752:
Is it possible to have "Preview Window" as a "Modal Window or 'always-on-top window'"
/*
	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());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	long h2 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->AddLink("L1",h1,"K1",h2,"K2");
	var_Items->PutLink("L1",EXG2ANTTLib::exLinkStartPos,long(0));
spG2antt1->EndUpdate();
/*
	Includes the definition for CreateObject function like follows:

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

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

	#import <ExPrint.dll>
	using namespace EXPRINTLib;
*/
EXPRINTLib::IExPrintPtr var_Print = ::CreateObject(L"Exontrol.Print");
	OutputDebugStringW( var_Print->GetVersion() );
	var_Print->PutForeground(-1);
	var_Print->PutPrintExt(((EXG2ANTTLib::IG2anttPtr)(spG2antt1)));
	var_Print->Preview();

1751:
The week number is not correct. What can I do

/*
	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::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstWeekDay(var_Chart->GetLocFirstWeekDay());
	var_Chart->PutMonthNames(var_Chart->GetLocMonthNames());
	var_Chart->PutWeekDays(var_Chart->GetLocWeekDays());
	var_Chart->PutAMPM(var_Chart->GetLocAMPM());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutUnitScale(EXG2ANTTLib::exWeek);
	var_Chart->PutUnitWidth(32);
	var_Chart->PutFirstVisibleDate(COleDateTime(2016,1,1,0,00,00).operator DATE());
	var_Chart->PutAdjustLevelsToBase(VARIANT_TRUE);
	var_Chart->PutWeekNumberAs(EXG2ANTTLib::exISO8601WeekNumber);
	var_Chart->PutShowNonworkingDates(VARIANT_FALSE);
	var_Chart->ScrollTo(var_Chart->GetFirstVisibleDate(),long(1));

1750:
When the user zooms with the mouse, the chart automatically switches the unit scale - ideally I'd like to replicate this so I can switch the unitscale at the same "zoom levels" that the mouse zooming does - is this possible
// ChartEndChanging event - Occurs after the chart has been changed.
void OnChartEndChangingG2antt1(long   Operation)
{
	/*
		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::IChartPtr var_Chart = spG2antt1->GetChart();
		OutputDebugStringW( L"FirstVisibleDate" );
		OutputDebugStringW( _bstr_t(var_Chart->GetFirstVisibleDate()) );
		OutputDebugStringW( L"UnitScale" );
		OutputDebugStringW( _bstr_t(var_Chart->GetUnitScale()) );
		OutputDebugStringW( L"UnitWidth" );
		OutputDebugStringW( _bstr_t(var_Chart->GetUnitWidth()) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(3);
	var_Chart->PutAllowResizeChart(EXG2ANTTLib::ResizeChartEnum(EXG2ANTTLib::exAllowChangeUnitScale | EXG2ANTTLib::exAllowResizeChartMiddle | EXG2ANTTLib::exAllowResizeChartHeader));
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutMarkTodayColor(var_Chart->GetBackColor());
spG2antt1->EndUpdate();

1749:
The first week number is not correctly assigned. What can I do

/*
	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::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutFirstVisibleDate(COleDateTime(2016,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday);
	var_Chart->PutUnitScale(EXG2ANTTLib::exWeek);
	var_Chart->ScrollTo(var_Chart->GetFirstVisibleDate(),long(1));
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines);
	var_Chart->PutAdjustLevelsToBase(VARIANT_TRUE);
	var_Chart->GetLevel(0)->PutLabel("<c><%mmmm%>");

1748:
How can I display the +/- expand - collapse buttons, a bit larger

/*
	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->Add(3,"c:\\exontrol\\images\\normal.ebn");
	var_Appearance->Add(4,"c:\\exontrol\\images\\pushed.ebn");
	var_Appearance->Add(1,"CP:3 -4 -4 4 4");
	var_Appearance->Add(2,"CP:4 -4 -4 4 4");
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exGroupLinesAtRoot);
spG2antt1->PutHasButtons(EXG2ANTTLib::exCustom);
spG2antt1->PutHasButtonsCustom(VARIANT_FALSE,16777216);
spG2antt1->PutHasButtonsCustom(VARIANT_TRUE,33554432);
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Root 1");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Root 2");
	var_Items->InsertItem(h,vtMissing,"Child");
spG2antt1->EndUpdate();

1747:
Is there any option to control where I can drop the items when using the AutoDrag property
// AllowAutoDrag event - Occurs when the user drags the item between InsertA and InsertB as child of NewParent.
void OnAllowAutoDragG2antt1(long   Item,long   NewParent,long   InsertA,long   InsertB,BOOL FAR*   Cancel)
{
	/*
		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( L"NewParent" );
		OutputDebugStringW( var_Items->GetCellCaption(NewParent,long(0)) );
		OutputDebugStringW( L"After" );
		OutputDebugStringW( var_Items->GetCellCaption(InsertA,long(0)) );
		OutputDebugStringW( L"Before" );
		OutputDebugStringW( var_Items->GetCellCaption(InsertB,long(0)) );
	Cancel = VARIANT_TRUE;
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutAutoDrag(EXG2ANTTLib::exAutoDragPositionAny);
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exNoLinesAtRoot);
spG2antt1->PutHasLines(EXG2ANTTLib::exThinLine);
spG2antt1->PutShowFocusRect(VARIANT_FALSE);
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutShowNonworkingDates(VARIANT_FALSE);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,29,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutLevelCount(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Group 1");
	var_Items->PutItemDivider(h,0);
	var_Items->PutItemBold(h,VARIANT_TRUE);
	long h1 = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	long h2 = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(h2,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->AddLink("L1",h1,"K1",h2,"K2");
	var_Items->PutLink("L1",EXG2ANTTLib::exLinkText,"L1");
	long h3 = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(h3,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"K3",vtMissing);
	var_Items->AddLink("L2",h2,"K2",h3,"K3");
	var_Items->PutLink("L2",EXG2ANTTLib::exLinkText,"L2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Group 2");
	var_Items->PutItemBold(h,VARIANT_TRUE);
	var_Items->PutItemDivider(h,0);
spG2antt1->EndUpdate();

1746:
The column (chart section ) overlaps the bars, when using the ColumnsFormatLevel property. How can I prevent that

/*
	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"Start")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
	var_Column->PutVisible(VARIANT_FALSE);
	var_Column->PutAlignment(EXG2ANTTLib::LeftAlignment);
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"End")));
	var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
	var_Column1->PutVisible(VARIANT_FALSE);
	var_Column1->PutAlignment(EXG2ANTTLib::RightAlignment);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,2,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutColumnsFormatLevel(L"1[bg=12500670]:52,|,2[bg=12500670]:52");
	var_Chart->PutColumnsTransparent(50);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1745:
How do I show the column ( chart section ) with a different background color, when using the ColumnsFormatLevel property (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->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Start")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
	var_Column->PutVisible(VARIANT_FALSE);
	var_Column->PutAlignment(EXG2ANTTLib::LeftAlignment);
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"End")));
	var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
	var_Column1->PutVisible(VARIANT_FALSE);
	var_Column1->PutAlignment(EXG2ANTTLib::RightAlignment);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,2,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutColumnsFormatLevel(L"1[bg=12500670]:52,|,2[bg=12500670]:52");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1744:
How do I show the column ( chart section ) with a different background color, when using the ColumnsFormatLevel property (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->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Start")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
	var_Column->PutVisible(VARIANT_FALSE);
	var_Column->PutAlignment(EXG2ANTTLib::LeftAlignment);
	var_Column->PutDef(EXG2ANTTLib::exCellBackColor,long(12500670));
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"End")));
	var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
	var_Column1->PutVisible(VARIANT_FALSE);
	var_Column1->PutAlignment(EXG2ANTTLib::RightAlignment);
	var_Column1->PutDef(EXG2ANTTLib::exCellBackColor,long(12500670));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,31,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutColumnsFormatLevel(L"1:52,|,2:52");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1743:
How can I display the control's content on an single A3 paper size, when using PDF 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();
spG2antt1->GetColumns()->Add(L"Task");
spG2antt1->PutAntiAliasing(VARIANT_TRUE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,24,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutLevelCount(2);
	var_Chart->PutUnitScale(EXG2ANTTLib::exDay);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutPattern(EXG2ANTTLib::exPatternSolid);
		var_Bar->PutColor(RGB(0,0,0));
		var_Bar->PutHeight(16);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,25,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"1","<fgcolor=FFFFFF>Center");
	var_Items->PutItemBar(h,"1",EXG2ANTTLib::exBarExtraCaption,"left");
	var_Items->PutItemBar(h,"1",EXG2ANTTLib::exBarExtraCaptionHAlign,long(16));
	h = var_Items->AddItem("Task 2");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,16,0,00,00).operator DATE(),"1","<fgcolor=FFFFFF>Center");
	h = var_Items->AddItem("Task 3");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,16,0,00,00).operator DATE(),COleDateTime(2001,1,26,0,00,00).operator DATE(),"2","Center");
	var_Items->PutItemBar(h,"2",EXG2ANTTLib::exBarExtraCaption,"right");
	var_Items->PutItemBar(h,"2",EXG2ANTTLib::exBarExtraCaptionHAlign,long(18));
EXG2ANTTLib::INotesPtr var_Notes = spG2antt1->GetChart()->GetNotes();
	EXG2ANTTLib::INotePtr var_Note = var_Notes->Add("1S",spG2antt1->GetItems()->GetItemByIndex(1),"1",L"<%m3%>-<%d%>");
		var_Note->PutPartShadow(EXG2ANTTLib::exNoteEnd,VARIANT_FALSE);
		var_Note->PutPartHOffset(EXG2ANTTLib::exNoteEnd,-16);
		var_Note->PutPartVOffset(EXG2ANTTLib::exNoteEnd,4);
	EXG2ANTTLib::INotePtr var_Note1 = var_Notes->Add("1F",spG2antt1->GetItems()->GetItemByIndex(1),"1",L"<%m3%>-<%d%>");
		var_Note1->PutRelativePosition(long(1));
		var_Note1->PutPartShadow(EXG2ANTTLib::exNoteEnd,VARIANT_FALSE);
		var_Note1->PutPartHOffset(EXG2ANTTLib::exNoteEnd,16);
		var_Note1->PutPartVOffset(EXG2ANTTLib::exNoteEnd,-4);
_variant_t var_CopyTo = spG2antt1->GetCopyTo(L"C:\\Temp\\Preview.pdf|11.69 in x 16.53 in||single");
OutputDebugStringW( L"Look for C:\\Temp\\Preview.pd file." );
spG2antt1->EndUpdate();

1742:
How can I display the control's content on an A3 paper size, when using PDF 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();
spG2antt1->GetColumns()->Add(L"Task");
spG2antt1->PutAntiAliasing(VARIANT_TRUE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,24,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutLevelCount(2);
	var_Chart->PutUnitScale(EXG2ANTTLib::exDay);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutPattern(EXG2ANTTLib::exPatternSolid);
		var_Bar->PutColor(RGB(0,0,0));
		var_Bar->PutHeight(16);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,25,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"1","<fgcolor=FFFFFF>Center");
	var_Items->PutItemBar(h,"1",EXG2ANTTLib::exBarExtraCaption,"left");
	var_Items->PutItemBar(h,"1",EXG2ANTTLib::exBarExtraCaptionHAlign,long(16));
	h = var_Items->AddItem("Task 2");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,16,0,00,00).operator DATE(),"1","<fgcolor=FFFFFF>Center");
	h = var_Items->AddItem("Task 3");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,16,0,00,00).operator DATE(),COleDateTime(2001,1,26,0,00,00).operator DATE(),"2","Center");
	var_Items->PutItemBar(h,"2",EXG2ANTTLib::exBarExtraCaption,"right");
	var_Items->PutItemBar(h,"2",EXG2ANTTLib::exBarExtraCaptionHAlign,long(18));
EXG2ANTTLib::INotesPtr var_Notes = spG2antt1->GetChart()->GetNotes();
	EXG2ANTTLib::INotePtr var_Note = var_Notes->Add("1S",spG2antt1->GetItems()->GetItemByIndex(1),"1",L"<%m3%>-<%d%>");
		var_Note->PutPartShadow(EXG2ANTTLib::exNoteEnd,VARIANT_FALSE);
		var_Note->PutPartHOffset(EXG2ANTTLib::exNoteEnd,-16);
		var_Note->PutPartVOffset(EXG2ANTTLib::exNoteEnd,4);
	EXG2ANTTLib::INotePtr var_Note1 = var_Notes->Add("1F",spG2antt1->GetItems()->GetItemByIndex(1),"1",L"<%m3%>-<%d%>");
		var_Note1->PutRelativePosition(long(1));
		var_Note1->PutPartShadow(EXG2ANTTLib::exNoteEnd,VARIANT_FALSE);
		var_Note1->PutPartHOffset(EXG2ANTTLib::exNoteEnd,16);
		var_Note1->PutPartVOffset(EXG2ANTTLib::exNoteEnd,-4);
_variant_t var_CopyTo = spG2antt1->GetCopyTo(L"C:\\Temp\\Preview.pdf|11.69 in x 16.53 in");
OutputDebugStringW( L"Look for C:\\Temp\\Preview.pd file." );
spG2antt1->EndUpdate();

1741:
How can I specify the grouping strategy, ie numbers from 1 to 5 are given the value (1-5) and grouping is done on this new value

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void OnAddGroupItemG2antt1(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->PutItemBold(Item,VARIANT_TRUE);
		var_Items->AddBar(Item,"Summary",var_Items->GetCellValue(Item,long(1)),var_Items->GetCellValue(Item,long(2)),vtMissing,vtMissing);
		var_Items->DefineSummaryBars(Item,"",-3,"");
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutAllowGroupBy(VARIANT_TRUE);
spG2antt1->PutSortBarVisible(VARIANT_TRUE);
spG2antt1->PutMarkSearchColumn(VARIANT_FALSE);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Tasks");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start")));
		var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
		var_Column->PutAllowGroupBy(VARIANT_FALSE);
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"End")));
		var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
		var_Column1->PutAllowGroupBy(VARIANT_FALSE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("1"),"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,27,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("1"),"Task",COleDateTime(2006,9,22,0,00,00).operator DATE(),COleDateTime(2006,9,28,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("2"),"Task",COleDateTime(2006,9,22,0,00,00).operator DATE(),COleDateTime(2006,9,28,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("2"),"Task",COleDateTime(2006,9,23,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("3"),"Task",COleDateTime(2006,9,25,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("3"),"Task",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,9,30,0,00,00).operator DATE(),vtMissing,vtMissing);
EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks - Group")));
	var_Column2->PutVisible(VARIANT_FALSE);
	var_Column2->PutFormatColumn(L"%0 in (1,2) ? `1 - 2` : `3 -`");
	var_Column2->PutSortOrder(EXG2ANTTLib::SortAscending);
spG2antt1->EndUpdate();

1740:
How can I filter the chart and its content, not the items section

// RClick event - Fired when right mouse button is clicked
void OnRClickG2antt1()
{
	/*
		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->GetColumns()->GetItem("Start")->ShowFilter("-1,-1,128,128");
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSortBarVisible(VARIANT_TRUE);
spG2antt1->PutMarkSearchColumn(VARIANT_FALSE);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Tasks");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start")));
		var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
		var_Column->PutDisplayFilterDate(VARIANT_TRUE);
		var_Column->PutDisplayFilterPattern(VARIANT_FALSE);
		var_Column->PutFilterList(EXG2ANTTLib::FilterListEnum(EXG2ANTTLib::exShowExclude | EXG2ANTTLib::exShowCheckBox));
		var_Column->PutVisible(VARIANT_FALSE);
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"End")));
		var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
		var_Column1->PutDisplayFilterDate(VARIANT_TRUE);
		var_Column1->PutDisplayFilterPattern(VARIANT_FALSE);
		var_Column1->PutVisible(VARIANT_FALSE);
		var_Column1->PutFilterList(EXG2ANTTLib::FilterListEnum(EXG2ANTTLib::exShowExclude | EXG2ANTTLib::exShowCheckBox));
		var_Column1->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,27,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2006,9,22,0,00,00).operator DATE(),COleDateTime(2006,9,28,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2006,9,22,0,00,00).operator DATE(),COleDateTime(2006,9,28,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2006,9,23,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 5"),"Task",COleDateTime(2006,9,25,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 6"),"Task",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,9,30,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1739:
How do I enable the Group-By feature

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void OnAddGroupItemG2antt1(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->PutItemBackColor(Item,RGB(240,240,240));
		spG2antt1->GetChart()->PutItemBackColor(Item,RGB(240,240,240));
		var_Items->PutItemDividerLine(Item,EXG2ANTTLib::EmptyLine);
		var_Items->AddBar(Item,"Summary",var_Items->GetCellValue(Item,long(1)),var_Items->GetCellValue(Item,long(2)),vtMissing,vtMissing);
		var_Items->DefineSummaryBars(Item,"",-3,"");
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutAllowGroupBy(VARIANT_TRUE);
spG2antt1->PutSortBarVisible(VARIANT_TRUE);
spG2antt1->PutMarkSearchColumn(VARIANT_FALSE);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Tasks");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start")));
		var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
		var_Column->PutAllowGroupBy(VARIANT_FALSE);
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"End")));
		var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
		var_Column1->PutAllowGroupBy(VARIANT_FALSE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,27,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2006,9,22,0,00,00).operator DATE(),COleDateTime(2006,9,28,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2006,9,22,0,00,00).operator DATE(),COleDateTime(2006,9,28,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2006,9,23,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2006,9,25,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,9,30,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->GetColumns()->GetItem(long(0))->PutSortOrder(EXG2ANTTLib::SortAscending);
spG2antt1->EndUpdate();

1738:
Is there any method to know number/length/count/duration of working days in a bar ( excluding non-working days)

// 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();
		OutputDebugStringW( var_Items->GetCellCaption(var_Items->GetFocusItem(),long(0)) );
		OutputDebugStringW( _bstr_t(var_Items->GetItemBar(var_Items->GetFocusItem(),"",EXG2ANTTLib::exBarWorkingCount)) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSelBackColor(RGB(142,190,255));
spG2antt1->PutSelForeColor(RGB(0,0,0));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	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::exBarCaption,"<%=%258%><font ;6><off 3>w/units");
		var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task A");
	var_Items->AddBar(h,"Task",COleDateTime(2002,1,2,0,00,00).operator DATE(),COleDateTime(2002,1,9,0,00,00).operator DATE(),vtMissing,vtMissing);
	h = var_Items->AddItem("Task B");
	var_Items->AddBar(h,"Task",COleDateTime(2002,1,3,0,00,00).operator DATE(),COleDateTime(2002,1,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Task C");
	var_Items->AddBar(h,"Task",COleDateTime(2002,1,4,0,00,00).operator DATE(),COleDateTime(2002,1,5,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1737:
How do i verify weather specified unit is Nonworking Working Unit

// MouseMove event - Occurs when the user moves the mouse.
void OnMouseMoveG2antt1(short   Button,short   Shift,long   X,long   Y)
{
	/*
		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();
	long h = spG2antt1->GetItemFromPoint(-1,-1,c,hit);
	Date d = spG2antt1->GetChart()->GetDateFromPoint(-1,-1);
	OutputDebugStringW( L"d" );
	OutputDebugStringW( _bstr_t(spG2antt1->GetChart()->GetIsNonworkingDate(d,h)) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"NonWorking");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday);
	var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,24,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	var_Chart->PutLevelCount(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Default");
	h = var_Items->AddItem("January");
	var_Items->PutItemNonworkingUnits(h,VARIANT_FALSE,L"month(value) = 1");
	h = var_Items->AddItem("February, Saturday, Sunday");
	var_Items->PutItemNonworkingUnits(h,VARIANT_FALSE,L"month(value) = 2 or (weekday(value) = 0 or weekday(value) = 6)");
	h = var_Items->AddItem("Sunday");
	var_Items->PutItemNonworkingUnits(h,VARIANT_FALSE,L"weekday(value) = 0");
spG2antt1->EndUpdate();

1736:
How can I specify the bar's caption to be caption from a column/cell

// 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();
	spG2antt1->Refresh();
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<fgcolor=808080><%=%C0%>");
		var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
EXG2ANTTLib::IEditorPtr var_Editor = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Task")))->GetEditor();
	var_Editor->PutEditType(EXG2ANTTLib::DropDownListType);
	var_Editor->AddItem(1,L"Aka",vtMissing);
	var_Editor->AddItem(2,L"Baka",vtMissing);
	var_Editor->AddItem(3,L"Taka",vtMissing);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem(long(1)),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem(long(2)),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem(long(3)),"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1735:
The histogram values displayed on the chart are using 2 decimal places. Can this be formated to just 0 decimal place, so 86.79% becomes 87%

/*
	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"Effort")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(21));
	var_Column->GetEditor()->PutEditType(EXG2ANTTLib::SpinType);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutNonworkingDays(0);
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE());
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	var_Chart->PutHistogramHeight(128);
	var_Chart->PutHistogramView(EXG2ANTTLib::exHistogramAllItems);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutHistogramPattern(var_Bar->GetPattern());
		var_Bar->PutHistogramType(EXG2ANTTLib::exHistOverload);
		var_Bar->PutHistogramCriticalValue(3);
		var_Bar->PutShowHistogramValues(L"value>3?255:1");
		var_Bar->PutHistogramItems(-11);
		var_Bar->PutHistogramGridLinesColor(RGB(192,192,192));
		var_Bar->PutHistogramRulerLinesColor(RGB(0,0,1));
		var_Bar->PutFormatHistogramValues(L"(value format `0`) + ` units`");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	long h1 = var_Items->AddItem("Task 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,6,23,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellValue(h1,long(1),double(6.79));
	h1 = var_Items->AddItem("Task 2");
	var_Items->AddBar(h1,"Task",COleDateTime(2005,6,24,0,00,00).operator DATE(),COleDateTime(2005,6,26,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellValue(h1,long(1),double(3.19));
	h1 = var_Items->AddItem("Task 3");
	var_Items->AddBar(h1,"Task",COleDateTime(2005,6,27,0,00,00).operator DATE(),COleDateTime(2005,6,29,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellValue(h1,long(1),long(2));
	h1 = var_Items->AddItem("Task 4");
	var_Items->AddBar(h1,"Task",COleDateTime(2005,6,30,0,00,00).operator DATE(),COleDateTime(2005,7,2,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellValue(h1,long(1),long(1));
spG2antt1->EndUpdate();

1734:
How can I create a relative time-scale

/*
	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(24);
spG2antt1->PutHeaderHeight(spG2antt1->GetDefaultItemHeight());
spG2antt1->PutGridLineStyle(EXG2ANTTLib::exGridLinesSolid);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines);
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exNoLinesAtRoot);
spG2antt1->PutBackColorLevelHeader(spG2antt1->GetBackColor());
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines);
	var_Chart->PutGridLineStyle(EXG2ANTTLib::exGridLinesSolid);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(long(0));
	var_Chart->PutNonworkingDays(0);
	var_Chart->PutUnitWidth(36);
	EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0);
		var_Level->PutUnit(EXG2ANTTLib::exDay);
		var_Level->PutCount(6);
		var_Level->PutAlignment(EXG2ANTTLib::CenterAlignment);
		var_Level->PutLabel("<%i%>");
		var_Level->PutFormatLabel(L"'<b>' + ( (value / 6)  array ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec') ) + '-16'");
	EXG2ANTTLib::ILevelPtr var_Level1 = var_Chart->GetLevel(1);
		var_Level1->PutLabel("<%i%>");
		var_Level1->PutFormatLabel(L"1 + value mod 6 + ` `");
		var_Level1->PutAlignment(EXG2ANTTLib::RightAlignment);
	var_Chart->PutAdjustLevelsToBase(VARIANT_TRUE);
	var_Chart->PutScrollRange(EXG2ANTTLib::exStartDate,long(0));
	var_Chart->PutScrollRange(EXG2ANTTLib::exEndDate,long(95));
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutHeight(15);
		var_Bar->PutColor(RGB(252,213,180));
		var_Bar->PutPattern(EXG2ANTTLib::exPatternSolid);
		var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"date blocking");
spG2antt1->GetColumns()->Add(L"Company");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("ABC Company");
	var_Items->PutItemBackColor(h,RGB(240,240,240));
	spG2antt1->GetChart()->PutItemBackColor(h,RGB(240,240,240));
	long hChild = var_Items->InsertItem(h,vtMissing,"line 1");
	var_Items->AddBar(hChild,"Task",long(0),long(3),vtMissing,vtMissing);
	hChild = var_Items->InsertItem(h,vtMissing,"line 2");
	var_Items->AddBar(hChild,"Task",long(3),long(5),"A",vtMissing);
	var_Items->AddBar(hChild,"Task",long(7),long(10),"B",vtMissing);
	hChild = var_Items->InsertItem(h,vtMissing,"line 3");
	var_Items->AddBar(hChild,"Task",long(5),long(8),"A",vtMissing);
	var_Items->AddBar(hChild,"Task",long(9),long(12),"B",vtMissing);
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

1733:
Extending the bar's visual appearance with additional objects, EBNs, using the exBarBackgroundExt and exBarBackgroundExtInflate

/*
	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(32);
EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance();
	var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAADhABcMIQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYE") +
"DGHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NwXFaNZznBK7LpvK5HNrie55XzAcj3dbmAYJQzB" +
"JLxKSIDwCd6NXrCOJ5HhWDzjQjJMozLC8YiPG6fZRbeT4ToGNdXYhJWiyLiFeYtVzSMj1fD9Ir/EakbLtey4Lq2A53RzdHThSQpCwPA4BgIA=");
	var_Appearance->Add(2,_bstr_t("gBFLBCJwBAEHhEJAADhABcMIQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYE") +
"DGHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NrXHZ9YwTOC5IDke67cr2J53XZAd4QTb2Cz7QC8" +
"QAvDA7awafM1MSuHIcOw/AqTYDkTq4XjODYhTDEc4zPLcFx/I6haBoWCSLi+T5VVrRMo1TKtRxnNaubZqO5aRrGe5NW6EXThSQpCr+f4BgIA=");
	var_Appearance->Add(3,_bstr_t("gBFLBCJwBAEHhEJAADhABcMIQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYE") +
"DGHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NwXFaNZznBK7LpvK5HNrie55XxfV6YBa8B4JPaE" +
"ZLwLB7dwaf6IQLiWLYHiAAYZRKTcxlDI8AwvFaaZjnWA5ZaOMZBU7RNRyHR9IyTDaWaTqeqbHIuJ4FUzaNY2fZrOz2F6FAA6cKSFIWFYVAMBA");
	var_Appearance->Add(4,_bstr_t("gBFLBCJwBAEHhEJAADhABb8IQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYE") +
"DGHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NwXFaNZznBK7LpvK5HNrie55XxfV6YBa8B4JPaE" +
"ZLwLB7dwaf6IQLiWLYHiAAYBIbJI5yeb5Hx3HqfZjbeSxVoML43SzHcByGRcTwzC6pYjrGoZJpWZ4ZQrbNR3DZ8VzzNTrQxIUhYVhUAkB");
	var_Appearance->PutRenderType(-16777216);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,164);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutNonworkingDaysColor(RGB(240,240,240));
	var_Chart->PutNonworkingDaysPattern(EXG2ANTTLib::exPatternBDiagonal);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutHeight(17);
		var_Bar->PutColor(RGB(255,255,255));
		var_Bar->PutPattern(EXG2ANTTLib::exPatternSolid);
		var_Bar->PutDef(EXG2ANTTLib::exBarFrameColor,long(1));
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"",vtMissing);
	long h = var_Items->AddItem("Task+Rhombus(red)");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"none[(100%-11,50%-6,11,11),back=0x10000FF]");
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExtInflate,",,5");
	h = var_Items->AddItem("Rhombus(red)+Task");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"none[(0,50%-6,11,11),back=0x10000FF]");
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExtInflate,"-5");
	h = var_Items->AddItem("Task(yellow)+Rhombus(blue)");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"none[(100%-11,50%-6,11,11),back=0x1FF0000]");
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExtInflate,",,5");
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarColor,long(65535));
	h = var_Items->AddItem("Rhombus(blue)+Task(yellow)");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"none[(0,50%-6,11,11),back=0x1FF0000]");
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExtInflate,"-5");
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarColor,long(65535));
	h = var_Items->AddItem("TriangleUp(white)+Task");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"none[(0,50%-6,11,11),back=0x2FFFFFF]");
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExtInflate,"-5");
	h = var_Items->AddItem("TriangleUp(blue)+Task(magenta)+TriangleDown(red)");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"none[(0,50%-6,11,11),back=0x02FF0000],none[(100%-11,50%-6,11,11),back=0x030000FF]");
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExtInflate,"-5,0,5,0");
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarColor,long(16744703));
	h = var_Items->AddItem("Rhombus+Task+TriangleDown");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"none[(0,50%-6,11,11),back=0x01FF0000],none[(100%-11,50%-6,11,11),back=0x030000FF]");
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExtInflate,"-5, 0,5,0");
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarColor,long(16744448));
	h = var_Items->AddItem("Rhombus+Task+TriangleDown");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"none[(50%-6,0,11,11),back=0x01FF0000],none[(50%-6,100%-11,11,11),back=0x010000FF]");
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExtInflate,"0,-5,0,5");
	h = var_Items->AddItem("Task+Star");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"none[(100%-11,0,11,11),back=0x4FFFFFF]");
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExtInflate,long(5));
	h = var_Items->AddItem("Star+Task");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"none[(0,100%-11,11,11),back=0x04FFFFFF]");
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExtInflate,long(5));
	h = var_Items->AddItem("Task+Star");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"none[(100%-11,0,11,11),back=0x4FFFFFF]");
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExtInflate,"0,-6,14");
spG2antt1->EndUpdate();

1732:
I am using the ItemBar(exBarFrameColor) to display an additional EBN on the current bar. The problem is that I still need a black frame around the bar. How can I achieve that

/*
	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->Add(1,_bstr_t("gBFLBCJwBAEHhEJAADhABXMIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EQLhGBRQCULQxDCBMIjLJoWhsASVRhnCBBR") +
"hwAI7ShPUBgXBNCQzICTJJkSJZBiECIJFAaJhnIapZDKGKQWCjAgiNpqGQ2QiKFC2HAcEAxCxGJBoKKZGq2bpJQLbdxUXRVZzpNi7Louay5CrOCZvXxaeAXDa+Az5ODD" +
"MRwLBcKhzCKDYzfdrZFaWFT3Qi8aCvG6sbw/HZ0OrEEIwCEBA");
	var_Appearance->Add(2,"CP:1 0 0 5 0");
	var_Appearance->Add(3,_bstr_t("gBFLBCJwBAEHhEJAADhABUEIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLIxhEYobgmGIaRiBMIxAKIZhzEgYRoiAYhXDiHwxARHUgRfIEOwHDiBZomWKZE") +
"iaKIqRrLMryFLMZx3CqcAApGaqHiOCYlSbTcoyfJYZBzD6mKJpWipWheW48U7PVRDJSkNysASZIyrGKqJouX4WR7BcZgNR4YBgEoWRouSBLWrgNIVR6/eBABZFPzbNK3" +
"ZzdOIIJgEgIA=");
	var_Appearance->PutRenderType(-16777216);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,164);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->GetBars()->GetItem("Task")->PutColor(0x3ff0000);
	var_Chart->GetBars()->Copy(L"Task",L"NewTask")->PutHeight(15);
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(h,"NewTask",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"new",vtMissing);
	h = var_Items->AddItem("Task+Rhombus");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarFrameColor,long(33554432));
	var_Items->AddBar(h,"NewTask",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"new",vtMissing);
	var_Items->PutItemBar(h,"new",EXG2ANTTLib::exBarFrameColor,long(33554432));
	h = var_Items->AddItem("Task/Color+Rhombus");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarFrameColor,long(33554687));
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarColor,long(65280));
	var_Items->AddBar(h,"NewTask",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"new",vtMissing);
	var_Items->PutItemBar(h,"new",EXG2ANTTLib::exBarFrameColor,long(33554687));
	var_Items->PutItemBar(h,"new",EXG2ANTTLib::exBarColor,long(65280));
	h = var_Items->AddItem("Task/Color+Rhombus/Color");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarFrameColor,long(33619712));
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarColor,long(16711935));
	var_Items->AddBar(h,"NewTask",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"new",vtMissing);
	var_Items->PutItemBar(h,"new",EXG2ANTTLib::exBarFrameColor,long(33619712));
	var_Items->PutItemBar(h,"new",EXG2ANTTLib::exBarColor,long(16711935));
spG2antt1->EndUpdate();

1731:
I am using EBN objects to show my bars, but when apply a color to the EBN looks darker. Is it possible to get the same color brightness

/*
	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->Add(1,_bstr_t("gBFLBCJwBAEHhEJAADhABWkIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EZBGABYJDUMAlCyNQBQSKIYxnAgYY4ACZ5I") +
"jqAwLQjQEYzZI0SxJCqQZBBCCSQKkYx0HScRijDILBQwIQmaqjEZoJCiQZfQLCAYRMhkQx9DKTLRtKhYDqubpHUZbdwWRaVYTlM6RLbhGy7YqefJtXLfN4WZgWCz9QLD" +
"I4wS78JruaqOW5hVz4BasfTrOzLcTzG4HLhCCYBgI");
	var_Appearance->Add(2,"CP:1 -6 0 0 0");
	var_Appearance->PutRenderType(-16777216);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,164);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	h = var_Items->AddItem("Task+Rhombus");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarFrameColor,long(33554432));
	h = var_Items->AddItem("Task/Color+Rhombus");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarFrameColor,long(33554687));
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarColor,long(65280));
	h = var_Items->AddItem("Task/Color+Rhombus/Color");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarFrameColor,long(33619712));
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarColor,long(16711935));
spG2antt1->EndUpdate();

1730:
The ItemBar(exBarColor) changes the color for margins, and there is no exBarStartColor/exBarEndColor. However in my case I would then like do dynamically change the bar color to a different color without changing the start shape 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();
EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance();
	var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAADhABWkIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EZBGABYJDUMAlCyNQBQSKIYxnAgYY4ACZ5I") +
"jqAwLQjQEYzZI0SxJCqQZBBCCSQKkYx0HScRijDILBQwIQmaqjEZoJCiQZfQLCAYRMhkQx9DKTLRtKhYDqubpHUZbdwWRaVYTlM6RLbhGy7YqefJtXLfN4WZgWCz9QLD" +
"I4wS78JruaqOW5hVz4BasfTrOzLcTzG4HLhCCYBgI");
	var_Appearance->Add(2,"CP:1 -6 0 0 0");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,164);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	h = var_Items->AddItem("Task+Rhombus");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarFrameColor,long(33554432));
	h = var_Items->AddItem("Task/Color+Rhombus");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarFrameColor,long(33554432));
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarColor,long(65280));
	h = var_Items->AddItem("Task/Color+Rhombus/Color");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarFrameColor,long(33619712));
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarColor,long(16711935));
spG2antt1->EndUpdate();

1729:
The ItemBar(exBarColor) changes the color for margins, and there is no exBarStartColor/exBarEndColor. However in my case I would then like do dynamically change the bar color to a different color without changing the end shape 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();
EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance();
	var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAADhABXMIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EQLhGBRQCULQxDCBMIjLJoWhsASVRhnCBBR") +
"hwAI7ShPUBgXBNCQzICTJJkSJZBiECIJFAaJhnIapZDKGKQWCjAgiNpqGQ2QiKFC2HAcEAxCxGJBoKKZGq2bpJQLbdxUXRVZzpNi7Louay5CrOCZvXxaeAXDa+Az5ODD" +
"MRwLBcKhzCKDYzfdrZFaWFT3Qi8aCvG6sbw/HZ0OrEEIwCEBA");
	var_Appearance->Add(2,"CP:1 0 0 6 0");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,164);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	h = var_Items->AddItem("Task+Rhombus");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarFrameColor,long(33554432));
	h = var_Items->AddItem("Task/Color+Rhombus");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarFrameColor,long(33554432));
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarColor,long(65280));
	h = var_Items->AddItem("Task/Color+Rhombus/Color");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarFrameColor,long(33619712));
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarColor,long(16711935));
spG2antt1->EndUpdate();

1728:
Is it possible to resize a column with the mouse without changing the width of the next 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->PutColumnAutoResize(VARIANT_FALSE);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Column 1")))->PutWidth(256);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Column 2")))->PutWidth(512);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines);
spG2antt1->EndUpdate();

1727:
How can I align captions of items with checkbox, with items with no checkbox

/*
	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"Default");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellImages(var_Items->AddItem(long(0)),long(0),"1");
	var_Items->PutCellHasCheckBox(var_Items->AddItem(long(1)),long(0),VARIANT_TRUE);
	var_Items->PutCellImages(var_Items->AddItem(long(2)),long(0),"1");
spG2antt1->EndUpdate();

1726:
How can I show each group header ( not-subroup ), with a different background color, while alternate background colors for inside items

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void OnAddGroupItemG2antt1(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->AddBar(Item,"Summary",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
		var_Items->DefineSummaryBars(Item,"",-3,"");
}

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->AddBar(Item,"Task",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
}

// LayoutChanged event - Occurs when column's position or column's size is changed.
void OnLayoutChangedG2antt1()
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Refresh();
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(1994,9,1,0,00,00).operator DATE());
spG2antt1->GetChart()->PutPaneWidth(VARIANT_FALSE,312);
spG2antt1->PutBackColorSortBar(spG2antt1->GetBackColor());
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

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

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access2007\\sample.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
spG2antt1->GetColumns()->GetItem(long(2))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
spG2antt1->GetColumns()->GetItem(long(4))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
spG2antt1->PutSortBarVisible(VARIANT_TRUE);
spG2antt1->PutSortBarCaption(L"Drag a <b>column</b> header here to group by that column.");
spG2antt1->PutAllowGroupBy(VARIANT_TRUE);
spG2antt1->GetColumns()->GetItem(long(1))->PutSortOrder(EXG2ANTTLib::SortAscending);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Position")));
	var_Column->PutFormatColumn(L"(0:= (1 rpos '')) right ( ( 1:= ( =:0 rfind `.` ) ) != -1 ? =:1 : len(=:0))");
	var_Column->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Position")));
	var_Column1->PutFormatColumn(L"(1 rpos '') contains '.'");
	var_Column1->PutVisible(VARIANT_FALSE);
spG2antt1->GetConditionalFormats()->Add(L"(%C13 mod 2) != 0",vtMissing)->PutBackColor(RGB(240,240,240));
spG2antt1->GetConditionalFormats()->Add(L"%C14 = 0",vtMissing)->PutBackColor(RGB(190,190,190));
spG2antt1->EndUpdate();

1725:
What is the difference between %0 and %C0, when using in expressions ( format, conditional format, computed fields, and so on )

/*
	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->PutHeaderAppearance(EXG2ANTTLib::Etched);
spG2antt1->PutHeaderHeight(24);
spG2antt1->PutScrollBySingleLine(VARIANT_TRUE);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exRowLines);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Value")))->PutDef(EXG2ANTTLib::exCellValueFormat,long(1));
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"FormatColumn = `%0` ~ CellValue")));
	var_Column->PutFormatColumn(L"%0");
	var_Column->PutDef(EXG2ANTTLib::exCellSingleLine,VARIANT_FALSE);
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"FormatColumn = `%C0`~ CellCaption")));
	var_Column1->PutFormatColumn(L"%C0");
	var_Column1->PutDef(EXG2ANTTLib::exCellSingleLine,VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem(double(1.1234));
	var_Items->PutCellValueFormat(var_Items->AddItem("<sha ;;0>This <fgcolor=FF0000>is a <s><b>HTM</fgcolor>L</b> text</s>."),long(0),EXG2ANTTLib::exHTML);
	EXG2ANTTLib::IEditorPtr var_Editor = var_Items->GetCellEditor(var_Items->AddItem(long(3)),vtMissing);
		var_Editor->PutEditType(EXG2ANTTLib::CheckListType);
		var_Editor->AddItem(1,L"Border",vtMissing);
		var_Editor->AddItem(2,L"Thick",vtMissing);
		var_Editor->AddItem(4,L"Shadow",vtMissing);
	var_Items->PutFormatCell(var_Items->AddItem(long(10000)),long(0),L"`<b>` + currency(value)");
spG2antt1->EndUpdate();

1724:
How can I alternate colors for each group header ( not-subroup ), with a different background color, while items of the same group showing with a different color

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void OnAddGroupItemG2antt1(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->AddBar(Item,"Summary",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
		var_Items->DefineSummaryBars(Item,"",-3,"");
}

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->AddBar(Item,"Task",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
}

// LayoutChanged event - Occurs when column's position or column's size is changed.
void OnLayoutChangedG2antt1()
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Refresh();
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(1994,9,1,0,00,00).operator DATE());
spG2antt1->GetChart()->PutPaneWidth(VARIANT_FALSE,312);
spG2antt1->PutBackColorSortBar(spG2antt1->GetBackColor());
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

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

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access2007\\sample.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
spG2antt1->GetColumns()->GetItem(long(2))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
spG2antt1->GetColumns()->GetItem(long(4))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
spG2antt1->PutSortBarVisible(VARIANT_TRUE);
spG2antt1->PutSortBarCaption(L"Drag a <b>column</b> header here to group by that column.");
spG2antt1->PutAllowGroupBy(VARIANT_TRUE);
spG2antt1->GetColumns()->GetItem(long(1))->PutSortOrder(EXG2ANTTLib::SortAscending);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Position")));
	var_Column->PutFormatColumn(L"(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))");
	var_Column->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Position")));
	var_Column1->PutFormatColumn(L"(1 rpos '') contains '.'");
	var_Column1->PutVisible(VARIANT_FALSE);
spG2antt1->GetConditionalFormats()->Add(L"(%C13 mod 2) != 0",vtMissing)->PutBackColor(RGB(240,240,240));
spG2antt1->GetConditionalFormats()->Add(L"%C14 = 0",vtMissing)->PutBackColor(RGB(190,190,190));
spG2antt1->EndUpdate();

1723:
How can I highlight each group header, with a different background color (method 2)

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void OnAddGroupItemG2antt1(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->PutItemBackColor(Item,RGB(190,190,190));
		var_Items->AddBar(Item,"Summary",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
		var_Items->DefineSummaryBars(Item,"",-3,"");
}

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->AddBar(Item,"Task",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
}

// LayoutChanged event - Occurs when column's position or column's size is changed.
void OnLayoutChangedG2antt1()
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Refresh();
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(1994,9,1,0,00,00).operator DATE());
spG2antt1->GetChart()->PutPaneWidth(VARIANT_FALSE,312);
spG2antt1->PutBackColorSortBar(spG2antt1->GetBackColor());
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

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

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access2007\\sample.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
spG2antt1->GetColumns()->GetItem(long(2))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
spG2antt1->GetColumns()->GetItem(long(4))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
spG2antt1->PutSortBarVisible(VARIANT_TRUE);
spG2antt1->PutSortBarCaption(L"Drag a <b>column</b> header here to group by that column.");
spG2antt1->PutAllowGroupBy(VARIANT_TRUE);
spG2antt1->GetColumns()->GetItem(long(1))->PutSortOrder(EXG2ANTTLib::SortAscending);
spG2antt1->EndUpdate();

1722:
How can I highlight each group header ( not-subroup ), with a different background color (method 1)

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void OnAddGroupItemG2antt1(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->AddBar(Item,"Summary",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
		var_Items->DefineSummaryBars(Item,"",-3,"");
}

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->AddBar(Item,"Task",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
}

// LayoutChanged event - Occurs when column's position or column's size is changed.
void OnLayoutChangedG2antt1()
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Refresh();
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(1994,9,1,0,00,00).operator DATE());
spG2antt1->GetChart()->PutPaneWidth(VARIANT_FALSE,312);
spG2antt1->PutBackColorSortBar(spG2antt1->GetBackColor());
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

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

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access2007\\sample.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
spG2antt1->GetColumns()->GetItem(long(2))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
spG2antt1->GetColumns()->GetItem(long(4))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
spG2antt1->PutSortBarVisible(VARIANT_TRUE);
spG2antt1->PutSortBarCaption(L"Drag a <b>column</b> header here to group by that column.");
spG2antt1->PutAllowGroupBy(VARIANT_TRUE);
spG2antt1->GetColumns()->GetItem(long(1))->PutSortOrder(EXG2ANTTLib::SortAscending);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Position")));
	var_Column->PutFormatColumn(L"(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))");
	var_Column->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Position")));
	var_Column1->PutFormatColumn(L"(1 rpos '') contains '.'");
	var_Column1->PutVisible(VARIANT_FALSE);
spG2antt1->GetConditionalFormats()->Add(L"%C14 = 0",vtMissing)->PutBackColor(RGB(190,190,190));
spG2antt1->EndUpdate();

1721:
The BackColorAlternate displays each second row with a different background color. Is it possible to apply a different background color, for each sub-tree, ConditionalFormats, Add

// LayoutChanged event - Occurs when column's position or column's size is changed.
void OnLayoutChangedG2antt1()
{
	/*
		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->Refresh();
}

// Sort event - Fired when the control sorts a column.
void OnSortG2antt1()
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Refresh();
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
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);
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"P2")));
	var_Column1->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column1->PutPartialCheck(VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Root 1");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Root 2");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Root 2");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Position")));
	var_Column2->PutFormatColumn(L"(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))");
	var_Column2->PutVisible(VARIANT_FALSE);
spG2antt1->GetConditionalFormats()->Add(L"(%C2 mod 2) != 0",vtMissing)->PutBackColor(RGB(240,240,240));
spG2antt1->EndUpdate();

1720:
The BackColorAlternate displays each second row with a different background color. Is it possible to apply a different background color, for 2nd, 3rd, 4th, row, and so on

// 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->AddBar(Item,"Task",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
}

// LayoutChanged event - Occurs when column's position or column's size is changed.
void OnLayoutChangedG2antt1()
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Refresh();
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(1994,9,1,0,00,00).operator DATE());
spG2antt1->GetChart()->PutPaneWidth(VARIANT_FALSE,312);
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

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

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access2007\\sample.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
spG2antt1->GetColumns()->GetItem(long(2))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
spG2antt1->GetColumns()->GetItem(long(4))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
spG2antt1->GetColumns()->GetItem(long(1))->PutSortOrder(EXG2ANTTLib::SortAscending);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Position")));
	var_Column->PutFormatColumn(L"1 apos ''");
	var_Column->PutVisible(VARIANT_FALSE);
spG2antt1->GetConditionalFormats()->Add(L"(%C13 mod 5) = 1",vtMissing)->PutBackColor(RGB(128,128,128));
spG2antt1->GetConditionalFormats()->Add(L"(%C13 mod 5) = 2",vtMissing)->PutBackColor(RGB(164,164,164));
spG2antt1->GetConditionalFormats()->Add(L"(%C13 mod 5) = 3",vtMissing)->PutBackColor(RGB(190,190,190));
spG2antt1->GetConditionalFormats()->Add(L"(%C13 mod 5) = 4",vtMissing)->PutBackColor(RGB(240,240,240));
spG2antt1->EndUpdate();

1719:
The BackColorAlternate displays each second row with a different background color. The question I have it is possible to apply a different background color for 3rd, 4th, row, and so on

// 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->AddBar(Item,"Task",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
}

// LayoutChanged event - Occurs when column's position or column's size is changed.
void OnLayoutChangedG2antt1()
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Refresh();
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(1994,9,1,0,00,00).operator DATE());
spG2antt1->GetChart()->PutPaneWidth(VARIANT_FALSE,312);
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

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

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access2007\\sample.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
spG2antt1->GetColumns()->GetItem(long(2))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
spG2antt1->GetColumns()->GetItem(long(4))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
spG2antt1->GetColumns()->GetItem(long(1))->PutSortOrder(EXG2ANTTLib::SortAscending);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Position")));
	var_Column->PutFormatColumn(L"1 apos ''");
	var_Column->PutVisible(VARIANT_FALSE);
spG2antt1->GetConditionalFormats()->Add(L"(%C13 mod 4) = 0",vtMissing)->PutBackColor(RGB(240,240,240));
spG2antt1->EndUpdate();

1718:
The BackColorAlternate looks fine for flat tables, but how about using it when displaying a hierarchy/tree, like grouping rows. The sample alternate colors for each group found

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void OnAddGroupItemG2antt1(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->AddBar(Item,"Summary",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
		var_Items->DefineSummaryBars(Item,"",-3,"");
}

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->AddBar(Item,"Task",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
}

// LayoutChanged event - Occurs when column's position or column's size is changed.
void OnLayoutChangedG2antt1()
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Refresh();
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(1994,9,1,0,00,00).operator DATE());
spG2antt1->GetChart()->PutPaneWidth(VARIANT_FALSE,312);
spG2antt1->PutBackColorSortBar(spG2antt1->GetBackColor());
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

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

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access2007\\sample.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
spG2antt1->GetColumns()->GetItem(long(2))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
spG2antt1->GetColumns()->GetItem(long(4))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
spG2antt1->PutSortBarVisible(VARIANT_TRUE);
spG2antt1->PutSortBarCaption(L"Drag a <b>column</b> header here to group by that column.");
spG2antt1->PutAllowGroupBy(VARIANT_TRUE);
spG2antt1->GetColumns()->GetItem(long(1))->PutSortOrder(EXG2ANTTLib::SortAscending);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Position")));
	var_Column->PutFormatColumn(L"(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))");
	var_Column->PutVisible(VARIANT_FALSE);
spG2antt1->GetConditionalFormats()->Add(L"(%C13 mod 2) != 0",vtMissing)->PutBackColor(RGB(240,240,240));
spG2antt1->EndUpdate();

1717:
How do I show the chart's labels in 24-hour clock 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();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(3);
	EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0);
		var_Level->PutLabel("<%mmm%> <%d%>, <%yyyy%>");
		var_Level->PutAlignment(EXG2ANTTLib::AlignmentEnum(EXG2ANTTLib::exHOutside | EXG2ANTTLib::CenterAlignment));
		var_Level->PutUnit(EXG2ANTTLib::exDay);
	EXG2ANTTLib::ILevelPtr var_Level1 = var_Chart->GetLevel(1);
		var_Level1->PutLabel("<b><%h%>:00</b>");
		var_Level1->PutAlignment(EXG2ANTTLib::CenterAlignment);
		var_Level1->PutUnit(EXG2ANTTLib::exHour);
		var_Level1->PutDrawTickLines(EXG2ANTTLib::exLevelDefaultLine);
		var_Level1->PutDrawGridLines(VARIANT_TRUE);
	EXG2ANTTLib::ILevelPtr var_Level2 = var_Chart->GetLevel(2);
		var_Level2->PutLabel("<%nn%>");
		var_Level2->PutUnit(EXG2ANTTLib::exMinute);
		var_Level2->PutCount(15);
	var_Chart->ScrollTo(COleDateTime(2001,1,1,8,30,00).operator DATE(),long(0));

1716:
How do I show the chart's labels in 12-hour clock 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();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(3);
	EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0);
		var_Level->PutLabel("<%mmm%> <%d%>, <%yyyy%>");
		var_Level->PutAlignment(EXG2ANTTLib::AlignmentEnum(EXG2ANTTLib::exHOutside | EXG2ANTTLib::CenterAlignment));
		var_Level->PutUnit(EXG2ANTTLib::exDay);
	EXG2ANTTLib::ILevelPtr var_Level1 = var_Chart->GetLevel(1);
		var_Level1->PutLabel("<b><%h%>:00</b> <%AM/PM%>");
		var_Level1->PutAlignment(EXG2ANTTLib::CenterAlignment);
		var_Level1->PutUnit(EXG2ANTTLib::exHour);
		var_Level1->PutDrawTickLines(EXG2ANTTLib::exLevelDefaultLine);
		var_Level1->PutDrawGridLines(VARIANT_TRUE);
	EXG2ANTTLib::ILevelPtr var_Level2 = var_Chart->GetLevel(2);
		var_Level2->PutLabel("<%nn%>");
		var_Level2->PutUnit(EXG2ANTTLib::exMinute);
		var_Level2->PutCount(15);
	var_Chart->ScrollTo(COleDateTime(2001,1,1,8,30,00).operator DATE(),long(0));

1715:
I would like to avoid manual typing in the date-cell because user often type wrong things (no decimal points and so on) and so the todays-date is generated for the cell. What can be done

// KeyPress event - Occurs when the user presses and releases an ANSI key.
void OnKeyPressG2antt1(short FAR*   KeyAscii)
{
	/*
		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();
	OutputDebugStringW( L"if .Editying != 0 then" );
	OutputDebugStringW( _bstr_t(spG2antt1->GetEditing()) );
	KeyAscii = 0;
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Tasks");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start")));
		var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
		var_Column->GetEditor()->PutEditType(EXG2ANTTLib::DateType);
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"End")));
		var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
		var_Column1->GetEditor()->PutEditType(EXG2ANTTLib::DateType);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE());
	var_Chart->PutAllowLinkBars(VARIANT_TRUE);
	var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar);
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,196);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,24,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2006,9,22,0,00,00).operator DATE(),COleDateTime(2006,9,25,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2006,9,23,0,00,00).operator DATE(),COleDateTime(2006,9,26,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1714:
When a Day, Week etc is clicked how can we make it centre/zoom the chart to cover all the bars

// OverviewZoom event - Occurs once the user selects a new time scale unit in the overview zoom area.
void OnOverviewZoomG2antt1()
{
	/*
		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::IChartPtr var_Chart = spG2antt1->GetChart();
		var_Chart->ScrollTo(COleDateTime(2001,1,1,0,00,00).operator DATE(),long(1));
		OutputDebugStringW( L"Start" );
		OutputDebugStringW( _bstr_t(var_Chart->GetStartPrintDate()) );
		OutputDebugStringW( L"End" );
		OutputDebugStringW( _bstr_t(var_Chart->GetEndPrintDate()) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutLevelCount(2);
	var_Chart->PutOverviewVisible(EXG2ANTTLib::exOverviewShowAllVisible);
	var_Chart->PutAllowOverviewZoom(EXG2ANTTLib::exAlwaysZoom);
	var_Chart->PutLabel(EXG2ANTTLib::exSecond,L"");
	var_Chart->PutLabel(EXG2ANTTLib::exMinute,L"");
	var_Chart->PutLabel(EXG2ANTTLib::exHour,L"");
	var_Chart->PutUnitScale(EXG2ANTTLib::exDay);
	var_Chart->ScrollTo(COleDateTime(2001,1,1,0,00,00).operator DATE(),long(1));
	var_Chart->MarkTimeZone("zone",COleDateTime(2001,1,1,0,00,00).operator DATE(),COleDateTime(2001,1,2,0,00,00).operator DATE(),long(10516548),vtMissing);
spG2antt1->GetColumns()->Add(L"Default");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Item 1"),"Task",COleDateTime(2000,12,15,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2001,1,1,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1713:
The first time we run the application, the day label headers looks different then pressing Week and then Day again on the control's overview part. How do we make to show the header in the same 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();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutLevelCount(2);
	var_Chart->PutOverviewVisible(EXG2ANTTLib::exOverviewShowAllVisible);
	var_Chart->PutAllowOverviewZoom(EXG2ANTTLib::exAlwaysZoom);
	var_Chart->PutLabel(EXG2ANTTLib::exSecond,L"");
	var_Chart->PutLabel(EXG2ANTTLib::exMinute,L"");
	var_Chart->PutLabel(EXG2ANTTLib::exHour,L"");
	var_Chart->PutUnitScale(EXG2ANTTLib::exDay);

1712:
How to sort numerically by columns

/*
	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"Numeric")))->PutSortType(EXG2ANTTLib::SortNumeric);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem(long(1));
	var_Items->AddItem(long(2));
	var_Items->AddItem(long(12));
	var_Items->AddItem(long(22));
spG2antt1->GetColumns()->GetItem(long(0))->PutSortOrder(EXG2ANTTLib::SortAscending);
spG2antt1->EndUpdate();

1711:
The control does not ensure the item to fit the control's client area once the user clicks the cell's button or check box. What can be done
// MouseDown event - Occurs when the user presses a mouse button.
void OnMouseDownG2antt1(short   Button,short   Shift,long   X,long   Y)
{
	// Items.EnsureVisibleItem(ItemFromPoint(-1,-1,c,hit))
}

/*
	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->PutTreeColumnIndex(-1);
spG2antt1->PutSelForeColor(spG2antt1->GetForeColor());
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Buttons")));
	var_Column->PutAlignment(EXG2ANTTLib::CenterAlignment);
	var_Column->PutDef(EXG2ANTTLib::exCellHasButton,VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Button A");
	var_Items->AddItem("Button B");
	var_Items->AddItem("Button C");
spG2antt1->EndUpdate();

1710:
How do I arrange the levels when the user changes the scale using the control's overview part

// OverviewZoom event - Occurs once the user selects a new time scale unit in the overview zoom area.
void OnOverviewZoomG2antt1()
{
	/*
		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();
	OutputDebugStringW( _bstr_t(spG2antt1->GetChart()->GetUnitScale()) );
	spG2antt1->EnsureVisibleColumn(long(0));
	EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
		var_Chart->GetLevel(0)->PutDrawTickLines(EXG2ANTTLib::exLevelNoLine);
		var_Chart->ScrollTo(COleDateTime(2015,11,18,0,00,00).operator DATE(),long(1));
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2015,11,18,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutLevelCount(2);
	var_Chart->PutDrawLevelSeparator(EXG2ANTTLib::exLevelSolidLine);
	EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0);
		var_Level->PutAlignment(EXG2ANTTLib::AlignmentEnum(EXG2ANTTLib::exHOutside | EXG2ANTTLib::CenterAlignment));
		var_Level->PutDrawTickLines(EXG2ANTTLib::exLevelSolidLine);
		var_Level->PutBackColor(spG2antt1->GetBackColor());
	EXG2ANTTLib::ILevelPtr var_Level1 = var_Chart->GetLevel(1);
		var_Level1->PutDrawTickLines(EXG2ANTTLib::LevelLineEnum(EXG2ANTTLib::exLevelMiddleLine | EXG2ANTTLib::exLevelDotLine));
		var_Level1->DrawTickLinesFrom(0,EXG2ANTTLib::exLevelSolidLine);
	var_Chart->PutOverviewVisible(EXG2ANTTLib::exOverviewShowAllVisible);
	var_Chart->PutAllowOverviewZoom(EXG2ANTTLib::exAlwaysZoom);
	var_Chart->PutUnitWidth(24);
	var_Chart->PutLabel(EXG2ANTTLib::exSecond,L"");
	var_Chart->PutLabel(EXG2ANTTLib::exMinute,L"");
	var_Chart->PutLabel(EXG2ANTTLib::exHour,L"");
	var_Chart->PutLabel(EXG2ANTTLib::exWeek,L"");
	var_Chart->PutLabel(EXG2ANTTLib::exDay,L"<|><%d%><|><%d3%>, <%m3%> <%d%>, '<%yy%><|><%dddd%>, <%mmmm%> <%d%>, <%yyyy%><||><||>4096");
	var_Chart->PutUnitScale(EXG2ANTTLib::exDay);
	var_Chart->ScrollTo(var_Chart->GetFirstVisibleDate(),long(1));
spG2antt1->GetColumns()->Add(L"Default");
spG2antt1->EndUpdate();

1709:
I am using AllowGroupBy, the question is it is possible to add summary bars for child item, when user do grouping

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void OnAddGroupItemG2antt1(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->AddBar(Item,"Summary",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
		var_Items->DefineSummaryBars(Item,"",-3,"");
}

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->AddBar(Item,"Task",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(1994,9,1,0,00,00).operator DATE());
spG2antt1->PutBackColorSortBar(spG2antt1->GetBackColor());
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

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

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access2007\\sample.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->PutSortBarVisible(VARIANT_TRUE);
spG2antt1->PutSortBarCaption(L"Drag a <b>column</b> header here to group by that column.");
spG2antt1->PutAllowGroupBy(VARIANT_TRUE);
spG2antt1->GetColumns()->GetItem(long(1))->PutSortOrder(EXG2ANTTLib::SortAscending);
spG2antt1->EndUpdate();

1708:
I noticed that when grouping on a field, its details are always expanded. Is it possible to show collapsed by default (method 3)

// 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->AddBar(Item,"Task",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(1994,9,1,0,00,00).operator DATE());
spG2antt1->PutBackColorSortBar(spG2antt1->GetBackColor());
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

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

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access2007\\sample.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->PutSortBarVisible(VARIANT_TRUE);
spG2antt1->PutSortBarCaption(L"Drag a <b>column</b> header here to group by that column.");
spG2antt1->PutAllowGroupBy(VARIANT_TRUE);
spG2antt1->GetChart()->PutShowCollapsedBars(VARIANT_TRUE);
spG2antt1->EndUpdate();
spG2antt1->PutLayout(L"multiplesort=\"C1:1\";collapse=\"0-9999\"");

1707:
I noticed that when grouping on a field, its details are always expanded. Is it possible to show collapsed by default (method 2)

// 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->AddBar(Item,"Task",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(1994,9,1,0,00,00).operator DATE());
spG2antt1->PutBackColorSortBar(spG2antt1->GetBackColor());
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

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

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access2007\\sample.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->PutSortBarVisible(VARIANT_TRUE);
spG2antt1->PutSortBarCaption(L"Drag a <b>column</b> header here to group by that column.");
spG2antt1->PutAllowGroupBy(VARIANT_TRUE);
spG2antt1->GetColumns()->GetItem(long(1))->PutSortOrder(EXG2ANTTLib::SortAscending);
spG2antt1->EndUpdate();
spG2antt1->BeginUpdate();
spG2antt1->EnsureVisibleColumn(long(0));
spG2antt1->GetItems()->PutExpandItem(0,VARIANT_FALSE);
spG2antt1->EndUpdate();

1706:
I noticed that when grouping on a field, its details are always expanded. Is it possible to show collapsed by default (method 1)

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void OnAddGroupItemG2antt1(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();
	spG2antt1->GetItems()->PutExpandItem(Item,VARIANT_FALSE);
}

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->AddBar(Item,"Task",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(1994,9,1,0,00,00).operator DATE());
spG2antt1->PutBackColorSortBar(spG2antt1->GetBackColor());
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

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

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access2007\\sample.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->PutSortBarVisible(VARIANT_TRUE);
spG2antt1->PutSortBarCaption(L"Drag a <b>column</b> header here to group by that column.");
spG2antt1->PutAllowGroupBy(VARIANT_TRUE);
spG2antt1->GetColumns()->GetItem(long(1))->PutSortOrder(EXG2ANTTLib::SortAscending);
spG2antt1->EndUpdate();

1705:
Is there a possibility to expand / collapse all groups (or group by group) at runtime with a method (equivalent to pressing the + or - button in the group header)

// 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->AddBar(Item,"Task",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(1994,9,1,0,00,00).operator DATE());
spG2antt1->PutBackColorSortBar(spG2antt1->GetBackColor());
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

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

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access2007\\sample.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->PutSortBarVisible(VARIANT_TRUE);
spG2antt1->PutSortBarCaption(L"Drag a <b>column</b> header here to group by that column.");
spG2antt1->PutAllowGroupBy(VARIANT_TRUE);
spG2antt1->GetColumns()->GetItem(long(1))->PutSortOrder(EXG2ANTTLib::SortAscending);
spG2antt1->EndUpdate();
spG2antt1->EnsureVisibleColumn(long(0));
spG2antt1->BeginUpdate();
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutExpandItem(var_Items->GetRootItem(0),VARIANT_FALSE);
	var_Items->PutExpandItem(var_Items->GetRootItem(1),VARIANT_FALSE);
	var_Items->PutExpandItem(var_Items->GetRootItem(2),VARIANT_FALSE);
spG2antt1->EndUpdate();

1704:
Is there a possibility to expand / collapse all groups (or group by group) at runtime with a method (equivalent to pressing the + or - button in the group header)

// 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->AddBar(Item,"Task",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(1994,9,1,0,00,00).operator DATE());
spG2antt1->PutBackColorSortBar(spG2antt1->GetBackColor());
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

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

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access2007\\sample.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->PutSortBarVisible(VARIANT_TRUE);
spG2antt1->PutSortBarCaption(L"Drag a <b>column</b> header here to group by that column.");
spG2antt1->PutAllowGroupBy(VARIANT_TRUE);
spG2antt1->GetColumns()->GetItem(long(1))->PutSortOrder(EXG2ANTTLib::SortAscending);
spG2antt1->EndUpdate();
spG2antt1->BeginUpdate();
spG2antt1->EnsureVisibleColumn(long(0));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutExpandItem(var_Items->GetFirstVisibleItem(),VARIANT_FALSE);
spG2antt1->EndUpdate();

1703:
How can I move automatically a bar once another is moved ( non-working 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->PutMarkSearchColumn(VARIANT_FALSE);
spG2antt1->PutOnResizeControl(EXG2ANTTLib::exResizeChart);
spG2antt1->GetColumns()->Add(L"Tasks");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Start")))->PutVisible(VARIANT_FALSE);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"End")))->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->Add(L"Task:Split");
		var_Bar->PutShortcut(L"TSplit");
		var_Bar->PutDef(EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	var_Items->PutCellValue(h,long(1),COleDateTime(2006,9,22,0,00,00).operator DATE());
	var_Items->PutCellValue(h,long(2),COleDateTime(2006,10,3,0,00,00).operator DATE());
	var_Items->AddBar(h,"Summary",var_Items->GetCellValue(h,long(1)),var_Items->GetCellValue(h,long(2)),vtMissing,vtMissing);
	long h1 = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->PutCellValue(h1,long(1),var_Items->GetCellValue(h,long(1)));
	var_Items->PutCellValue(h1,long(2),COleDateTime(2006,9,26,0,00,00).operator DATE());
	var_Items->AddBar(h1,"TSplit",var_Items->GetCellValue(h1,long(1)),var_Items->GetCellValue(h1,long(2)),vtMissing,vtMissing);
	long h2 = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->PutCellValue(h2,long(1),var_Items->GetCellValue(h1,long(2)));
	var_Items->PutCellValue(h2,long(2),COleDateTime(2006,9,28,0,00,00).operator DATE());
	var_Items->AddBar(h2,"TSplit",var_Items->GetCellValue(h2,long(1)),var_Items->GetCellValue(h2,long(2)),vtMissing,vtMissing);
	var_Items->AddLink("L1",h1,"",h2,"");
	long h3 = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->PutCellValue(h3,long(1),var_Items->GetCellValue(h2,long(2)));
	var_Items->PutCellValue(h3,long(2),var_Items->GetCellValue(h,long(2)));
	var_Items->AddBar(h3,"TSplit",var_Items->GetCellValue(h3,long(1)),var_Items->GetCellValue(h3,long(2)),vtMissing,vtMissing);
	var_Items->AddLink("L2",h2,"",h3,"");
	var_Items->GroupBars(h1,"",VARIANT_FALSE,h2,"",VARIANT_TRUE,long(7),vtMissing);
	var_Items->GroupBars(h2,"",VARIANT_FALSE,h3,"",VARIANT_TRUE,long(7),vtMissing);
	var_Items->DefineSummaryBars(h,"",h1,"");
	var_Items->DefineSummaryBars(h,"",h2,"");
	var_Items->DefineSummaryBars(h,"",h3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutItemBold(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

1702:
How can I get notified once the user expands a column

// LayoutChanged event - Occurs when column's position or column's size is changed.
void OnLayoutChangedG2antt1()
{
	/*
		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();
	OutputDebugStringW( L"Column-Expanded" );
	OutputDebugStringW( _bstr_t(spG2antt1->GetColumns()->GetItem("C0")->GetExpanded()) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutShowFocusRect(VARIANT_FALSE);
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines);
spG2antt1->PutBackColorLevelHeader(spG2antt1->GetBackColor());
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"C0")));
		var_Column->PutExpandColumns(L"0,1,2");
		var_Column->PutDisplayExpandButton(VARIANT_TRUE);
	var_Columns->Add(L"C1");
	var_Columns->Add(L"C2");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Cell 0.0");
	var_Items->PutCellValue(h,long(1),"Cell 0.1");
	var_Items->PutCellValue(h,long(2),"Cell 0.2");
	h = var_Items->AddItem("Cell 1.0");
	var_Items->PutCellValue(h,long(1),"Cell 1.1");
	var_Items->PutCellValue(h,long(2),"Cell 1.2");
spG2antt1->EndUpdate();

1701:
I am using expandable headers, the question is how I can display the column itself, not just the child columns

/*
	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_FALSE);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines);
spG2antt1->PutBackColorLevelHeader(spG2antt1->GetBackColor());
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"C0")));
		var_Column->PutExpandColumns(L"0,1,2");
		var_Column->PutDisplayExpandButton(VARIANT_TRUE);
	var_Columns->Add(L"C1");
	var_Columns->Add(L"C2");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Cell 0.0");
	var_Items->PutCellValue(h,long(1),"Cell 0.1");
	var_Items->PutCellValue(h,long(2),"Cell 0.2");
	h = var_Items->AddItem("Cell 1.0");
	var_Items->PutCellValue(h,long(1),"Cell 1.1");
	var_Items->PutCellValue(h,long(2),"Cell 1.2");
spG2antt1->EndUpdate();

1700:
How do I layout expandable columns

/*
	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_FALSE);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines);
spG2antt1->PutBackColorLevelHeader(spG2antt1->GetBackColor());
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"C0")));
		var_Column->PutExpandColumns(L"1,2");
		var_Column->PutDisplayExpandButton(VARIANT_TRUE);
	var_Columns->Add(L"C1");
	var_Columns->Add(L"C2");
	var_Columns->Add(L"C3");
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"C4")));
		var_Column1->PutExpandColumns(L"5,6");
		var_Column1->PutDisplayExpandButton(VARIANT_TRUE);
	var_Columns->Add(L"C5");
	EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"C6")));
		var_Column2->PutExpandColumns(L"6,7");
		var_Column2->PutDisplayExpandButton(VARIANT_TRUE);
	var_Columns->Add(L"C7");
spG2antt1->EndUpdate();
spG2antt1->GetColumns()->GetItem("C4")->PutExpanded(VARIANT_FALSE);

1699:
Is it possible to display automatically the start/end margins of the 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();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<%=%1%>");
		var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(16));
		var_Bar->PutDef(EXG2ANTTLib::exBarExtraCaption,"<%=%2%>");
		var_Bar->PutDef(EXG2ANTTLib::exBarExtraCaptionHAlign,long(18));
	var_Chart->ScrollTo(var_Chart->GetFirstVisibleDate(),long(1));
spG2antt1->GetColumns()->Add(L"Task");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"ToolTip")))->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Item 1");
	var_Items->PutCellValue(h,long(1),"bar <b>a");
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,29,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),vtMissing,vtMissing);
	h = var_Items->AddItem("Item 2");
	var_Items->PutCellValue(h,long(1),"bar <b>b");
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,30,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1698:
Is it possible to assign the bar's caption from a hidden 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();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<%=%C1%>");
		var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
spG2antt1->GetColumns()->Add(L"Task");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"ToolTip")))->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Item 1");
	var_Items->PutCellValue(h,long(1),"bar <b>a");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),vtMissing,vtMissing);
	h = var_Items->AddItem("Item 2");
	var_Items->PutCellValue(h,long(1),"bar <b>b");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1697:
Is it possible to assign the bar's tooltip from a hidden 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();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	var_Chart->GetBars()->GetItem("Task")->PutDef(EXG2ANTTLib::exBarToolTip,"<%=%C1%>");
spG2antt1->GetColumns()->Add(L"Task");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"ToolTip")))->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Item 1");
	var_Items->PutCellValue(h,long(1),"This is a bit of text that's shown when the cursor hovers the bar on item 1.");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),vtMissing,vtMissing);
	h = var_Items->AddItem("Item 2");
	var_Items->PutCellValue(h,long(1),"This is a bit of text that's shown when the cursor hovers the bar on item 2.");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1696:
I am using exBarFrameColor, but no black frame is shown. What could be wrong (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();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Default");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarFrameColor,long(65536));
spG2antt1->EndUpdate();

1695:
I am using exBarFrameColor, but no black frame is shown. What could be wrong (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();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->GetBars()->GetItem("Task")->PutDef(EXG2ANTTLib::exBarFrameColor,long(65536));
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Default"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1694:
What I need is bars that have a solid color, but with a black frame. How can we do that

/*
	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(22);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
EXG2ANTTLib::IBarPtr var_Bar = spG2antt1->GetChart()->GetBars()->Add(L"Frame");
	var_Bar->PutPattern(EXG2ANTTLib::exPatternSolid);
	var_Bar->PutColor(RGB(0,255,0));
	var_Bar->PutDef(EXG2ANTTLib::exBarFrameColor,long(65536));
	var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<font ;6><%=%C0%>");
	var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
	var_Bar->PutHeight(15);
spG2antt1->GetColumns()->Add(L"Frames");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Default"),"Frame",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	long h = var_Items->AddItem("Inside Color");
	var_Items->AddBar(h,"Frame",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarColor,long(255));
	h = var_Items->AddItem("Border Color");
	var_Items->AddBar(h,"Frame",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarFrameColor,long(33023));
	h = var_Items->AddItem("Inside/Border Color");
	var_Items->AddBar(h,"Frame",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarColor,long(16711680));
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarFrameColor,long(33023));
	h = var_Items->AddItem("Thick-Border");
	var_Items->AddBar(h,"Frame",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarPattern,long(4097));
	h = var_Items->AddItem("Thick-Border + Pattern");
	var_Items->AddBar(h,"Frame",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarPattern,long(4098));
spG2antt1->EndUpdate();

1693:
How can we drag bars from one item to the other

/*
	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(22);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Members")))->PutDef(EXG2ANTTLib::exCellValueFormat,long(1));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE());
	var_Chart->PutAllowLinkBars(VARIANT_FALSE);
	var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar);
	var_Chart->PutAllowSelectObjects(EXG2ANTTLib::exNoSelectObjects);
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutOverlaidType(EXG2ANTTLib::OverlaidBarsTypeEnum(EXG2ANTTLib::exOverlaidBarsIncludeCaption | EXG2ANTTLib::exOverlaidBarsStackAutoArrange | EXG2ANTTLib::exOverlaidBarsStack));
		var_Bar->PutHeight(18);
		var_Bar->PutPattern(EXG2ANTTLib::exPatternSolid);
		var_Bar->PutColor(RGB(0,128,255));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Member <b>1</b>");
	var_Items->AddBar(h,"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,23,0,00,00).operator DATE(),"T102","<font ;6><fgcolor FFFFFF>Task <b>102</b>");
	var_Items->PutItemBar(h,"T102",EXG2ANTTLib::exBarCanMoveToAnother,VARIANT_TRUE);
	h = var_Items->AddItem("Member <b>2</b>");
	h = var_Items->AddItem("Member <b>3</b>");
	h = var_Items->AddItem("Member <b>4</b>");
	var_Items->AddBar(h,"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,23,0,00,00).operator DATE(),"T103","<font ;6><fgcolor FFFFFF>Task <b>103</b>");
	var_Items->PutItemBar(h,"T103",EXG2ANTTLib::exBarCanMoveToAnother,VARIANT_TRUE);
spG2antt1->EndUpdate();

1692:
How can I use the exBarBackgroundExt option of the Items.ItemBar property

/*
	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(26);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutNonworkingDays(0);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->GetBars()->GetItem("Task")->PutHeight(22);
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Border-Top");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"top[3,back=RGB(0,0,0)]");
	h = var_Items->AddItem("Border-Bottom");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"bottom[3,back=RGB(255,0,0)]");
	h = var_Items->AddItem("Border-Left");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"left[6,back=RGB(0,255,0)]");
	h = var_Items->AddItem("Border-Right");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"right[6,back=RGB(0,0,255)]");
	h = var_Items->AddItem("Border-All");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"top[3,back=RGB(0,0,0)],right[3,back=RGB(0,0,255)],bottom[3,back=RGB(255,0,0)],left[3,back=RGB(0,255,0)],client");
	h = var_Items->AddItem("Middle");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"none[(25%,25%,50%,50%),back=RGB(255,0,0)]");
	h = var_Items->AddItem("Horizontal");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"none[(0,50%-2,100%,4),back=RGB(255,0,0)]");
	h = var_Items->AddItem("Vertical");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"none[(50%-2,0,4,100%),back=RGB(255,0,0)]");
	h = var_Items->AddItem("Mixt");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"[[patterncolor=RGB(255,0,0)](none[(4,4,100%-8,100%-8),pattern=0x006,patterncolor=RGB(255,0,0),frame=RGB(255,0,0),framethick])]");
	h = var_Items->AddItem("Misc");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"bottom[50%,pattern=10,frame]");
	h = var_Items->AddItem("Complex");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"left[10%](top[90%,back=RGB(0,0,0)]),top[30%,back=RGB(254,217,102)],client[back=RGB(91,156,212)]");
spG2antt1->EndUpdate();

1691:
Does the title of the cell's tooltip supports HTML 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();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"")));
	var_Column->PutCaption(L"");
	var_Column->PutHTMLCaption(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellToolTip(var_Items->AddItem("tooltip w/h different title"),long(0),_bstr_t("<c><b><fgcolor=FF0000>Title</fgcolor></b><br>This is bit of text that's shown when the user hovers the cell. This shows the tit") +
"le centered with a different color.");
spG2antt1->EndUpdate();

1690:
How do I specify a different title for the cell's 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->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"")));
	var_Column->PutCaption(L"This is the title");
	var_Column->PutHTMLCaption(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellToolTip(var_Items->AddItem("tooltip w/h different title"),long(0),L"This is bit of text that's shown when the user hovers the cell.");
spG2antt1->EndUpdate();

1689:
The cell's tooltip displays the column's caption in its title. How can I get ride of that

/*
	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::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"C1");
	var_Columns->Add(L"C2");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("tooltip w/h caption");
	var_Items->PutCellToolTip(h,long(0),L"This is bit of text that's shown when the user hovers the cell. This shows the column's caption in the title.");
	var_Items->PutCellValue(h,long(1),"tooltip no caption");
	var_Items->PutCellToolTip(h,long(1),L"This is bit of text that's shown when the user hovers the cell. This shows no column's caption in the title.");
EXG2ANTTLib::IColumnPtr var_Column = spG2antt1->GetColumns()->GetItem("C2");
	var_Column->PutHTMLCaption(var_Column->GetCaption());
	var_Column->PutCaption(L"");
spG2antt1->EndUpdate();

1688:
How can I programmatically show the column's filter

// RClick event - Fired when right mouse button is clicked
void OnRClickG2antt1()
{
	/*
		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();
	long i = spG2antt1->GetItemFromPoint(-1,-1,c,hit);
	spG2antt1->GetColumns()->GetItem(c)->ShowFilter("-1,-1,128,128");
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutShowFocusRect(VARIANT_FALSE);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Items ")));
	var_Column->PutDisplayFilterPattern(VARIANT_FALSE);
	var_Column->PutFilterList(EXG2ANTTLib::FilterListEnum(EXG2ANTTLib::exShowExclude | EXG2ANTTLib::exShowFocusItem | EXG2ANTTLib::exShowCheckBox));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Item 1");
	var_Items->AddItem("Item 2");
	var_Items->AddItem("Item 3");
spG2antt1->EndUpdate();

1687:
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 2)

// ColumnClick event - Fired after the user clicks on column's header.
void OnColumnClickG2antt1(LPDISPATCH   Column)
{
	// Column.SortOrder = 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->PutSortOnClick(EXG2ANTTLib::exDefaultSort);
	spG2antt1->GetColumns()->GetItem("Sort")->PutSortOrder(EXG2ANTTLib::SortAscending);
	spG2antt1->PutSortOnClick(EXG2ANTTLib::exUserSort);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSortOnClick(EXG2ANTTLib::exUserSort);
spG2antt1->GetColumns()->Add(L"Items");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Sort")))->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem("Item 1 (3)"),long(1),long(3));
	var_Items->PutCellValue(var_Items->AddItem("Item 2 (1)"),long(1),long(1));
	var_Items->PutCellValue(var_Items->AddItem("Item 3 (2)"),long(1),long(2));
spG2antt1->EndUpdate();

1686:
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 1)

// ColumnClick event - Fired after the user clicks on column's header.
void OnColumnClickG2antt1(LPDISPATCH   Column)
{
	// Column.SortOrder = 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->GetItems()->SortChildren(0,"Sort",VARIANT_TRUE);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSortOnClick(EXG2ANTTLib::exUserSort);
spG2antt1->GetColumns()->Add(L"Items");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Sort")))->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem("Item 1 (3)"),long(1),long(3));
	var_Items->PutCellValue(var_Items->AddItem("Item 2 (1)"),long(1),long(1));
	var_Items->PutCellValue(var_Items->AddItem("Item 3 (2)"),long(1),long(2));
spG2antt1->EndUpdate();

1685:
How do I get information about control's events
// Event event - Notifies the application once the control fires an event.
void OnEventG2antt1(long   EventID)
{
	/*
		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();
	OutputDebugStringW( _bstr_t(spG2antt1->ExecuteTemplate(L"EventParam(-2)")) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutAllowLinkBars(VARIANT_FALSE);
	var_Chart->GetBars()->GetItem("Task")->PutOverlaidType(EXG2ANTTLib::OverlaidBarsTypeEnum(EXG2ANTTLib::exOverlaidBarsTransparent | EXG2ANTTLib::exOverlaidBarsOffset));
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Item 1");
	var_Items->PutEnableItem(h,VARIANT_FALSE);
	var_Items->PutItemData(h,long(-1));
	h = var_Items->AddItem("Item 2");
	var_Items->PutItemData(h,long(0));
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"B",vtMissing);
	var_Items->PutItemBar(h,"B",EXG2ANTTLib::exBarCanMoveToAnother,VARIANT_TRUE);
	var_Items->PutItemData(var_Items->AddItem("Item 3"),long(0));
	h = var_Items->AddItem("Item 4");
	var_Items->PutEnableItem(h,VARIANT_FALSE);
	var_Items->PutItemData(h,long(-1));
spG2antt1->EndUpdate();

1684:
How can I sort by two-columns, one by date and one by 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->PutSingleSort(VARIANT_FALSE);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Index")))->PutFormatColumn(L"1 index ``");
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Date")))->PutSortType(EXG2ANTTLib::SortDate);
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Time")));
		var_Column->PutSortType(EXG2ANTTLib::SortTime);
		var_Column->PutFormatColumn(L"time(value)");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem(long(0));
	var_Items->PutCellValue(h,long(1),COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Items->PutCellValue(h,long(2),COleDateTime(2001,1,1,10,00,00).operator DATE());
	h = var_Items->AddItem(long(0));
	var_Items->PutCellValue(h,long(1),COleDateTime(2000,12,31,0,00,00).operator DATE());
	var_Items->PutCellValue(h,long(2),COleDateTime(2001,1,1,10,00,00).operator DATE());
	h = var_Items->AddItem(long(0));
	var_Items->PutCellValue(h,long(1),COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Items->PutCellValue(h,long(2),COleDateTime(2001,1,1,6,00,00).operator DATE());
	h = var_Items->AddItem(long(0));
	var_Items->PutCellValue(h,long(1),COleDateTime(2000,12,31,0,00,00).operator DATE());
	var_Items->PutCellValue(h,long(2),COleDateTime(2001,1,1,8,00,00).operator DATE());
	h = var_Items->AddItem(long(0));
	var_Items->PutCellValue(h,long(1),COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Items->PutCellValue(h,long(2),COleDateTime(2001,1,1,8,00,00).operator DATE());
	h = var_Items->AddItem(long(0));
	var_Items->PutCellValue(h,long(1),COleDateTime(2000,12,31,0,00,00).operator DATE());
	var_Items->PutCellValue(h,long(2),COleDateTime(2001,1,1,6,00,00).operator DATE());
spG2antt1->PutLayout(L"multiplesort=\"C1:1 C2:1\"");
spG2antt1->EndUpdate();

1683:
I am trying to hide the non-working dates by using the AddNonworkingDate to specify custom non-working dates while NonworkingDays property is 0, but the non-working date is still shown. What can be wrong

/*
	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->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutLevelCount(2);
	var_Chart->PutShowNonworkingUnits(VARIANT_FALSE);
	var_Chart->PutShowNonworkingDates(VARIANT_FALSE);
	var_Chart->PutNonworkingDays(128);
	var_Chart->AddNonworkingDate(COleDateTime(2008,1,7,0,00,00).operator DATE());
	var_Chart->AddNonworkingDate(COleDateTime(2008,1,8,0,00,00).operator DATE());
	var_Chart->AddNonworkingDate(COleDateTime(2008,1,9,0,00,00).operator DATE());
	var_Chart->AddNonworkingDate(COleDateTime(2008,1,10,0,00,00).operator DATE());
spG2antt1->EndUpdate();

1682:
How can I display the task's duration, in days, hours and minutes

/*
	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 var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutAllowSizing(VARIANT_FALSE);
	var_Column->PutWidth(36);
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Duration")));
	var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(513));
	var_Column1->PutFormatColumn(_bstr_t("((1:=int(0:= (value))) != 0 ? (=:1 + ' day(s)') : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != 0 ") +
"? =:1 + ' hour(s)' : '' ) + (=:1 ? ' ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,148);
	var_Chart->PutFirstVisibleDate(COleDateTime(2009,4,6,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutUnitScale(EXG2ANTTLib::exHour);
	var_Chart->PutResizeUnitScale(EXG2ANTTLib::exMinute);
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("T1"),"Task",COleDateTime(2009,4,6,2,30,00).operator DATE(),COleDateTime(2009,4,6,12,35,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("T2"),"Task",COleDateTime(2009,4,6,9,00,00).operator DATE(),COleDateTime(2009,4,6,10,10,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1681:
Does your control support working half-hour/minutes/seconds

/*
	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 var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutAllowSizing(VARIANT_FALSE);
	var_Column->PutWidth(36);
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Working")));
	var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(258));
	var_Column1->PutFormatColumn(_bstr_t("((1:=int(0:= (value))) != 0 ? (=:1 + ' day(s)') : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != 0 ") +
"? =:1 + ' hour(s)' : '' ) + (=:1 ? ' ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2009,4,6,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,148);
	var_Chart->PutLevelCount(2);
	var_Chart->PutUnitScale(EXG2ANTTLib::exHour);
	var_Chart->PutResizeUnitScale(EXG2ANTTLib::exMinute);
	var_Chart->PutResizeUnitCount(15);
	var_Chart->PutNonworkingHours(15728767);
	var_Chart->PutShowNonworkingDates(VARIANT_FALSE);
	var_Chart->PutShowNonworkingUnits(VARIANT_FALSE);
	EXG2ANTTLib::IBarsPtr var_Bars = var_Chart->GetBars();
		var_Bars->GetItem("Task")->PutDef(EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE);
		var_Bars->Add(L"Task:Split")->PutShortcut(L"Task");
	var_Chart->PutAllowLinkBars(VARIANT_FALSE);
	var_Chart->PutUnitWidth(26);
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("T1");
	var_Items->PutItemNonworkingUnits(h,VARIANT_FALSE,L"(weekday(value) in (1,2,3,4,5) and (timeF(value)<\"09:30\"  or timeF(value)>=\"17:30\")) or (weekday(value) in (0,6))");
	var_Items->AddBar(h,"Task",COleDateTime(2009,4,6,10,00,00).operator DATE(),COleDateTime(2009,4,6,12,30,00).operator DATE(),vtMissing,vtMissing);
	h = var_Items->AddItem("T2");
	var_Items->PutItemNonworkingUnits(h,VARIANT_FALSE,L"(weekday(value) in (1,2,3,4,5) and (timeF(value)<\"08:00\"  or timeF(value)>=\"16:00\")) or (weekday(value) in (0,6))");
	var_Items->AddBar(h,"Task",COleDateTime(2009,4,6,9,30,00).operator DATE(),COleDateTime(2009,4,6,10,45,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

1680:
How can I programmatically move a bar to a specified 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();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Original");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"key",vtMissing);
	h = var_Items->AddItem("Moved");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"key",vtMissing);
	_variant_t duration = var_Items->GetItemBar(h,"key",EXG2ANTTLib::exBarDuration);
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"key",vtMissing);
	var_Items->PutItemBar(h,"key",EXG2ANTTLib::exBarDuration,duration);
spG2antt1->EndUpdate();

1679:
How can I programmatically move a bar, with a specified ammount
/*
	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->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Original");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"key",vtMissing);
	h = var_Items->AddItem("Moved");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"key",vtMissing);
	var_Items->PutItemBar(h,"key",EXG2ANTTLib::exBarMove,long(3));
spG2antt1->EndUpdate();

1678:
How can I programmatically move a bar to a specified date-time (auto-adjust spans over a non-working period)

/*
	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->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	EXG2ANTTLib::IBarsPtr var_Bars = var_Chart->GetBars();
		var_Bars->GetItem("Task")->PutDef(EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE);
		var_Bars->Add(L"Task:Split")->PutShortcut(L"Task");
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Original");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"key",vtMissing);
	h = var_Items->AddItem("Moved");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"key",vtMissing);
	_variant_t workingCount = var_Items->GetItemBar(h,"key",EXG2ANTTLib::exBarWorkingCount);
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"key",vtMissing);
	var_Items->PutItemBar(h,"key",EXG2ANTTLib::exBarWorkingCount,workingCount);
spG2antt1->EndUpdate();

1677:
How can I programmatically move a bar, with a specified ammount (auto-adjust spans over a non-working period)

/*
	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->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	EXG2ANTTLib::IBarsPtr var_Bars = var_Chart->GetBars();
		var_Bars->GetItem("Task")->PutDef(EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE);
		var_Bars->Add(L"Task:Split")->PutShortcut(L"Task");
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Original");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"key",vtMissing);
	h = var_Items->AddItem("Moved");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"key",vtMissing);
	var_Items->PutItemBar(h,"key",EXG2ANTTLib::exBarMove,long(3));
spG2antt1->EndUpdate();

1676:
How can I show a secondary curve, line in the control's histogram

/*
	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");
spG2antt1->PutAntiAliasing(VARIANT_TRUE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday);
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,40);
	var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,9,0,00,00).operator DATE());
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	var_Chart->PutHistogramView(EXG2ANTTLib::HistogramViewEnum(EXG2ANTTLib::exHistogramNoGrouping | EXG2ANTTLib::exHistogramAllItems));
	var_Chart->PutHistogramHeight(128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutHistogramPattern(var_Bar->GetPattern());
		var_Bar->PutHistogramType(EXG2ANTTLib::exHistOverload);
		var_Bar->PutHistogramItems(8);
		var_Bar->PutHistogramRulerLinesColor(RGB(0,0,1));
	var_Chart->GetLevel(1)->PutLabel("<font ;3><%d%>");
	var_Chart->PutUnitWidth(9);
	EXG2ANTTLib::IBarPtr var_Bar1 = var_Chart->GetBars()->GetItem("Summary");
		var_Bar1->PutHistogramPattern(EXG2ANTTLib::exRoundCurve);
		var_Bar1->PutHistogramColor(RGB(255,0,0));
		var_Bar1->PutHistogramType(EXG2ANTTLib::exHistOverload);
		var_Bar1->PutHistogramItems(8);
		var_Bar1->PutHistogramBorderSize(1);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutLockedItemCount(EXG2ANTTLib::exTop,1);
	long h = var_Items->GetLockedItem(EXG2ANTTLib::exTop,0);
	var_Items->PutItemHeight(h,0);
	var_Items->AddBar(h,"Summary",COleDateTime(2005,1,1,0,00,00).operator DATE(),COleDateTime(2005,12,31,0,00,00).operator DATE(),"1",vtMissing);
	var_Items->PutItemBar(h,"1",EXG2ANTTLib::exBarEffort,"(value mod 31) array (1,1,1,2,1,2.5,3,4,5,4,3,2,1,2,2,3,4.5,4,5,6,7,6,1,2,3,1,1,1,2,3,2,2)");
	h = var_Items->AddItem("Task");
	var_Items->AddBar(h,"Task",COleDateTime(2005,6,10,0,00,00).operator DATE(),COleDateTime(2005,7,16,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarEffort,"weekday(value) in (0,6) ? 0.25 : 2");
	h = var_Items->AddItem("Task");
	var_Items->AddBar(h,"Task",COleDateTime(2005,6,18,0,00,00).operator DATE(),COleDateTime(2005,7,21,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarEffort,"weekday(value) = 1 ? 2.5 : .5");
spG2antt1->EndUpdate();

1675:
How can I add an owner-draw bar
// AfterDrawPart event - Occurs right after drawing the part of the control.
void OnAfterDrawPartG2antt1(long   Part,long   hDC,long   X,long   Y,long   Width,long   Height)
{
	OutputDebugStringW( L"AfterDrawPart" );
	/*
		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();
	OutputDebugStringW( L"Part" );
	OutputDebugStringW( spG2antt1->GetItems()->GetCellCaption(spG2antt1->GetDrawPartItem(),long(0)) );
	OutputDebugStringW( _bstr_t(spG2antt1->GetDrawPartKey()) );
}

// BeforeDrawPart event - Occurs just before drawing a part of the control.
void OnBeforeDrawPartG2antt1(long   Part,long   hDC,long FAR*   X,long FAR*   Y,long FAR*   Width,long FAR*   Height,BOOL FAR*   Cancel)
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	Cancel = VARIANT_TRUE;
	OutputDebugStringW( L"BeforeDrawPart" );
	OutputDebugStringW( L"Part" );
	OutputDebugStringW( spG2antt1->GetItems()->GetCellCaption(spG2antt1->GetDrawPartItem(),long(0)) );
	OutputDebugStringW( _bstr_t(spG2antt1->GetDrawPartKey()) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutLevelCount(2);
	var_Chart->GetBars()->Add(L"OwnerDraw");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Draw-Item-Bar-1"),"OwnerDraw",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Draw-Item-Bar-2"),"OwnerDraw",COleDateTime(2001,1,6,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(0,"<*>",EXG2ANTTLib::exBarSelected,VARIANT_TRUE);
spG2antt1->EndUpdate();

1674:
Is it possible to show a status left or right to the bar (method 2, exBarFrameColor, EBN)

/*
	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->Add(2,_bstr_t("gBFLBCJwBAEHhEJAAChABP0IQAAYAQGKIaBoAKBQAGaAoDDYMQyQwAAxDOKsEwsACEIrjKCRShyCYZRrGUQyAKESRAGyTJBlKKodgOLYYSrFcgSIAsEhqGASRZGUBIJ") +
"DEMI4AJPIwxNIDfyNGKWI6gOQKIoSCYlU7IED0fQNGxVF6XaYqYAIRDINQlVzXcQzPYEbRxCKLKppWqIfpuSIBgI=");
	var_Appearance->Add(1,"CP:2 -8 -1 0 0");
	var_Appearance->Add(3,"CP:2 0 -1 0 0");
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Red-Status-Outside");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarFrameColor,long(16777471));
	h = var_Items->AddItem("Blue-Status-Outside");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarFrameColor,long(33488896));
	h = var_Items->AddItem("Red-Status-Inside");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarFrameColor,long(50331903));
	h = var_Items->AddItem("Blue-Status-Inside");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarFrameColor,long(67043328));
spG2antt1->EndUpdate();

1673:
Is it possible to show a status left or right to the bar (method 1, exBarBackgroundExt)

/*
	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");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Red-Left-Status-Inside");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,"left[6,back=RGB(255,0,0)]");
	h = var_Items->AddItem("Blue-Left-Status-Inside");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,"left[6,back=RGB(0,0,255)]");
	h = var_Items->AddItem("Red-Right-Status-Inside");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,"right[6,back=RGB(255,0,0)]");
	h = var_Items->AddItem("Blue-Right-Status-Inside");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,"right[6,back=RGB(0,0,255)]");
spG2antt1->EndUpdate();

1672:
How can I use the ItemBar(exBarBackgroundExt) property for a bar

/*
	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(31);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines);
spG2antt1->PutGridLineColor(RGB(224,224,224));
spG2antt1->PutBackColorLevelHeader(spG2antt1->GetBackColor());
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->GetLevel(0)->PutGridLineColor(spG2antt1->GetGridLineColor());
	var_Chart->GetLevel(1)->PutGridLineColor(spG2antt1->GetGridLineColor());
	var_Chart->PutShowNonworkingDates(VARIANT_FALSE);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->GetBars()->GetItem("Task")->PutHeight(21);
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Normal");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	h = var_Items->AddItem("Red-Frame-Inside");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,"[frame=RGB(255,0,0),framethick]");
	h = var_Items->AddItem("LR-Margins");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,"left[4,back=RGB(0,255,0)],right[4,back=RGB(0,0,255)]");
	h = var_Items->AddItem("LR-Margins (front)");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,"left[4,back=RGB(0,255,0)],right[4,back=RGB(0,0,255)]");
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExtFlags,long(2));
	h = var_Items->AddItem("LR-Margins (back)");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,"left[4,back=RGB(0,255,0)],right[4,back=RGB(0,0,255)]");
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExtFlags,long(3));
	h = var_Items->AddItem("TB-Margins");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,"top[4,back=RGB(255,0,0)],bottom[4,back=RGB(0,255,0)]");
	h = var_Items->AddItem("TB-Margins");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,"top[2,back=RGB(255,0,0)],bottom[2,back=RGB(0,255,0)]");
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExtFlags,long(2));
	h = var_Items->AddItem("Caption(back)");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,11,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,"client(bottom[14,text=`<sha ;;0><font ;8>background`,align=0x11])");
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExtFlags,long(2));
	h = var_Items->AddItem("Pattern-Outside");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,"bottom[10%,pattern=7,frame]");
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExtFlags,long(2));
	h = var_Items->AddItem("Pattern-Inside");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,13,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,"bottom[7,pattern=3,frame]");
	h = var_Items->AddItem("Pattern-Inside-Caption");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,_bstr_t("top[4](left[4],right[4],client),bottom[4](left[4],right[4],client),left[4],right[4],client(left[75%,text=`<fgcolor FFFFFF>75%`,") +
"align=0x11,pattern=0x001,frame=RGB(255,0,0)])");
	h = var_Items->AddItem("Complex(back)");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,11,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,"top[30%,back=RGB(253,218,101)],client[back=RGB(91,157,210)],none[(0%,0%,10%,100%)](top[90%,back=RGB(0,0,0)])");
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExtFlags,long(3));
	h = var_Items->AddItem("Complex(inside)");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarBackgroundExt,"top[30%,back=RGB(253,218,101)],client[back=RGB(91,157,210)],none[(0%,0%,10%,100%)](top[90%,back=RGB(0,0,0)])");
spG2antt1->EndUpdate();

1671:
How can display seconds

/*
	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::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,17,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutUnitScale(EXG2ANTTLib::exSecond);
	var_Chart->GetLevel(0)->PutAlignment(EXG2ANTTLib::AlignmentEnum(EXG2ANTTLib::exHOutside | EXG2ANTTLib::CenterAlignment));
	var_Chart->GetLevel(1)->PutFormatLabel(L"(0:=sec(dvalue)) mod 10 ? 0=: : '<c><font ;6>sec<br><b>' + 0=:");
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2008,1,17,0,00,02).operator DATE(),COleDateTime(2008,1,17,0,00,08).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2008,1,17,0,00,05).operator DATE(),COleDateTime(2008,1,17,0,00,15).operator DATE(),vtMissing,vtMissing);

1670:
How can I check if an item contains a bar
// 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();
		OutputDebugStringW( L"Count of A: " );
		OutputDebugStringW( _bstr_t(var_Items->GetItemBar(var_Items->GetFocusItem(),"A",EXG2ANTTLib::exBarsCount)) );
		OutputDebugStringW( L"Count of B: " );
		OutputDebugStringW( _bstr_t(var_Items->GetItemBar(var_Items->GetFocusItem(),"B",EXG2ANTTLib::exBarsCount)) );
		OutputDebugStringW( L"Count of C: " );
		OutputDebugStringW( _bstr_t(var_Items->GetItemBar(var_Items->GetFocusItem(),"C",EXG2ANTTLib::exBarsCount)) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->GetBars()->GetItem("Task")->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A","A");
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"B","B");
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"C","C");
spG2antt1->EndUpdate();

1669:
How can I connect to a DBF file
/*
	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_FALSE);
spG2antt1->PutContinueColumnScroll(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

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

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADODB.Recordset");
	rs->Open("Select * From foxcode.DBF","Provider=vfpoledb;Data Source=C:\\Program Files\\Microsoft Visual FoxPro 9\\",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spG2antt1->EndUpdate();

1668:
How do I get the caption with no HTML 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->GetColumns()->Add(L"Default");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("This is a bit of <b>HTML-formatted</b> text");
	var_Items->PutCellValueFormat(h,long(0),EXG2ANTTLib::exHTML);
	var_Items->AddItem(var_Items->GetCellCaption(h,long(0)));

1667:
How can I change the bar's color based on its length/duration

/*
	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::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Tasks");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Duration")));
		var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(513));
		var_Column->GetEditor()->PutEditType(EXG2ANTTLib::SpinType);
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,6,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"%1 >= 4",vtMissing);
	var_ConditionalFormat->PutApplyTo(EXG2ANTTLib::FormatApplyToEnum(0x1));
	var_ConditionalFormat->PutBold(VARIANT_TRUE);
	var_ConditionalFormat->PutApplyToBars(L"Task");
	var_ConditionalFormat->PutBarColor(RGB(255,0,0));
	var_ConditionalFormat->PutForeColor(var_ConditionalFormat->GetBarColor());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,10,0,00,00).operator DATE(),COleDateTime(2005,6,13,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,11,0,00,00).operator DATE(),COleDateTime(2005,6,16,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,12,0,00,00).operator DATE(),COleDateTime(2005,6,15,0,00,00).operator DATE(),"",vtMissing);
spG2antt1->EndUpdate();

1666:
Is it possible to colorize the bars based on its starting/ending date

/*
	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->PutOnResizeControl(EXG2ANTTLib::OnResizeControlEnum(EXG2ANTTLib::exDisableSplitter | EXG2ANTTLib::exResizeChart));
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Tasks");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start")));
		var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
		var_Column->PutVisible(VARIANT_FALSE);
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2005,5,31,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutAllowInsideZoom(VARIANT_TRUE);
	var_Chart->PutAllowResizeInsideZoom(VARIANT_FALSE);
	var_Chart->PutInsideZoomOnDblClick(VARIANT_FALSE);
	EXG2ANTTLib::IInsideZoomFormatPtr var_InsideZoomFormat = var_Chart->GetDefaultInsideZoomFormat();
		var_InsideZoomFormat->PutPatternChart(EXG2ANTTLib::exPatternBDiagonal);
		var_InsideZoomFormat->PutPatternColorChart(RGB(255,0,0));
		var_InsideZoomFormat->PutForeColor(var_InsideZoomFormat->GetPatternColorChart());
	EXG2ANTTLib::IInsideZoomsPtr var_InsideZooms = var_Chart->GetInsideZooms();
		var_InsideZooms->PutSplitBaseLevel(VARIANT_FALSE);
		var_InsideZooms->PutDefaultWidth(18);
		var_InsideZooms->Add(COleDateTime(2005,6,10,0,00,00).operator DATE())->PutAllowInsideFormat(VARIANT_FALSE);
EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"%1 <= #6/10/2005#",vtMissing);
	var_ConditionalFormat->PutApplyToBars(L"Task");
	var_ConditionalFormat->PutBarColor(RGB(255,0,0));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,10,0,00,00).operator DATE(),COleDateTime(2005,6,14,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,11,0,00,00).operator DATE(),COleDateTime(2005,6,15,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,12,0,00,00).operator DATE(),COleDateTime(2005,6,16,0,00,00).operator DATE(),"",vtMissing);
spG2antt1->EndUpdate();

1665:
How can I change the bar's color based on values on the columns

// 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->AddBar(Item,"Task",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(1994,8,3,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
	var_Chart->PutLevelCount(2);
	var_Chart->PutUnitScale(EXG2ANTTLib::exDay);
	var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday);
	var_Chart->PutOverviewVisible(EXG2ANTTLib::exOverviewShowAllVisible);
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
spG2antt1->PutContinueColumnScroll(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

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

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Program Files\\Exontrol\\ExTree\\Sample\\VB\\SAMPLE.MDB",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
spG2antt1->GetColumns()->GetItem(long(2))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
spG2antt1->GetColumns()->GetItem(long(4))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
EXG2ANTTLib::IConditionalFormatsPtr var_ConditionalFormats = spG2antt1->GetConditionalFormats();
	EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = var_ConditionalFormats->Add(L"1",vtMissing);
		var_ConditionalFormat->PutApplyTo(EXG2ANTTLib::FormatApplyToEnum(0x1));
		var_ConditionalFormat->PutBold(VARIANT_TRUE);
		var_ConditionalFormat->PutBackColor(RGB(250,250,250));
	EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat1 = var_ConditionalFormats->Add(L"%1 = 5",vtMissing);
		var_ConditionalFormat1->PutApplyToBars(L"Task");
		var_ConditionalFormat1->PutBarColor(RGB(255,0,0));
		var_ConditionalFormat1->PutForeColor(RGB(255,0,0));
		var_ConditionalFormat1->PutBarOverviewColor(RGB(255,0,0));
	EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat2 = var_ConditionalFormats->Add(L"%1 = 3",vtMissing);
		var_ConditionalFormat2->PutApplyToBars(L"Task");
		var_ConditionalFormat2->PutBarColor(RGB(0,255,0));
		var_ConditionalFormat2->PutForeColor(RGB(0,255,0));
		var_ConditionalFormat2->PutBarOverviewColor(RGB(0,255,0));
spG2antt1->EndUpdate();

1664:
How can I display / specify a fixed percent for the task in the histogram, no matter how long the task is

/*
	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(32);
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutUnitWidth(32);
	var_Chart->PutLevelCount(2);
	var_Chart->PutNonworkingDays(0);
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE());
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	var_Chart->PutHistogramView(EXG2ANTTLib::exHistogramAllItems);
	var_Chart->PutHistogramHeight(64);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutHistogramPattern(var_Bar->GetPattern());
		var_Bar->PutHistogramType(EXG2ANTTLib::exHistOverAllocation);
		var_Bar->PutShowHistogramValues(L"1");
	EXG2ANTTLib::IBarPtr var_Bar1 = var_Chart->GetBars()->Copy(L"Task",L"TaskFixed");
		var_Bar1->PutHistogramType(EXG2ANTTLib::HistogramTypeEnum(EXG2ANTTLib::exHistOverAllocationFixed | EXG2ANTTLib::exHistOverAllocation));
		var_Bar1->PutShowHistogramValues(L"1");
	EXG2ANTTLib::IBarPtr var_Bar2 = var_Chart->GetBars()->Copy(L"Task",L"TaskMultiply");
		var_Bar2->PutHistogramType(EXG2ANTTLib::HistogramTypeEnum(EXG2ANTTLib::exHistOverAllocationMultiply | EXG2ANTTLib::exHistOverAllocation));
		var_Bar2->PutShowHistogramValues(L"1");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Allocation");
	var_Items->AddBar(h,"Task",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,6,23,0,00,00).operator DATE(),"A","Effort/Length");
	var_Items->PutItemBar(h,"A",EXG2ANTTLib::exBarEffort,double(0.25));
	var_Items->PutItemBar(h,"A",EXG2ANTTLib::exBarVAlignCaption,long(18));
	var_Items->AddBar(h,"TaskFixed",COleDateTime(2005,6,24,0,00,00).operator DATE(),COleDateTime(2005,6,26,0,00,00).operator DATE(),"B","Effort");
	var_Items->PutItemBar(h,"B",EXG2ANTTLib::exBarEffort,double(0.25));
	var_Items->PutItemBar(h,"B",EXG2ANTTLib::exBarVAlignCaption,long(18));
	var_Items->AddBar(h,"TaskMultiply",COleDateTime(2005,6,27,0,00,00).operator DATE(),COleDateTime(2005,6,29,0,00,00).operator DATE(),"C","Effort*Length");
	var_Items->PutItemBar(h,"C",EXG2ANTTLib::exBarEffort,double(0.25));
	var_Items->PutItemBar(h,"C",EXG2ANTTLib::exBarVAlignCaption,long(18));
spG2antt1->EndUpdate();

1663:
Does your control supports scrolling by touching the screen

// 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->AddBar(Item,"Task",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(1994,8,3,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
	var_Chart->PutLevelCount(2);
	var_Chart->PutUnitScale(EXG2ANTTLib::exDay);
	var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday);
	var_Chart->PutOverviewVisible(EXG2ANTTLib::exOverviewShowAllVisible);
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
spG2antt1->PutContinueColumnScroll(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

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

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access2007\\sample.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
spG2antt1->GetColumns()->GetItem(long(2))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
spG2antt1->GetColumns()->GetItem(long(4))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
spG2antt1->PutContinueColumnScroll(VARIANT_TRUE);
spG2antt1->PutScrollBySingleLine(VARIANT_TRUE);
spG2antt1->GetChart()->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar);
spG2antt1->PutAutoDrag(EXG2ANTTLib::AutoDragEnum(EXG2ANTTLib::exAutoDragScrollOnShortTouch | EXG2ANTTLib::exAutoDragScroll));
spG2antt1->EndUpdate();

1662:
Is it possible to use build-in zoom-functionality to zoom time periods spanning to just some hours of one day (zoom-onfly)

/*
	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");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutUnitScale(EXG2ANTTLib::exDay);
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines);
	var_Chart->PutAllowZoomOnFly(EXG2ANTTLib::exZoomOnFly);
	var_Chart->PutResizeUnitScale(EXG2ANTTLib::exHour);
	var_Chart->PutResizeUnitCount(4);
	var_Chart->PutLabel(EXG2ANTTLib::exHour,L"<font ;5><b><%h%><br><%AM/PM%></b></font><||>4<||>65536");
	var_Chart->PutZoomOnFlyCaption(L"<br><c><b><font ;12><%=%C0%>");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task 1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,7,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"T1","T1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,11,0,00,00).operator DATE(),COleDateTime(2001,1,14,0,00,00).operator DATE(),"T3","T3");
	h = var_Items->AddItem(vtMissing);
	var_Items->AddBar(h,"",COleDateTime(2001,1,15,0,00,00).operator DATE(),COleDateTime(2001,1,15,0,00,00).operator DATE(),"","Focus the chart ( click here ), and press the <b>CTRL + SHIFT</b>, so the Zoom-OnFly is shown.");
	var_Items->PutSelectableItem(h,VARIANT_FALSE);
spG2antt1->EndUpdate();

1661:
Is it possible to use build-in zoom-functionality to zoom time periods spanning to just some hours of one day (inside-zoom)

/*
	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->PutUnitScale(EXG2ANTTLib::exDay);
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE());
	EXG2ANTTLib::IInsideZoomFormatPtr var_InsideZoomFormat = var_Chart->GetDefaultInsideZoomFormat();
		var_InsideZoomFormat->PutInsideLabel(L"<%hh%>");
		var_InsideZoomFormat->PutInsideUnit(EXG2ANTTLib::exHour);
		var_InsideZoomFormat->PutInsideCount(8);
	var_Chart->PutAllowInsideZoom(VARIANT_TRUE);
	EXG2ANTTLib::IInsideZoomsPtr var_InsideZooms = var_Chart->GetInsideZooms();
		var_InsideZooms->Add(COleDateTime(2008,1,4,0,00,00).operator DATE());
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines);
spG2antt1->EndUpdate();

1660:
How can I export the control's content to a PDF document (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->PutMarkSearchColumn(VARIANT_FALSE);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Tasks");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start")));
		var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
		var_Column->GetEditor()->PutEditType(EXG2ANTTLib::SpinType);
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"End")));
		var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
		var_Column1->GetEditor()->PutEditType(EXG2ANTTLib::SpinType);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,196);
	var_Chart->PutLevelCount(2);
	var_Chart->PutShowEmptyBars(1);
	var_Chart->PutFirstVisibleDate(COleDateTime(2009,1,1,0,00,00).operator DATE());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2009,1,2,0,00,00).operator DATE(),COleDateTime(2009,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2009,1,4,0,00,00).operator DATE(),COleDateTime(2009,1,9,0,00,00).operator DATE(),vtMissing,vtMissing);
/*
	Includes the definition for CreateObject function like follows:

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

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

	#import <ExPrint.dll>
	using namespace EXPRINTLib;
*/
EXPRINTLib::IExPrintPtr var_Print = ::CreateObject(L"Exontrol.Print");
	var_Print->PutPrintExt(((EXG2ANTTLib::IG2anttPtr)(spG2antt1)));
	var_Print->CopyTo(L"c:/temp/xtest.pdf");
OutputDebugStringW( L"Look for C:\\Temp\\xtest.pdf file." );
spG2antt1->EndUpdate();

1659:
How can I export the control's content to a PDF document (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->PutMarkSearchColumn(VARIANT_FALSE);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Tasks");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start")));
		var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
		var_Column->GetEditor()->PutEditType(EXG2ANTTLib::SpinType);
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"End")));
		var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
		var_Column1->GetEditor()->PutEditType(EXG2ANTTLib::SpinType);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,196);
	var_Chart->PutLevelCount(2);
	var_Chart->PutShowEmptyBars(1);
	var_Chart->PutFirstVisibleDate(COleDateTime(2009,1,1,0,00,00).operator DATE());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2009,1,2,0,00,00).operator DATE(),COleDateTime(2009,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2009,1,4,0,00,00).operator DATE(),COleDateTime(2009,1,9,0,00,00).operator DATE(),vtMissing,vtMissing);
_variant_t var_CopyTo = spG2antt1->GetCopyTo(L"c:/temp/xtest.pdf");
OutputDebugStringW( L"Look for C:\\Temp\\xtest.pdf file." );
spG2antt1->EndUpdate();

1658:
Today date is shown, if we use the Column.FormatColumn and Editor.Option(exDateAllowNullDate) properties. What can be done

/*
	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 var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Date")));
	var_Column->PutFormatColumn(_bstr_t("len(value) ? ( (longdate(date(value)) left 3) + ' ' + day(date(value)) + '/' + month(date(value)) + '/' + (year(date(value)) ri") +
"ght 2) ) : '' )");
	EXG2ANTTLib::IEditorPtr var_Editor = var_Column->GetEditor();
		var_Editor->PutEditType(EXG2ANTTLib::DateType);
		var_Editor->PutOption(EXG2ANTTLib::exDateAllowNullDate,VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem(COleDateTime(2012,5,12,0,00,00).operator DATE());
	var_Items->AddItem(vtMissing);
	var_Items->AddItem(COleDateTime(2012,5,14,0,00,00).operator DATE());
spG2antt1->EndUpdate();

1657:
Is there a syntax for conditional formatting of items, based on CellState/CellStateChange

// 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->PutCellValue(Item,long(2),var_Items->GetCellState(Item,long(0)));
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutShowFocusRect(VARIANT_FALSE);
spG2antt1->PutSelBackMode(EXG2ANTTLib::exTransparent);
EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"%2 != 0",vtMissing);
	var_ConditionalFormat->PutBold(VARIANT_TRUE);
	var_ConditionalFormat->PutForeColor(RGB(255,0,0));
	var_ConditionalFormat->PutApplyTo(EXG2ANTTLib::exFormatToItems);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutWidth(16);
	var_Column->PutAllowSizing(VARIANT_FALSE);
spG2antt1->GetColumns()->Add(L"Information");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Hidden")))->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem(""),long(1),"This is a bit of text associated");
	long h = var_Items->AddItem("");
	var_Items->PutCellValue(h,long(1),"This is a bit of text associated");
	var_Items->PutCellState(h,long(0),1);
	var_Items->PutCellValue(var_Items->AddItem(""),long(1),"This is a bit of text associated");
spG2antt1->EndUpdate();

1656:
How can I hide the items/grid section 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->PutOnResizeControl(EXG2ANTTLib::OnResizeControlEnum(EXG2ANTTLib::exDisableSplitter | EXG2ANTTLib::exResizeChart));
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,9,0,00,00).operator DATE());
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	var_Chart->PutHistogramView(EXG2ANTTLib::exHistogramAllItems);
	var_Chart->PutHistogramHeight(128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutHistogramPattern(var_Bar->GetPattern());
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,10,0,00,00).operator DATE(),COleDateTime(2005,6,14,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,11,0,00,00).operator DATE(),COleDateTime(2005,6,15,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,12,0,00,00).operator DATE(),COleDateTime(2005,6,16,0,00,00).operator DATE(),"",vtMissing);
spG2antt1->EndUpdate();

1655:
How can I draw an extra line which could indicate deadline for my tasks

/*
	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(24);
EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance();
	var_Appearance->Add(2,_bstr_t("gBFLBCJwBAEHhEJAAChABLMIQAAYAQGKIaBoAKBQAGaAoDDQOQ4QwAAxjAKUEwsACEIrjKCYVgOHYYRrIIEvZAAMIlSbCMoxcAsSQSf6YJBmKL4fiWMobRCMQyiLLMd") +
"wiGoYJ4hGgKChqI43RZNErURRkEwCgIA=");
	var_Appearance->Add(1,"CP:2 0 -4 0 4");
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Default");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarFrameColor,long(16777471));
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,9,0,00,00).operator DATE(),COleDateTime(2001,1,14,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarFrameColor,long(33488896));
spG2antt1->EndUpdate();

1654:
How can I mark/highlight a zone in the control's histogram

/*
	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->PutFirstWeekDay(EXG2ANTTLib::exMonday);
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,40);
	var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,9,0,00,00).operator DATE());
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	var_Chart->PutHistogramView(EXG2ANTTLib::exHistogramAllItems);
	var_Chart->PutHistogramHeight(128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutHistogramPattern(var_Bar->GetPattern());
		var_Bar->PutHistogramType(EXG2ANTTLib::exHistOverload);
		var_Bar->PutHistogramItems(12);
		var_Bar->PutHistogramRulerLinesColor(RGB(0,0,1));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,10,0,00,00).operator DATE(),COleDateTime(2005,6,14,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,11,0,00,00).operator DATE(),COleDateTime(2005,6,15,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,12,0,00,00).operator DATE(),COleDateTime(2005,6,16,0,00,00).operator DATE(),"",vtMissing);
spG2antt1->GetChart()->MarkTimeZone("zone",COleDateTime(2005,6,13,0,00,00).operator DATE(),COleDateTime(2005,6,14,0,00,00).operator DATE(),long(15790320),";;;;histogram;1");
spG2antt1->EndUpdate();

1653:
How can I get the min/max values from the histogram
// MouseMove event - Occurs when the user moves the mouse.
void OnMouseMoveG2antt1(short   Button,short   Shift,long   X,long   Y)
{
	/*
		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::IChartPtr var_Chart = spG2antt1->GetChart();
		OutputDebugStringW( L"Value" );
		OutputDebugStringW( _bstr_t(var_Chart->GetHistogramValue(var_Chart->GetDateFromPoint(-1,-1),vtMissing,vtMissing)) );
		OutputDebugStringW( L"MIN" );
		OutputDebugStringW( _bstr_t(var_Chart->GetHistogramValue("min",vtMissing,vtMissing)) );
		OutputDebugStringW( L"MAX" );
		OutputDebugStringW( _bstr_t(var_Chart->GetHistogramValue("max",vtMissing,vtMissing)) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday);
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,40);
	var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,