901:
How can I include the child items, when a filter is applied

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutColumnAutoResize(VARIANT_TRUE);
spGantt1->PutContinueColumnScroll(VARIANT_FALSE);
spGantt1->PutMarkSearchColumn(VARIANT_FALSE);
spGantt1->PutSearchColumnIndex(1);
spGantt1->PutIndent(16);
spGantt1->PutLinesAtRoot(EXGANTTLib::exLinesAtRoot);
spGantt1->PutFilterBarPromptVisible(VARIANT_TRUE);
spGantt1->PutFilterBarPromptPattern(L"Nancy");
spGantt1->PutFilterInclude(EXGANTTLib::exItemsWithChilds);
spGantt1->GetChart()->PutLevelCount(2);
EXGANTTLib::IColumnsPtr var_Columns = spGantt1->GetColumns();
	((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96);
	((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96);
	var_Columns->Add(L"City");
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	long h0 = var_Items->AddItem("Nancy Davolio");
	var_Items->PutCellCaption(h0,long(1),"Sales Representative");
	var_Items->PutCellCaption(h0,long(2),"Seattle");
	h0 = var_Items->InsertItem(h0,vtMissing,"Andrew Fuller");
	var_Items->PutCellCaption(h0,long(1),"Vice President, Sales");
	var_Items->PutCellCaption(h0,long(2),"Tacoma");
	h0 = var_Items->InsertItem(h0,vtMissing,"Michael Suyama");
	var_Items->PutCellCaption(h0,long(1),"Sales Representative");
	var_Items->PutCellCaption(h0,long(2),"London");
	h0 = var_Items->AddItem("Janet Leverling");
	var_Items->PutCellCaption(h0,long(1),"Sales Representative");
	var_Items->PutCellCaption(h0,long(2),"Kirkland");
	h0 = var_Items->InsertItem(h0,vtMissing,"Margaret Peacock");
	var_Items->PutCellCaption(h0,long(1),"Sales Representative");
	var_Items->PutCellCaption(h0,long(2),"Redmond");
spGantt1->ApplyFilter();
spGantt1->EndUpdate();

900:
How do I get sorted the column as string, numeric, date, date and time. Also how can it be applied to drop down filter panel

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Date")));
	var_Column->PutSortType(EXGANTTLib::SortDate);
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutDisplayFilterPattern(VARIANT_FALSE);
	var_Column->PutDisplayFilterDate(VARIANT_TRUE);
	var_Column->PutFilterList(EXGANTTLib::FilterListEnum(EXGANTTLib::exShowFocusItem | EXGANTTLib::exShowCheckBox | EXGANTTLib::exSortItemsDesc));
EXGANTTLib::IColumnPtr var_Column1 = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"DateTime")));
	var_Column1->PutSortType(EXGANTTLib::SortDateTime);
	var_Column1->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column1->PutDisplayFilterPattern(VARIANT_FALSE);
	var_Column1->PutFilterList(EXGANTTLib::FilterListEnum(EXGANTTLib::exShowFocusItem | EXGANTTLib::exShowCheckBox | EXGANTTLib::exSortItemsDesc));
EXGANTTLib::IColumnPtr var_Column2 = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Time")));
	var_Column2->PutSortType(EXGANTTLib::SortTime);
	var_Column2->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column2->PutDisplayFilterPattern(VARIANT_FALSE);
	var_Column2->PutFilterList(EXGANTTLib::FilterListEnum(EXGANTTLib::exShowFocusItem | EXGANTTLib::exShowCheckBox | EXGANTTLib::exSortItemsDesc));
	var_Column2->PutFormatColumn(L"time(value)");
EXGANTTLib::IColumnPtr var_Column3 = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Numeric")));
	var_Column3->PutSortType(EXGANTTLib::SortNumeric);
	var_Column3->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column3->PutFilterList(EXGANTTLib::FilterListEnum(EXGANTTLib::exShowFocusItem | EXGANTTLib::exShowCheckBox | EXGANTTLib::exSortItemsDesc));
EXGANTTLib::IColumnPtr var_Column4 = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"String")));
	var_Column4->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column4->PutFilterList(EXGANTTLib::FilterListEnum(EXGANTTLib::exShowFocusItem | EXGANTTLib::exShowCheckBox | EXGANTTLib::exSortItemsDesc));
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	long h = var_Items->AddItem(COleDateTime(2010,1,27,0,00,00).operator DATE());
	var_Items->PutCellCaption(h,long(1),COleDateTime(2010,1,27,10,00,00).operator DATE());
	var_Items->PutCellCaption(h,long(2),var_Items->GetCellCaption(h,long(1)));
	var_Items->PutCellCaption(h,long(3),long(1));
	var_Items->PutCellCaption(h,long(4),var_Items->GetCellCaption(h,long(3)));
	h = var_Items->AddItem(COleDateTime(2011,1,27,0,00,00).operator DATE());
	var_Items->PutCellCaption(h,long(1),COleDateTime(2011,1,27,9,00,00).operator DATE());
	var_Items->PutCellCaption(h,long(2),var_Items->GetCellCaption(h,long(1)));
	var_Items->PutCellCaption(h,long(3),long(11));
	var_Items->PutCellCaption(h,long(4),var_Items->GetCellCaption(h,long(3)));
	h = var_Items->AddItem(COleDateTime(2010,11,2,0,00,00).operator DATE());
	var_Items->PutCellCaption(h,long(1),COleDateTime(2010,11,2,9,00,00).operator DATE());
	var_Items->PutCellCaption(h,long(2),var_Items->GetCellCaption(h,long(1)));
	var_Items->PutCellCaption(h,long(3),long(2));
	var_Items->PutCellCaption(h,long(4),var_Items->GetCellCaption(h,long(3)));
spGantt1->GetColumns()->GetItem("DateTime")->PutDisplayFilterDate(VARIANT_FALSE);
spGantt1->EndUpdate();

899:
I am using Layout property to sort multiple columns at once. The problem is that all items get expanded. How do I prevent that

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutLinesAtRoot(EXGANTTLib::exLinesAtRoot);
EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"P1")));
	var_Column->PutDef(EXGANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
EXGANTTLib::IColumnPtr var_Column1 = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"P2")));
	var_Column1->PutDef(EXGANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column1->PutPartialCheck(VARIANT_TRUE);
	var_Column1->PutFormatColumn(L"1 index ``");
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->InsertItem(h,vtMissing,"Child A");
	var_Items->InsertItem(h,vtMissing,"Child B");
	var_Items->InsertItem(h,vtMissing,"Child A");
	var_Items->InsertItem(h,vtMissing,"Child B");
	var_Items->AddItem("Root");
	var_Items->AddItem("Root");
spGantt1->PutSingleSort(VARIANT_FALSE);
spGantt1->PutLayout(L"multiplesort=\"C0:1 C1:2\";collapse=\"\"");
spGantt1->EndUpdate();

898:
How can I get ride / hide the image being dragged by OLE Drag and Drop
// OLEStartDrag event - Occurs when the OLEDrag method is called.
void OnOLEStartDragGantt1(LPDISPATCH   Data,long FAR*   AllowedEffects)
{
	// Data.SetData("data to drag")
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'
		#import <ExGantt.dll>
		using namespace EXGANTTLib;
	*/
	EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
	AllowedEffects = 1;
}

EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->PutOLEDropMode(EXGANTTLib::exOLEDropManual);
spGantt1->PutBackground(EXGANTTLib::exDragDropAfter,RGB(255,255,255));
spGantt1->PutLinesAtRoot(EXGANTTLib::exLinesAtRoot);
spGantt1->GetColumns()->Add(L"Default");
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);

897:
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 3)

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutLinesAtRoot(EXGANTTLib::exLinesAtRoot);
spGantt1->PutDrawGridLines(EXGANTTLib::exRowLines);
spGantt1->PutAutoDrag(EXGANTTLib::exAutoDragPositionAny);
spGantt1->PutHasLines(EXGANTTLib::exSolidLine);
spGantt1->PutIndent(16);
spGantt1->PutMarkSearchColumn(VARIANT_FALSE);
EXGANTTLib::IColumnsPtr var_Columns = spGantt1->GetColumns();
	EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"")));
		var_Column->PutDef(EXGANTTLib::exCellCaptionFormat,long(1));
		var_Column->PutFormatColumn(L"((1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 + `` :  (=:0 mid (1 + 1 + =:1) )  + `)` ) + ` ` + value");
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->InsertItem(h,vtMissing,"Child");
	long hChild = var_Items->InsertItem(h,vtMissing,"Child");
	var_Items->InsertItem(hChild,vtMissing,"Child");
	var_Items->InsertItem(hChild,vtMissing,"Child");
	var_Items->InsertItem(hChild,vtMissing,"Child");
	var_Items->InsertItem(h,vtMissing,"Child");
	var_Items->PutExpandItem(0,VARIANT_TRUE);
	h = var_Items->AddItem("Root");
	var_Items->InsertItem(h,vtMissing,"Child");
	hChild = var_Items->InsertItem(h,vtMissing,"Child");
	var_Items->PutCellState(hChild,long(0),1);
	var_Items->InsertItem(hChild,vtMissing,"Child");
	var_Items->InsertItem(hChild,vtMissing,"Child");
	var_Items->InsertItem(hChild,vtMissing,"Child");
	var_Items->InsertItem(h,vtMissing,"Child");
spGantt1->EndUpdate();

896:
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 2)

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutLinesAtRoot(EXGANTTLib::exLinesAtRoot);
spGantt1->PutGridLineColor(RGB(190,190,190));
spGantt1->PutDrawGridLines(EXGANTTLib::exRowLines);
spGantt1->PutAutoDrag(EXGANTTLib::exAutoDragPositionAny);
spGantt1->PutHasLines(EXGANTTLib::exSolidLine);
spGantt1->PutIndent(16);
EXGANTTLib::IColumnsPtr var_Columns = spGantt1->GetColumns();
	var_Columns->Add(L"Default");
	EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"")));
		var_Column->PutDef(EXGANTTLib::exCellCaptionFormat,long(1));
		var_Column->PutDef(EXGANTTLib::exCellPaddingRight,long(4));
		var_Column->PutAllowSizing(VARIANT_FALSE);
		var_Column->PutWidth(36);
		var_Column->PutPosition(0);
		var_Column->PutFormatColumn(_bstr_t("(1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 : (`............` left 2 * (=:0 count `.`)) + (=:0 mid (1 + 1 + =") +
":1) ) ");
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->InsertItem(h,vtMissing,"Child");
	long hChild = var_Items->InsertItem(h,vtMissing,"Child");
	var_Items->InsertItem(hChild,vtMissing,"Child");
	var_Items->InsertItem(hChild,vtMissing,"Child");
	var_Items->InsertItem(hChild,vtMissing,"Child");
	var_Items->InsertItem(h,vtMissing,"Child");
	var_Items->PutExpandItem(0,VARIANT_TRUE);
	h = var_Items->AddItem("Root");
	var_Items->InsertItem(h,vtMissing,"Child");
	hChild = var_Items->InsertItem(h,vtMissing,"Child");
	var_Items->PutCellState(hChild,long(0),1);
	var_Items->InsertItem(hChild,vtMissing,"Child");
	var_Items->InsertItem(hChild,vtMissing,"Child");
	var_Items->InsertItem(hChild,vtMissing,"Child");
	var_Items->InsertItem(h,vtMissing,"Child");
spGantt1->EndUpdate();

895:
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 1)

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutLinesAtRoot(EXGANTTLib::exLinesAtRoot);
spGantt1->PutDrawGridLines(EXGANTTLib::exRowLines);
spGantt1->PutAutoDrag(EXGANTTLib::exAutoDragPositionAny);
spGantt1->PutHasLines(EXGANTTLib::exSolidLine);
spGantt1->PutIndent(16);
EXGANTTLib::IColumnsPtr var_Columns = spGantt1->GetColumns();
	var_Columns->Add(L"Default");
	EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"")));
		var_Column->PutDef(EXGANTTLib::exCellCaptionFormat,long(1));
		var_Column->PutDef(EXGANTTLib::exCellPaddingRight,long(4));
		var_Column->PutAlignment(EXGANTTLib::RightAlignment);
		var_Column->PutAllowSizing(VARIANT_FALSE);
		var_Column->PutWidth(24);
		var_Column->PutPosition(0);
		var_Column->PutFormatColumn(L"(1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 : `<i>` + (=:0 mid (1 + 1 + =:1) ) ");
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->InsertItem(h,vtMissing,"Child");
	long hChild = var_Items->InsertItem(h,vtMissing,"Child");
	var_Items->InsertItem(hChild,vtMissing,"Child");
	var_Items->InsertItem(hChild,vtMissing,"Child");
	var_Items->InsertItem(hChild,vtMissing,"Child");
	var_Items->InsertItem(h,vtMissing,"Child");
	var_Items->PutExpandItem(0,VARIANT_TRUE);
	h = var_Items->AddItem("Root");
	var_Items->InsertItem(h,vtMissing,"Child");
	hChild = var_Items->InsertItem(h,vtMissing,"Child");
	var_Items->PutCellState(hChild,long(0),1);
	var_Items->InsertItem(hChild,vtMissing,"Child");
	var_Items->InsertItem(hChild,vtMissing,"Child");
	var_Items->InsertItem(hChild,vtMissing,"Child");
	var_Items->InsertItem(h,vtMissing,"Child");
spGantt1->EndUpdate();

894:
Is it possible to have a different alignment for parts of the cell's caption

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutTreeColumnIndex(-1);
spGantt1->PutDrawGridLines(EXGANTTLib::exRowLines);
spGantt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Default")));
	var_Column->PutDef(EXGANTTLib::exCellHasCheckBox,VARIANT_TRUE);
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->PutCellHAlignment(var_Items->AddItem("all-left"),long(0),EXGANTTLib::LeftAlignment);
	var_Items->PutCellHAlignment(var_Items->AddItem("all-center"),long(0),EXGANTTLib::CenterAlignment);
	var_Items->PutCellHAlignment(var_Items->AddItem("all-right"),long(0),EXGANTTLib::RightAlignment);
	long h = var_Items->AddItem("left<c>center<r>right");
	var_Items->PutCellCaptionFormat(h,long(0),EXGANTTLib::exHTML);
spGantt1->EndUpdate();

893:
I have a column with Def(exCellSingleLine) property on False, word-wrapping, and I am wondering if possible to update the column's content while user is resizing it
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXGANTTLib::IColumnsPtr var_Columns = spGantt1->GetColumns();
	EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"MultipleLine")));
		var_Column->PutWidth(32);
		var_Column->PutDef(EXGANTTLib::exCellSingleLine,VARIANT_FALSE);
		var_Column->PutDef(EXGANTTLib::exColumnResizeContiguously,VARIANT_TRUE);
	EXGANTTLib::IColumnPtr var_Column1 = ((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"SingleLine")));
		var_Column1->PutDef(EXGANTTLib::exCellSingleLine,VARIANT_FALSE);
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->PutCellCaption(var_Items->AddItem("This is a bit of long text that should break the line"),long(1),"This is a bit of long text that should break the line");
spGantt1->EndUpdate();

892:
How do I sort the index column as numeric

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemGantt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'
		#import <ExGantt.dll>
		using namespace EXGANTTLib;
	*/
	EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
	EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
		var_Items->PutCellData(Item,long(1),var_Items->GetItemToIndex(Item));
}

EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutDrawGridLines(EXGANTTLib::exAllLines);
spGantt1->PutColumnAutoResize(VARIANT_TRUE);
spGantt1->PutShowFocusRect(VARIANT_FALSE);
EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Next")));
	var_Column->PutDef(EXGANTTLib::exCellPaddingLeft,long(4));
	var_Column->PutDef(EXGANTTLib::exHeaderPaddingLeft,long(4));
EXGANTTLib::IColumnPtr var_Column1 = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Index")));
	var_Column1->PutAllowSizing(VARIANT_FALSE);
	var_Column1->PutWidth(48);
	var_Column1->PutFormatColumn(L"(((0 := (1 index ``)) mod 3) case ( default: ``; 0 : `<r><fgcolor=B0B0B0>`; 1: ``; 2 : `<c><fgcolor=808080>` )) + str(=:0)");
	var_Column1->PutDef(EXGANTTLib::exCellCaptionFormat,long(1));
	var_Column1->PutSortType(EXGANTTLib::SortUserData);
	var_Column1->PutPosition(0);
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->AddItem("Item 1");
	var_Items->AddItem("Item 2");
	var_Items->AddItem("Item 3");
	var_Items->AddItem("Item 4");
	var_Items->AddItem("Item 5");
	var_Items->AddItem("Item 6");
	var_Items->AddItem("Item 7");
	var_Items->AddItem("Item 8");
	var_Items->AddItem("Item 9");
	var_Items->AddItem("Item 10");
spGantt1->EndUpdate();

891:
How can I put icons/images into buttons

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutColumnAutoResize(VARIANT_TRUE);
spGantt1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") +
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" +
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=");
EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"C+B")));
	var_Column->PutAllowSizing(VARIANT_FALSE);
	var_Column->PutWidth(48);
	var_Column->PutFormatColumn(L"` <img>` + ( 1 + (1 index ``) mod 3 ) + `</img> `");
	var_Column->PutDef(EXGANTTLib::exCellCaptionFormat,long(1));
	var_Column->PutDef(EXGANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutDef(EXGANTTLib::exCellHasButton,VARIANT_TRUE);
	var_Column->PutDef(EXGANTTLib::exCellButtonAutoWidth,VARIANT_TRUE);
spGantt1->GetColumns()->Add(L"");
spGantt1->PutDrawGridLines(EXGANTTLib::exVLines);
spGantt1->PutDefaultItemHeight(20);
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->AddItem("");
	var_Items->AddItem("");
	var_Items->AddItem("");
	var_Items->AddItem("");
	var_Items->AddItem("");
	var_Items->AddItem("");
	var_Items->AddItem("");
	var_Items->AddItem("");
spGantt1->EndUpdate();

890:
Is it possible to have a CheckBox and Button TOGETHER on all cells in a column

// CellButtonClick event - Fired after the user clicks on the cell of button type. 
void OnCellButtonClickGantt1(long   Item,long   ColIndex)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'
		#import <ExGantt.dll>
		using namespace EXGANTTLib;
	*/
	EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
	OutputDebugStringW( L"CellButtonClick" );
	OutputDebugStringW( L"Item" );
}

// CellStateChanged event - Fired after cell's state has been changed.
void OnCellStateChangedGantt1(long   Item,long   ColIndex)
{
	EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
	OutputDebugStringW( L"CellStateChanged" );
	OutputDebugStringW( L"Item" );
}

EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutColumnAutoResize(VARIANT_TRUE);
EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"")));
	var_Column->PutAllowSizing(VARIANT_FALSE);
	var_Column->PutWidth(32);
	var_Column->PutFormatColumn(L"1 index ``");
EXGANTTLib::IColumnPtr var_Column1 = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Def")));
	var_Column1->PutAllowSizing(VARIANT_FALSE);
	var_Column1->PutWidth(48);
	var_Column1->PutFormatColumn(L"`     `");
	var_Column1->PutDef(EXGANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column1->PutDef(EXGANTTLib::exCellHasButton,VARIANT_TRUE);
	var_Column1->PutDef(EXGANTTLib::exCellButtonAutoWidth,VARIANT_TRUE);
spGantt1->GetColumns()->Add(L"");
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->AddItem("");
	var_Items->AddItem("");
	var_Items->AddItem("");
	var_Items->AddItem("");
	var_Items->AddItem("");
	var_Items->AddItem("");
	var_Items->AddItem("");
	var_Items->AddItem("");
spGantt1->EndUpdate();

889:
Does filtering work with umlauts / accents characters
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Names")));
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutFilterType(EXGANTTLib::exPattern);
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->AddItem("Mantel");
	var_Items->AddItem("Mechanik");
	var_Items->AddItem("Motor");
	var_Items->AddItem("Murks");
	var_Items->AddItem("Märchen");
	var_Items->AddItem("Möhren");
	var_Items->AddItem("Mühle");
	var_Items->AddItem("Sérigraphie");
spGantt1->GetColumns()->GetItem(long(0))->PutFilter(L"*ä*");
spGantt1->ApplyFilter();
spGantt1->EndUpdate();

888:
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 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutColumnAutoResize(VARIANT_TRUE);
spGantt1->PutContinueColumnScroll(VARIANT_FALSE);
spGantt1->PutMarkSearchColumn(VARIANT_FALSE);
spGantt1->PutSearchColumnIndex(1);
spGantt1->PutFilterBarHeight(0);
spGantt1->PutFilterBarPromptVisible(VARIANT_TRUE);
spGantt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXGANTTLib::IColumnsPtr var_Columns = spGantt1->GetColumns();
	((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(96);
	((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"Title")))->PutWidth(96);
	var_Columns->Add(L"City");
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	long h0 = var_Items->AddItem("Nancy Davolio");
	var_Items->PutCellCaption(h0,long(1),"Sales Representative");
	var_Items->PutCellCaption(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Andrew Fuller");
	var_Items->PutCellCaption(h0,long(1),"Vice President, Sales");
	var_Items->PutCellCaption(h0,long(2),"Tacoma");
	var_Items->PutSelectItem(h0,VARIANT_TRUE);
	h0 = var_Items->AddItem("Janet Leverling");
	var_Items->PutCellCaption(h0,long(1),"Sales Representative");
	var_Items->PutCellCaption(h0,long(2),"Kirkland");
	h0 = var_Items->AddItem("Margaret Peacock");
	var_Items->PutCellCaption(h0,long(1),"Sales Representative");
	var_Items->PutCellCaption(h0,long(2),"Redmond");
	h0 = var_Items->AddItem("Steven Buchanan");
	var_Items->PutCellCaption(h0,long(1),"Sales Manager");
	var_Items->PutCellCaption(h0,long(2),"London");
	h0 = var_Items->AddItem("Michael Suyama");
	var_Items->PutCellCaption(h0,long(1),"Sales Representative");
	var_Items->PutCellCaption(h0,long(2),"London");
	h0 = var_Items->AddItem("Robert King");
	var_Items->PutCellCaption(h0,long(1),"Sales Representative");
	var_Items->PutCellCaption(h0,long(2),"London");
	h0 = var_Items->AddItem("Laura Callahan");
	var_Items->PutCellCaption(h0,long(1),"Inside Sales Coordinator");
	var_Items->PutCellCaption(h0,long(2),"Seattle");
	h0 = var_Items->AddItem("Anne Dodsworth");
	var_Items->PutCellCaption(h0,long(1),"Sales Representative");
	var_Items->PutCellCaption(h0,long(2),"London");
spGantt1->PutFilterBarPromptPattern(L"London");
spGantt1->EndUpdate();

887:
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 OnAddItemGantt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'
		#import <ExGantt.dll>
		using namespace EXGANTTLib;
	*/
	EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
	EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
		var_Items->SetParent(Item,var_Items->GetFindItem(var_Items->GetCellCaption(Item,"ReportsTo"),"EmployeeID",vtMissing));
}

EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spGantt1->PutLinesAtRoot(EXGANTTLib::exLinesAtRoot);
spGantt1->PutColumnAutoResize(VARIANT_FALSE);
spGantt1->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);
spGantt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGantt1->GetItems()->PutExpandItem(0,VARIANT_TRUE);
spGantt1->EndUpdate();

886:
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 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
EXGANTTLib::IChartPtr var_Chart = spGantt1->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(EXGANTTLib::exWeek);
	var_Chart->PutUnitWidth(32);
	var_Chart->PutFirstVisibleDate(COleDateTime(2016,1,1,0,00,00).operator DATE());
	var_Chart->PutWeekNumberAs(EXGANTTLib::exISO8601WeekNumber);
	var_Chart->ScrollTo(var_Chart->GetFirstVisibleDate(),long(1));

885:
How can I display my logo on print/print-preview

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemGantt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'
		#import <ExGantt.dll>
		using namespace EXGANTTLib;
	*/
	EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
	EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
		var_Items->AddBar(Item,"Task",var_Items->GetCellCaption(Item,long(2)),var_Items->GetCellCaption(Item,long(4)),vtMissing,vtMissing);
}

EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutColumnAutoResize(VARIANT_FALSE);
spGantt1->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\\ExGantt\\Sample\\Access2007\\sample.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGantt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGantt1->GetChart()->PutFirstVisibleDate(COleDateTime(1994,8,4,0,00,00).operator DATE());
spGantt1->EndUpdate();
/*
	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->PutHTMLPicture(L"logo","c:\\exontrol\\images\\zipdisk.gif");
	var_Print->ExtraCaption("logo","<img>logo</img>",long(1),long(1));
	var_Print->PutPrintExt(((EXGANTTLib::IGanttPtr)(spGantt1)));
	var_Print->Preview();

884:
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 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->GetColumns()->Add(L"Default");
EXGANTTLib::IItemsPtr var_Items = spGantt1->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");
spGantt1->EndUpdate();

883:
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 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
EXGANTTLib::IChartPtr var_Chart = spGantt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(3);
	EXGANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0);
		var_Level->PutLabel("<%mmm%> <%d%>, <%yyyy%>");
		var_Level->PutAlignment(EXGANTTLib::AlignmentEnum(EXGANTTLib::exHOutside | EXGANTTLib::CenterAlignment));
		var_Level->PutUnit(EXGANTTLib::exDay);
	EXGANTTLib::ILevelPtr var_Level1 = var_Chart->GetLevel(1);
		var_Level1->PutLabel("<b><%h%>:00</b>");
		var_Level1->PutAlignment(EXGANTTLib::CenterAlignment);
		var_Level1->PutUnit(EXGANTTLib::exHour);
		var_Level1->PutDrawTickLines(VARIANT_TRUE);
		var_Level1->PutDrawGridLines(VARIANT_TRUE);
	EXGANTTLib::ILevelPtr var_Level2 = var_Chart->GetLevel(2);
		var_Level2->PutLabel("<%nn%>");
		var_Level2->PutUnit(EXGANTTLib::exMinute);
		var_Level2->PutCount(15);
	var_Chart->ScrollTo(COleDateTime(2001,1,1,8,30,00).operator DATE(),long(0));

882:
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 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
EXGANTTLib::IChartPtr var_Chart = spGantt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(3);
	EXGANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0);
		var_Level->PutLabel("<%mmm%> <%d%>, <%yyyy%>");
		var_Level->PutAlignment(EXGANTTLib::AlignmentEnum(EXGANTTLib::exHOutside | EXGANTTLib::CenterAlignment));
		var_Level->PutUnit(EXGANTTLib::exDay);
	EXGANTTLib::ILevelPtr var_Level1 = var_Chart->GetLevel(1);
		var_Level1->PutLabel("<b><%h%>:00</b> <%AM/PM%>");
		var_Level1->PutAlignment(EXGANTTLib::CenterAlignment);
		var_Level1->PutUnit(EXGANTTLib::exHour);
		var_Level1->PutDrawTickLines(VARIANT_TRUE);
		var_Level1->PutDrawGridLines(VARIANT_TRUE);
	EXGANTTLib::ILevelPtr var_Level2 = var_Chart->GetLevel(2);
		var_Level2->PutLabel("<%nn%>");
		var_Level2->PutUnit(EXGANTTLib::exMinute);
		var_Level2->PutCount(15);
	var_Chart->ScrollTo(COleDateTime(2001,1,1,8,30,00).operator DATE(),long(0));

881:
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 OnMouseDownGantt1(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 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutTreeColumnIndex(-1);
spGantt1->PutSelForeColor(spGantt1->GetForeColor());
EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Buttons")));
	var_Column->PutAlignment(EXGANTTLib::CenterAlignment);
	var_Column->PutDef(EXGANTTLib::exCellHasButton,VARIANT_TRUE);
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->AddItem("Button A");
	var_Items->AddItem("Button B");
	var_Items->AddItem("Button C");
spGantt1->EndUpdate();

880:
Do you have any Fit-To-Page options when printing the control (W x T, Fit-To )

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemGantt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'
		#import <ExGantt.dll>
		using namespace EXGANTTLib;
	*/
	EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
	EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
		var_Items->AddBar(Item,"Task",var_Items->GetCellCaption(Item,long(2)),var_Items->GetCellCaption(Item,long(4)),vtMissing,vtMissing);
}

EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutColumnAutoResize(VARIANT_FALSE);
spGantt1->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\\ExGantt\\Sample\\Access2007\\sample.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGantt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGantt1->GetChart()->PutFirstVisibleDate(COleDateTime(1994,8,4,0,00,00).operator DATE());
spGantt1->EndUpdate();
/*
	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->PutOptions("FitToPage =1 x 2");
	var_Print->PutPrintExt(((EXGANTTLib::IGanttPtr)(spGantt1)));
	var_Print->Preview();

879:
Do you have any Fit-To-Page options when printing the control ( x T, Fit-To Tall )

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemGantt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'
		#import <ExGantt.dll>
		using namespace EXGANTTLib;
	*/
	EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
	EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
		var_Items->AddBar(Item,"Task",var_Items->GetCellCaption(Item,long(2)),var_Items->GetCellCaption(Item,long(4)),vtMissing,vtMissing);
}

EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutColumnAutoResize(VARIANT_FALSE);
spGantt1->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\\ExGantt\\Sample\\Access2007\\sample.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGantt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGantt1->GetChart()->PutFirstVisibleDate(COleDateTime(1994,8,4,0,00,00).operator DATE());
spGantt1->EndUpdate();
/*
	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->PutOptions("FitToPage = x 2");
	var_Print->PutPrintExt(((EXGANTTLib::IGanttPtr)(spGantt1)));
	var_Print->Preview();

878:
Do you have any Fit-To-Page options when printing the control ( W x, Fit-To Wide )

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemGantt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'
		#import <ExGantt.dll>
		using namespace EXGANTTLib;
	*/
	EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
	EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
		var_Items->AddBar(Item,"Task",var_Items->GetCellCaption(Item,long(2)),var_Items->GetCellCaption(Item,long(4)),vtMissing,vtMissing);
}

EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutColumnAutoResize(VARIANT_FALSE);
spGantt1->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\\ExGantt\\Sample\\Access2007\\sample.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGantt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGantt1->GetChart()->PutFirstVisibleDate(COleDateTime(1994,8,4,0,00,00).operator DATE());
spGantt1->EndUpdate();
/*
	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->PutOptions("FitToPage = 2 x");
	var_Print->PutPrintExt(((EXGANTTLib::IGanttPtr)(spGantt1)));
	var_Print->Preview();

877:
Do you have any Fit-To-Page options when printing the control ( percent view, Adjust-To )

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemGantt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'
		#import <ExGantt.dll>
		using namespace EXGANTTLib;
	*/
	EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
	EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
		var_Items->AddBar(Item,"Task",var_Items->GetCellCaption(Item,long(2)),var_Items->GetCellCaption(Item,long(4)),vtMissing,vtMissing);
}

EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutColumnAutoResize(VARIANT_FALSE);
spGantt1->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\\ExGantt\\Sample\\Access2007\\sample.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGantt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGantt1->GetChart()->PutFirstVisibleDate(COleDateTime(1994,8,4,0,00,00).operator DATE());
spGantt1->EndUpdate();
/*
	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->PutOptions("FitToPage = 50%");
	var_Print->PutPrintExt(((EXGANTTLib::IGanttPtr)(spGantt1)));
	var_Print->Preview();

876:
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 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"")));
	var_Column->PutCaption(L"");
	var_Column->PutHTMLCaption(L"Column");
EXGANTTLib::IItemsPtr var_Items = spGantt1->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.");
spGantt1->EndUpdate();

875:
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 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"")));
	var_Column->PutCaption(L"This is the title");
	var_Column->PutHTMLCaption(L"Column");
EXGANTTLib::IItemsPtr var_Items = spGantt1->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.");
spGantt1->EndUpdate();

874:
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 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXGANTTLib::IColumnsPtr var_Columns = spGantt1->GetColumns();
	var_Columns->Add(L"C1");
	var_Columns->Add(L"C2");
EXGANTTLib::IItemsPtr var_Items = spGantt1->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->PutCellCaption(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.");
EXGANTTLib::IColumnPtr var_Column = spGantt1->GetColumns()->GetItem("C2");
	var_Column->PutHTMLCaption(var_Column->GetCaption());
	var_Column->PutCaption(L"");
spGantt1->EndUpdate();

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

// RClick event - Fired when right mouse button is clicked
void OnRClickGantt1()
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'
		#import <ExGantt.dll>
		using namespace EXGANTTLib;
	*/
	EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
	long i = spGantt1->GetItemFromPoint(-1,-1,c,hit);
	spGantt1->GetColumns()->GetItem(c)->ShowFilter("-1,-1,128,128");
}

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

872:
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 OnColumnClickGantt1(LPDISPATCH   Column)
{
	// Column.SortOrder = 1
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'
		#import <ExGantt.dll>
		using namespace EXGANTTLib;
	*/
	EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
	spGantt1->PutSortOnClick(EXGANTTLib::exDefaultSort);
	spGantt1->GetColumns()->GetItem("Sort")->PutSortOrder(EXGANTTLib::SortAscending);
	spGantt1->PutSortOnClick(EXGANTTLib::exUserSort);
}

EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutMarkSearchColumn(VARIANT_FALSE);
spGantt1->PutSortOnClick(EXGANTTLib::exUserSort);
spGantt1->GetColumns()->Add(L"Items");
((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Sort")))->PutVisible(VARIANT_FALSE);
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->PutCellCaption(var_Items->AddItem("Item 1 (3)"),long(1),long(3));
	var_Items->PutCellCaption(var_Items->AddItem("Item 2 (1)"),long(1),long(1));
	var_Items->PutCellCaption(var_Items->AddItem("Item 3 (2)"),long(1),long(2));
spGantt1->EndUpdate();

871:
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 OnColumnClickGantt1(LPDISPATCH   Column)
{
	// Column.SortOrder = 1
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'
		#import <ExGantt.dll>
		using namespace EXGANTTLib;
	*/
	EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
	spGantt1->GetItems()->SortChildren(0,"Sort",VARIANT_TRUE);
}

EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutMarkSearchColumn(VARIANT_FALSE);
spGantt1->PutSortOnClick(EXGANTTLib::exUserSort);
spGantt1->GetColumns()->Add(L"Items");
((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Sort")))->PutVisible(VARIANT_FALSE);
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->PutCellCaption(var_Items->AddItem("Item 1 (3)"),long(1),long(3));
	var_Items->PutCellCaption(var_Items->AddItem("Item 2 (1)"),long(1),long(1));
	var_Items->PutCellCaption(var_Items->AddItem("Item 3 (2)"),long(1),long(2));
spGantt1->EndUpdate();

870:
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 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutSingleSort(VARIANT_FALSE);
EXGANTTLib::IColumnsPtr var_Columns = spGantt1->GetColumns();
	((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"Index")))->PutFormatColumn(L"1 index ``");
	((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"Date")))->PutSortType(EXGANTTLib::SortDate);
	EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"Time")));
		var_Column->PutSortType(EXGANTTLib::SortTime);
		var_Column->PutFormatColumn(L"time(value)");
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	long h = var_Items->AddItem(long(0));
	var_Items->PutCellCaption(h,long(1),COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Items->PutCellCaption(h,long(2),COleDateTime(2001,1,1,10,00,00).operator DATE());
	h = var_Items->AddItem(long(0));
	var_Items->PutCellCaption(h,long(1),COleDateTime(2000,12,31,0,00,00).operator DATE());
	var_Items->PutCellCaption(h,long(2),COleDateTime(2001,1,1,10,00,00).operator DATE());
	h = var_Items->AddItem(long(0));
	var_Items->PutCellCaption(h,long(1),COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Items->PutCellCaption(h,long(2),COleDateTime(2001,1,1,6,00,00).operator DATE());
	h = var_Items->AddItem(long(0));
	var_Items->PutCellCaption(h,long(1),COleDateTime(2000,12,31,0,00,00).operator DATE());
	var_Items->PutCellCaption(h,long(2),COleDateTime(2001,1,1,8,00,00).operator DATE());
	h = var_Items->AddItem(long(0));
	var_Items->PutCellCaption(h,long(1),COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Items->PutCellCaption(h,long(2),COleDateTime(2001,1,1,8,00,00).operator DATE());
	h = var_Items->AddItem(long(0));
	var_Items->PutCellCaption(h,long(1),COleDateTime(2000,12,31,0,00,00).operator DATE());
	var_Items->PutCellCaption(h,long(2),COleDateTime(2001,1,1,6,00,00).operator DATE());
spGantt1->PutLayout(L"multiplesort=\"C1:1 C2:1\"");
spGantt1->EndUpdate();

869:
How can I connect to a DBF file
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutColumnAutoResize(VARIANT_FALSE);
spGantt1->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);
spGantt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGantt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spGantt1->EndUpdate();

868:
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 OnAddItemGantt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'
		#import <ExGantt.dll>
		using namespace EXGANTTLib;
	*/
	EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
	EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
		var_Items->AddBar(Item,"Task",var_Items->GetCellCaption(Item,long(2)),var_Items->GetCellCaption(Item,long(4)),vtMissing,vtMissing);
}

EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
EXGANTTLib::IChartPtr var_Chart = spGantt1->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(EXGANTTLib::exDay);
	var_Chart->PutFirstWeekDay(EXGANTTLib::exMonday);
	var_Chart->PutOverviewVisible(EXGANTTLib::exOverviewShowAll);
spGantt1->PutColumnAutoResize(VARIANT_FALSE);
spGantt1->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\\ExGantt\\Sample\\Access2007\\sample.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGantt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
EXGANTTLib::IConditionalFormatsPtr var_ConditionalFormats = spGantt1->GetConditionalFormats();
	EXGANTTLib::IConditionalFormatPtr var_ConditionalFormat = var_ConditionalFormats->Add(L"1",vtMissing);
		var_ConditionalFormat->PutApplyTo(EXGANTTLib::FormatApplyToEnum(0x1));
		var_ConditionalFormat->PutBold(VARIANT_TRUE);
		var_ConditionalFormat->PutBackColor(RGB(250,250,250));
	EXGANTTLib::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));
	EXGANTTLib::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));
spGantt1->EndUpdate();

867:
Does your control supports scrolling by touching the screen

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemGantt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'
		#import <ExGantt.dll>
		using namespace EXGANTTLib;
	*/
	EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
	EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
		var_Items->AddBar(Item,"Task",var_Items->GetCellCaption(Item,long(2)),var_Items->GetCellCaption(Item,long(4)),vtMissing,vtMissing);
}

EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
EXGANTTLib::IChartPtr var_Chart = spGantt1->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(EXGANTTLib::exDay);
	var_Chart->PutFirstWeekDay(EXGANTTLib::exMonday);
	var_Chart->PutOverviewVisible(EXGANTTLib::exOverviewShowAll);
spGantt1->PutColumnAutoResize(VARIANT_FALSE);
spGantt1->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\\ExGantt\\Sample\\Access2007\\sample.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGantt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGantt1->PutContinueColumnScroll(VARIANT_TRUE);
spGantt1->PutScrollBySingleLine(VARIANT_TRUE);
spGantt1->PutAutoDrag(EXGANTTLib::AutoDragEnum(EXGANTTLib::exAutoDragScrollOnShortTouch | EXGANTTLib::exAutoDragScroll));
spGantt1->EndUpdate();

866:
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 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutMarkSearchColumn(VARIANT_FALSE);
spGantt1->GetColumns()->Add(L"Tasks");
EXGANTTLib::IChartPtr var_Chart = spGantt1->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());
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	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(((EXGANTTLib::IGanttPtr)(spGantt1)));
	var_Print->CopyTo(L"c:/temp/xtest.pdf");
OutputDebugStringW( L"Look for C:\\Temp\\xtest.pdf file." );
spGantt1->EndUpdate();

865:
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 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutMarkSearchColumn(VARIANT_FALSE);
spGantt1->GetColumns()->Add(L"Tasks");
EXGANTTLib::IChartPtr var_Chart = spGantt1->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());
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	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 = spGantt1->GetCopyTo(L"c:/temp/xtest.pdf");
OutputDebugStringW( L"Look for C:\\Temp\\xtest.pdf file." );
spGantt1->EndUpdate();

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

// CellStateChanged event - Fired after cell's state has been changed.
void OnCellStateChangedGantt1(long   Item,long   ColIndex)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'
		#import <ExGantt.dll>
		using namespace EXGANTTLib;
	*/
	EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
	EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
		var_Items->PutCellCaption(Item,long(2),var_Items->GetCellState(Item,long(0)));
}

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

863:
How can I use no scroll bars for touch-screens

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemGantt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'
		#import <ExGantt.dll>
		using namespace EXGANTTLib;
	*/
	EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
	EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
		var_Items->AddBar(Item,"Task",var_Items->GetCellCaption(Item,long(2)),var_Items->GetCellCaption(Item,long(4)),vtMissing,vtMissing);
}

EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
EXGANTTLib::IChartPtr var_Chart = spGantt1->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(EXGANTTLib::exDay);
	var_Chart->PutFirstWeekDay(EXGANTTLib::exMonday);
	var_Chart->PutOverviewVisible(EXGANTTLib::exOverviewShowAll);
spGantt1->PutColumnAutoResize(VARIANT_FALSE);
spGantt1->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\\ExGantt\\Sample\\Access2007\\sample.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGantt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGantt1->PutAutoDrag(EXGANTTLib::exAutoDragScroll);
spGantt1->PutScrollWidth(4);
spGantt1->PutScrollHeight(4);
spGantt1->PutBackground(EXGANTTLib::exHSLeft,RGB(192,192,192));
spGantt1->PutBackground(EXGANTTLib::exHSRight,RGB(192,192,192));
spGantt1->PutBackground(EXGANTTLib::exHSBack,RGB(224,224,224));
spGantt1->PutBackground(EXGANTTLib::exHSThumb,RGB(128,128,128));
spGantt1->PutBackground(EXGANTTLib::exVSBack,RGB(224,224,224));
spGantt1->PutBackground(EXGANTTLib::exVSDown,RGB(192,192,192));
spGantt1->PutBackground(EXGANTTLib::exVSThumb,RGB(128,128,128));
spGantt1->PutBackground(EXGANTTLib::exVSUp,RGB(192,192,192));
spGantt1->PutScrollButtonWidth(0);
spGantt1->PutScrollButtonHeight(0);
spGantt1->EndUpdate();

862:
How can I print the selected items only

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemGantt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'
		#import <ExGantt.dll>
		using namespace EXGANTTLib;
	*/
	EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
	EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
		var_Items->AddBar(Item,"Task",var_Items->GetCellCaption(Item,long(2)),var_Items->GetCellCaption(Item,long(4)),vtMissing,vtMissing);
}

EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutSingleSel(VARIANT_FALSE);
spGantt1->PutColumnAutoResize(VARIANT_FALSE);
spGantt1->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\\ExGantt\\Sample\\Access2007\\sample.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGantt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGantt1->GetChart()->PutFirstVisibleDate(COleDateTime(1994,8,4,0,00,00).operator DATE());
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->PutSelectItem(var_Items->GetItemByIndex(0),VARIANT_TRUE);
	var_Items->PutSelectItem(var_Items->GetItemByIndex(2),VARIANT_TRUE);
	var_Items->PutSelectItem(var_Items->GetItemByIndex(4),VARIANT_TRUE);
spGantt1->EndUpdate();
/*
	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->PutOptions("Print = Selection");
	var_Print->PutPrintExt(((EXGANTTLib::IGanttPtr)(spGantt1)));
	var_Print->Preview();

861:
How can I sort the columns to be displayed on the columns floating bar

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->PutColumnAutoResize(VARIANT_FALSE);
EXGANTTLib::IColumnsPtr var_Columns = spGantt1->GetColumns();
	((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"City")))->PutVisible(VARIANT_FALSE);
	((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"Start")))->PutVisible(VARIANT_FALSE);
	((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"End")))->PutVisible(VARIANT_FALSE);
spGantt1->PutColumnsFloatBarVisible(VARIANT_TRUE);
spGantt1->PutColumnsFloatBarSortOrder(EXGANTTLib::SortAscending);

860:
How can I add a vertical padding

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutDrawGridLines(EXGANTTLib::exAllLines);
EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Padding")));
	var_Column->PutDef(EXGANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutDef(EXGANTTLib::exCellSingleLine,VARIANT_FALSE);
	var_Column->PutDef(EXGANTTLib::exCellPaddingLeft,long(6));
	var_Column->PutDef(EXGANTTLib::exCellPaddingRight,long(6));
	var_Column->PutDef(EXGANTTLib::exCellPaddingTop,long(6));
	var_Column->PutDef(EXGANTTLib::exCellPaddingBottom,long(6));
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->AddItem("padding");
	var_Items->AddItem("padding");
spGantt1->EndUpdate();

859:
How do you embed HTML options into the anchor click string

// AnchorClick event - Occurs when an anchor element is clicked.
void OnAnchorClickGantt1(LPCTSTR   AnchorID,LPCTSTR   Options)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'
		#import <ExGantt.dll>
		using namespace EXGANTTLib;
	*/
	EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
	OutputDebugStringW( L"AnchorID" );
	OutputDebugStringW( L"Options" );
}

EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
EXGANTTLib::IColumnsPtr var_Columns = spGantt1->GetColumns();
	((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"Car")))->PutDef(EXGANTTLib::exCellCaptionFormat,long(1));
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->AddItem("<a mazda_1;options for 1>Mazda <b>1</b></a>");
	var_Items->AddItem("<a mazda_2;options for 2>Mazda <b>2</b></a>");
	var_Items->AddItem("<a mazda_3;options for 3a>Mazda <b>3.a</b></a>");
	var_Items->AddItem("<a mazda_3;options for 3b>Mazda <b>3.b</b></a>");
spGantt1->EndUpdate();

858:
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 3)

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->GetVisualAppearance()->Add(1,_bstr_t("gBFLBCJwBAEHhEJAEGg4BVEIQAAYAQGKIYBkAKBQAGaAoDDMOQwQwAAxjGKEEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQCWIAzATGYBRfIUEgjBM6ExwG78e") +
"gBHp/ZpkACIJJAaRjHQdJxGKKMQB9DIhCZpeKhWgkKIJBzOEyBRC4ERBGqNGrsIgLEqWZpnWhaNpWXYTLyBN64LhuK46g53O6wLxvK6hEr2dJ/YBcIAOfghf4NQ7EMRx" +
"LC8Mw3BDvYDkOAABAIgI=");
spGantt1->PutSelBackColor(0x1fffffe);
spGantt1->PutShowFocusRect(VARIANT_FALSE);
spGantt1->GetColumns()->Add(L"Items");
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->PutItemBackColor(var_Items->AddItem("red"),RGB(255,0,0));
	var_Items->PutItemBackColor(var_Items->AddItem("blue"),RGB(0,0,255));
	var_Items->PutItemBackColor(var_Items->AddItem("green"),RGB(0,255,0));
spGantt1->EndUpdate();

857:
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 2)

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutSelBackMode(EXGANTTLib::exTransparent);
spGantt1->PutShowFocusRect(VARIANT_FALSE);
spGantt1->GetColumns()->Add(L"Items");
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->PutItemBackColor(var_Items->AddItem("red"),RGB(255,0,0));
	var_Items->PutItemBackColor(var_Items->AddItem("blue"),RGB(0,0,255));
	var_Items->PutItemBackColor(var_Items->AddItem("green"),RGB(0,255,0));
spGantt1->EndUpdate();

856:
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 1)

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutSelBackColor(spGantt1->GetBackColor());
spGantt1->PutSelForeColor(spGantt1->GetForeColor());
spGantt1->PutShowFocusRect(VARIANT_TRUE);
spGantt1->GetColumns()->Add(L"Items");
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->PutItemBackColor(var_Items->AddItem("red"),RGB(255,0,0));
	var_Items->PutItemBackColor(var_Items->AddItem("blue"),RGB(0,0,255));
	var_Items->PutItemBackColor(var_Items->AddItem("green"),RGB(0,255,0));
spGantt1->EndUpdate();

855:
Do you have any Fit-To-Page options when printing the control

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemGantt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'
		#import <ExGantt.dll>
		using namespace EXGANTTLib;
	*/
	EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
	EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
		var_Items->AddBar(Item,"Task",var_Items->GetCellCaption(Item,long(2)),var_Items->GetCellCaption(Item,long(4)),vtMissing,vtMissing);
}

EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutColumnAutoResize(VARIANT_FALSE);
spGantt1->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\\ExGantt\\Sample\\Access2007\\sample.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGantt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGantt1->GetChart()->PutFirstVisibleDate(COleDateTime(1994,8,4,0,00,00).operator DATE());
spGantt1->EndUpdate();
/*
	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->PutOptions("FitToPage = On");
	var_Print->PutPrintExt(((EXGANTTLib::IGanttPtr)(spGantt1)));
	var_Print->Preview();

854:
How can I add a footer row

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->PutShowLockedItems(VARIANT_TRUE);
spGantt1->PutDrawGridLines(EXGANTTLib::exVLines);
spGantt1->GetColumns()->Add(L"C1");
spGantt1->GetColumns()->Add(L"C2");
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->PutLockedItemCount(EXGANTTLib::BottomAlignment,1);
	long h = var_Items->GetLockedItem(EXGANTTLib::BottomAlignment,0);
	var_Items->PutItemBackColor(h,RGB(128,128,128));
	var_Items->PutItemForeColor(h,RGB(255,255,255));
	var_Items->PutCellCaption(h,long(0),"footer c1");
	var_Items->PutCellCaption(h,long(1),"footer c2");
	var_Items->PutCellCaption(var_Items->AddItem("cell"),long(1),"cell");

853:
How can I add a header row

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->PutShowLockedItems(VARIANT_TRUE);
spGantt1->PutDrawGridLines(EXGANTTLib::exVLines);
spGantt1->GetColumns()->Add(L"C1");
spGantt1->GetColumns()->Add(L"C2");
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->PutLockedItemCount(EXGANTTLib::TopAlignment,1);
	long h = var_Items->GetLockedItem(EXGANTTLib::TopAlignment,0);
	var_Items->PutItemBackColor(h,RGB(128,128,128));
	var_Items->PutItemForeColor(h,RGB(255,255,255));
	var_Items->PutCellCaption(h,long(0),"footer c1");
	var_Items->PutCellCaption(h,long(1),"footer c2");
	var_Items->PutCellCaption(var_Items->AddItem("cell"),long(1),"cell");

852:
How can I programmatically add more columns to the sort bar and other to be sorted, but not included in the sort bar

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->PutSortBarVisible(VARIANT_TRUE);
EXGANTTLib::IColumnsPtr var_Columns = spGantt1->GetColumns();
	var_Columns->Add(L"0");
	var_Columns->Add(L"1");
	var_Columns->Add(L"2");
	var_Columns->Add(L"3");
	var_Columns->Add(L"4");
spGantt1->PutLayout(L"multiplesort=\"C3:1 C4:2\";singlesort=\"C2:1\"");

851:
How can I fix a column, while other sizable and fill the control's client
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->PutColumnAutoResize(VARIANT_TRUE);
spGantt1->GetColumns()->Add(L"Sizable");
EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"F")));
	var_Column->PutAllowSizing(VARIANT_FALSE);
	var_Column->PutWidth(16);

850:
When I'm trying to show string with "line break" character (vbCrLF) in a textbox, it shows 2 squares. Is there any way to hide these squares

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
EXGANTTLib::IColumnsPtr var_Columns = spGantt1->GetColumns();
	var_Columns->Add(L"Value");
	EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"CellSingleLine = False")));
		var_Column->PutComputedField(L"%0");
		var_Column->PutDef(EXGANTTLib::exCellSingleLine,VARIANT_FALSE);
	EXGANTTLib::IColumnPtr var_Column1 = ((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"FormatColumn/replace CRLF")));
		var_Column1->PutComputedField(L"%0");
		var_Column1->PutFormatColumn(L"value replace `\\r\\n` with ``");
	EXGANTTLib::IColumnPtr var_Column2 = ((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"FormatColumn/replace TAB,CRLF")));
		var_Column2->PutComputedField(L"%0");
		var_Column2->PutFormatColumn(L"(value replace `\\t` with ``) replace `\\r\\n` with ``");
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->AddItem("a\\ta\\r\\nb\\tb");

849:
Is there any way to "unselect" radio group

// DblClick event - Occurs when the user dblclk the left mouse button over an object.
void OnDblClickGantt1(short   Shift,long   X,long   Y)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'
		#import <ExGantt.dll>
		using namespace EXGANTTLib;
	*/
	EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
	EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
		long h = var_Items->GetCellChecked(1234);
		var_Items->PutCellHasCheckBox(long(0),h,VARIANT_TRUE);
		var_Items->PutCellState(long(0),h,0);
		var_Items->PutCellHasCheckBox(long(0),h,VARIANT_FALSE);
}

// SelectionChanged event - Fired after a new item has been selected.
void OnSelectionChangedGantt1()
{
	EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
	EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
		var_Items->PutCellState(var_Items->GetFocusItem(),long(0),1);
}

EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->PutMarkSearchColumn(VARIANT_FALSE);
spGantt1->PutSelBackColor(RGB(255,255,128));
spGantt1->PutSelForeColor(RGB(0,0,0));
spGantt1->GetColumns()->Add(L"Default");
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	long h = var_Items->AddItem("Radio 1");
	var_Items->PutCellHasRadioButton(h,long(0),VARIANT_TRUE);
	var_Items->PutCellRadioGroup(h,long(0),1234);
	h = var_Items->AddItem("Radio 2");
	var_Items->PutCellHasRadioButton(h,long(0),VARIANT_TRUE);
	var_Items->PutCellRadioGroup(h,long(0),1234);
	var_Items->PutCellState(h,long(0),1);
	h = var_Items->AddItem("Radio 3");
	var_Items->PutCellHasRadioButton(h,long(0),VARIANT_TRUE);
	var_Items->PutCellRadioGroup(h,long(0),1234);

848:
The Column.Alignment property does not seem to work for cells with images in them. What can be done

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") +
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" +
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=");
spGantt1->PutTreeColumnIndex(-1);
spGantt1->PutDrawGridLines(EXGANTTLib::exAllLines);
spGantt1->PutHeaderHeight(24);
spGantt1->PutDefaultItemHeight(24);
EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Image")));
	var_Column->PutAllowSizing(VARIANT_FALSE);
	var_Column->PutWidth(32);
	var_Column->PutHTMLCaption(L"<img>1</img>");
	var_Column->PutHeaderAlignment(EXGANTTLib::CenterAlignment);
	var_Column->PutAlignment(EXGANTTLib::CenterAlignment);
	var_Column->PutDef(EXGANTTLib::exCellCaptionFormat,long(1));
spGantt1->GetColumns()->Add(L"Rest");
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->AddItem("<img>1</img>");
	var_Items->AddItem("<img>2</img>");
	var_Items->AddItem("<img>3</img>");
spGantt1->EndUpdate();

847:
Does your control support subscript or superscript, in HTML captions

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
EXGANTTLib::IChartPtr var_Chart = spGantt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
spGantt1->GetColumns()->Add(L"Column");
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	long h = var_Items->AddItem("Item 1");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXGANTTLib::exBarCaption,"<sha ;;0>Event <b><font ;6><off -6>2<off 4>3<off 4>1");
	var_Items->PutItemBar(h,"",EXGANTTLib::exBarHAlignCaption,long(18));

846:
How do I arrange my columns on multiple levels

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutColumnAutoResize(VARIANT_FALSE);
spGantt1->PutDrawGridLines(EXGANTTLib::exAllLines);
EXGANTTLib::IColumnsPtr var_Columns = spGantt1->GetColumns();
	EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"C0")));
		var_Column->PutExpandColumns(L"1,2");
		var_Column->PutDisplayExpandButton(VARIANT_FALSE);
	var_Columns->Add(L"C1");
	var_Columns->Add(L"C2");
	var_Columns->Add(L"C3");
	EXGANTTLib::IColumnPtr var_Column1 = ((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"C4")));
		var_Column1->PutExpandColumns(L"5,6");
		var_Column1->PutDisplayExpandButton(VARIANT_FALSE);
	var_Columns->Add(L"C5");
	EXGANTTLib::IColumnPtr var_Column2 = ((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"C6")));
		var_Column2->PutExpandColumns(L"6,7");
		var_Column2->PutDisplayExpandButton(VARIANT_FALSE);
	var_Columns->Add(L"C7");
spGantt1->EndUpdate();

845:
Does your control support expandable header or columns, so I can arrange it on multiple levels

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutDrawGridLines(EXGANTTLib::exAllLines);
spGantt1->PutBackColorLevelHeader(RGB(240,240,240));
EXGANTTLib::IColumnsPtr var_Columns = spGantt1->GetColumns();
	EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"Photo")));
		var_Column->PutAllowSizing(VARIANT_FALSE);
		var_Column->PutWidth(32);
	var_Columns->Add(L"Personal Info");
	var_Columns->Add(L"Title");
	var_Columns->Add(L"Name");
	var_Columns->Add(L"First");
	var_Columns->Add(L"Last");
	var_Columns->Add(L"Address");
	var_Columns->GetItem("Personal Info")->PutExpandColumns(L"2,3");
	EXGANTTLib::IColumnPtr var_Column1 = var_Columns->GetItem("Name");
		var_Column1->PutExpandColumns(L"4,5");
		var_Column1->PutExpanded(VARIANT_FALSE);
spGantt1->EndUpdate();

844:
Can I change the format of date to be shown in the control

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXGANTTLib::IColumnsPtr var_Columns = spGantt1->GetColumns();
	var_Columns->Add(L"Default");
	EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"Format.1")));
		var_Column->PutComputedField(L"%0");
		var_Column->PutFormatColumn(L"dateF(value) replace `/` with `-`");
	EXGANTTLib::IColumnPtr var_Column1 = ((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"Format.2")));
		var_Column1->PutComputedField(L"%0");
		var_Column1->PutDef(EXGANTTLib::exCellCaptionFormat,long(1));
		var_Column1->PutFormatColumn(L"`<b>`+ shortdate(value) + `</b> ` + timeF(value)");
	EXGANTTLib::IColumnPtr var_Column2 = ((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"Format.3")));
		var_Column2->PutComputedField(L"%0");
		var_Column2->PutDef(EXGANTTLib::exCellCaptionFormat,long(1));
		var_Column2->PutFormatColumn(_bstr_t("` <b>`+ ( weekday(value) case ( 0 : `Su`; 1 : `Mo`; 2 : `Tu`; 3 : `We`; 4 : `Th`; 5 : `Fr`; 6 : `Sa`) ) + `</b> ` + ( dateF(val") +
"ue) replace `/` with `-` )");
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->AddItem(COleDateTime(2001,1,1,10,00,00).operator DATE());
	var_Items->AddItem(COleDateTime(2001,1,2,10,00,00).operator DATE());

843:
How can I remove all bars from the chart
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->GetColumns()->Add(L"Task");
spGantt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->ClearBars(0);

842:
How can I change the color for all bars with a specified key

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->GetColumns()->Add(L"Task");
spGantt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->PutItemBar(0,"K1",EXGANTTLib::exBarColor,long(255));

841:
Is there any automatic way to change a property for all bars with a specified key

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->GetColumns()->Add(L"Task");
spGantt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->PutItemBar(0,"K1",EXGANTTLib::exBarColor,long(255));

840:
How can I remove all bars with specified key

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->GetColumns()->Add(L"Task");
spGantt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->RemoveBar(0,"K1");

839:
How can I find if there is any filter applied to the control

// FilterChange event - Occurs when the filter was changed.
void OnFilterChangeGantt1()
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'
		#import <ExGantt.dll>
		using namespace EXGANTTLib;
	*/
	EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
	OutputDebugStringW( L"If negative, the filter is present, else not" );
	OutputDebugStringW( _bstr_t(spGantt1->GetItems()->GetVisibleItemCount()) );
}

EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutLinesAtRoot(EXGANTTLib::exLinesAtRoot);
spGantt1->PutTreeColumnIndex(-1);
spGantt1->PutFilterInclude(EXGANTTLib::exMatchingItemsOnly);
EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Column")));
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutFilterType(EXGANTTLib::exFilter);
	var_Column->PutFilter(L"C1");
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	long h = var_Items->AddItem("R1");
	var_Items->InsertItem(h,vtMissing,"C1");
	var_Items->InsertItem(h,vtMissing,"C2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("R2");
	var_Items->InsertItem(h,vtMissing,"C1");
	var_Items->InsertItem(h,vtMissing,"C2");
spGantt1->ApplyFilter();
spGantt1->EndUpdate();

838:
How can I prevent showing the lines for the hierarchy while using the exMatchingItemsOnly option

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutLinesAtRoot(EXGANTTLib::exLinesAtRoot);
spGantt1->PutTreeColumnIndex(-1);
spGantt1->PutFilterInclude(EXGANTTLib::exMatchingItemsOnly);
EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Column")));
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutFilterType(EXGANTTLib::exFilter);
	var_Column->PutFilter(L"C1|C2");
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	long h = var_Items->AddItem("R1");
	var_Items->InsertItem(h,vtMissing,"C1");
	var_Items->InsertItem(h,vtMissing,"C2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("R2");
	var_Items->InsertItem(h,vtMissing,"C1");
	var_Items->InsertItem(h,vtMissing,"C2");
spGantt1->ApplyFilter();
spGantt1->EndUpdate();

837:
Is there any method to get only the matched items and not the items with his parent

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutLinesAtRoot(EXGANTTLib::exLinesAtRoot);
spGantt1->PutFilterInclude(EXGANTTLib::exMatchingItemsOnly);
EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Column")));
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutFilterType(EXGANTTLib::exFilter);
	var_Column->PutFilter(L"C1|C2");
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	long h = var_Items->AddItem("R1");
	var_Items->InsertItem(h,vtMissing,"C1");
	var_Items->InsertItem(h,vtMissing,"C2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("R2");
	var_Items->InsertItem(h,vtMissing,"C1");
	var_Items->InsertItem(h,vtMissing,"C2");
spGantt1->ApplyFilter();
spGantt1->EndUpdate();

836:
Is there any property I can save and restore automatically the current setting, column position, size, and so on (2)

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->GetColumns()->Add(L"Column");
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->AddItem("Item 1");
	var_Items->AddItem("Item 2");
	var_Items->AddItem("Item 3");
spGantt1->PutLayout(L"Select=\"0\";SingleSort=\"C0:2\";Columns=1");
spGantt1->EndUpdate();

835:
Is there any property I can save and restore automatically the current setting, column position, size, and so on (1)

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->GetColumns()->Add(L"Column");
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->AddItem("Item 1");
	var_Items->AddItem("Item 2");
	var_Items->AddItem("Item 3");
spGantt1->PutLayout(_bstr_t("gBjAAwAAuABmABpABsAB0ABlAByhoAPIAOEPAA9gYABoABQAgUEg0XN4AOcJicKkpujMbjsfkMFk0YhkQgUOjUEl8gjcGO0ok8KMULjEaGMcj08kQAO8oMkTNEtGwAG") +
"QAqc7gUlhh1ABtAEsk9GpEfhElgVcsMupNlnlonlaAFcr0shUsp8QPEtnVJqJhmcIhUMh0QiU5sYAqMngUSuEMw07k8Qv0SgVRrNEuVflF2jF5x9JyNEm0TjQijemyE0" +
"jE3t+YruauoAu4Az1qj9BzRn0UzksSnAA0xDjY6qnAw8OiUQ0dwzN0zWz2t7j8/xURAGNvWH6k8xlEhklhEI0O/6QAgI=");
spGantt1->EndUpdate();

834:
I have noticed that the column's header is changed once the cursor hovers it. Is it possible to change that visual appearance

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn");
EXGANTTLib::IColumnsPtr var_Columns = spGantt1->GetColumns();
	var_Columns->Add(L"Column 1");
	var_Columns->Add(L"Column 2");
spGantt1->PutBackColorHeader(0x1000000);
spGantt1->PutBackground(EXGANTTLib::exCursorHoverColumn,0x12d86ff);

833:
Is it possible to change the visual appearance of the columns selector/floating bar(3)

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->PutColumnAutoResize(VARIANT_FALSE);
EXGANTTLib::IColumnsPtr var_Columns = spGantt1->GetColumns();
	var_Columns->Add(L"Column 1");
	((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"Column 2")))->PutVisible(VARIANT_FALSE);
spGantt1->GetVisualAppearance()->Add(2,"c:\\exontrol\\images\\normal.ebn");
spGantt1->GetVisualAppearance()->Add(3,"c:\\exontrol\\images\\pushed.ebn");
spGantt1->PutBackground(EXGANTTLib::exColumnsFloatAppearance,0x2000000);
spGantt1->PutBackground(EXGANTTLib::exColumnsFloatBackColor,0x3000000);
spGantt1->PutBackground(EXGANTTLib::exColumnsFloatCaptionBackColor,RGB(246,245,240));
spGantt1->PutColumnsFloatBarVisible(VARIANT_TRUE);

832:
Is it possible to change the visual appearance of the columns selector/floating bar(2)

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->PutColumnAutoResize(VARIANT_FALSE);
EXGANTTLib::IColumnsPtr var_Columns = spGantt1->GetColumns();
	var_Columns->Add(L"Column 1");
	((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"Column 2")))->PutVisible(VARIANT_FALSE);
spGantt1->GetVisualAppearance()->Add(3,"c:\\exontrol\\images\\pushed.ebn");
spGantt1->PutBackground(EXGANTTLib::exColumnsFloatBackColor,0x3000000);
spGantt1->PutColumnsFloatBarVisible(VARIANT_TRUE);

831:
Is it possible to change the visual appearance of the columns selector/floating bar(1)

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->GetVisualAppearance()->Add(2,"c:\\exontrol\\images\\normal.ebn");
spGantt1->PutBackground(EXGANTTLib::exColumnsFloatAppearance,0x2000000);
spGantt1->PutBackground(EXGANTTLib::exColumnsFloatBackColor,RGB(246,245,240));
spGantt1->PutBackground(EXGANTTLib::exColumnsFloatCaptionBackColor,RGB(246,245,240));
spGantt1->PutColumnsFloatBarVisible(VARIANT_TRUE);

830:
I am using the ColumnsFloatBarVisible property on True, but still not able to add any column on that list

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->PutColumnAutoResize(VARIANT_FALSE);
EXGANTTLib::IColumnsPtr var_Columns = spGantt1->GetColumns();
	var_Columns->Add(L"Column 1");
	((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"Column 2")))->PutVisible(VARIANT_FALSE);
spGantt1->PutColumnsFloatBarVisible(VARIANT_TRUE);

829:
Is it possible to list a column to columns selector/floating bar, but still user can use it

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->PutColumnAutoResize(VARIANT_FALSE);
EXGANTTLib::IColumnsPtr var_Columns = spGantt1->GetColumns();
	var_Columns->Add(L"Column 1");
	((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"Column 2")))->PutVisible(VARIANT_FALSE);
	EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"Column 3")));
		var_Column->PutVisible(VARIANT_FALSE);
		var_Column->PutEnabled(VARIANT_FALSE);
spGantt1->PutColumnsFloatBarVisible(VARIANT_TRUE);

828:
How can I prevent a specific column not to be listed in the columns selector/floating bar

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->PutColumnAutoResize(VARIANT_FALSE);
EXGANTTLib::IColumnsPtr var_Columns = spGantt1->GetColumns();
	var_Columns->Add(L"Column 1");
	((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"Column 2")))->PutVisible(VARIANT_FALSE);
	EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"Column 3")));
		var_Column->PutVisible(VARIANT_FALSE);
		var_Column->PutAllowDragging(VARIANT_FALSE);
spGantt1->PutColumnsFloatBarVisible(VARIANT_TRUE);

827:
Is it possible to change the "Columns" caption being shown in the columns selector/floating bar

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->PutColumnAutoResize(VARIANT_FALSE);
EXGANTTLib::IColumnsPtr var_Columns = spGantt1->GetColumns();
	var_Columns->Add(L"Column 1");
	((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"Column 2")))->PutVisible(VARIANT_FALSE);
spGantt1->PutDescription(EXGANTTLib::exColumnsFloatBar,L"Hidden Columns");
spGantt1->PutColumnsFloatBarVisible(VARIANT_TRUE);

826:
How can I show the columns selector, so the user can drag and drop columns to the view

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->PutColumnAutoResize(VARIANT_FALSE);
EXGANTTLib::IColumnsPtr var_Columns = spGantt1->GetColumns();
	var_Columns->Add(L"Column 1");
	((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"Column 2")))->PutVisible(VARIANT_FALSE);
spGantt1->PutColumnsFloatBarVisible(VARIANT_TRUE);

825:
The column's header is changed while the cursor hovers it. Is it possible to prevent that

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
EXGANTTLib::IColumnsPtr var_Columns = spGantt1->GetColumns();
	var_Columns->Add(L"Column 1");
	var_Columns->Add(L"Column 2");
spGantt1->PutBackground(EXGANTTLib::exCursorHoverColumn,-1);

824:
How do I enable the scrollbar-extension, as thumb to be shown outside of the control's client area

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutScrollBars(EXGANTTLib::exDisableBoth);
spGantt1->GetChart()->PutToolTip(L"");
spGantt1->PutScrollPartVisible(EXGANTTLib::exVScroll,EXGANTTLib::exExtentThumbPart,VARIANT_TRUE);
spGantt1->PutScrollPartVisible(EXGANTTLib::exHScroll,EXGANTTLib::exExtentThumbPart,VARIANT_TRUE);
spGantt1->PutScrollPartVisible(EXGANTTLib::exHChartScroll,EXGANTTLib::exExtentThumbPart,VARIANT_TRUE);
spGantt1->PutScrollWidth(4);
spGantt1->PutBackground(EXGANTTLib::exVSBack,RGB(240,240,240));
spGantt1->PutBackground(EXGANTTLib::exVSThumb,RGB(128,128,128));
spGantt1->PutScrollHeight(4);
spGantt1->PutBackground(EXGANTTLib::exHSBack,spGantt1->GetBackground(EXGANTTLib::exVSBack));
spGantt1->PutBackground(EXGANTTLib::exHSThumb,spGantt1->GetBackground(EXGANTTLib::exVSThumb));
spGantt1->PutBackground(EXGANTTLib::exScrollSizeGrip,spGantt1->GetBackground(EXGANTTLib::exVSBack));
spGantt1->EndUpdate();

823:
How can I display the Year in Thai, Buddhist, Korean format

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
EXGANTTLib::IChartPtr var_Chart = spGantt1->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(EXGANTTLib::exDay);
	EXGANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0);
		var_Level->PutLabel("<%mmmm%> <%d%>, <%loc_yyyy%> <r><%ww%>");
		var_Level->PutUnit(EXGANTTLib::exWeek);
		var_Level->PutToolTip(var_Level->GetLabel());
	var_Chart->PutToolTip(L"<%ddd%> <%m%>/<%d%>/<%loc_yyyy%>");
spGantt1->PutDescription(EXGANTTLib::exFilterBarDateMonths,spGantt1->GetChart()->GetMonthNames());

822:
How does localization work

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
EXGANTTLib::IChartPtr var_Chart = spGantt1->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);

821:
How can I have a case-insensitive filter (exFilterDoCaseSensitive flag is not set)

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spGantt1->PutMarkSearchColumn(VARIANT_FALSE);
EXGANTTLib::IColumnsPtr var_Columns = spGantt1->GetColumns();
	EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"Car")));
		var_Column->PutDisplayFilterButton(VARIANT_TRUE);
		var_Column->PutFilterType(EXGANTTLib::exFilter);
		var_Column->PutFilter(L"MAZDA");
	EXGANTTLib::IColumnPtr var_Column1 = ((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"Equipment")));
		var_Column1->PutDisplayFilterButton(VARIANT_TRUE);
		var_Column1->PutDisplayFilterPattern(VARIANT_FALSE);
		var_Column1->PutCustomFilter(L"Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*");
		var_Column1->PutFilterType(EXGANTTLib::exPattern);
		var_Column1->PutFilter(L"AIR BAG");
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->PutCellCaption(var_Items->AddItem("Mazda"),long(1),"Air Bag");
	var_Items->PutCellCaption(var_Items->AddItem("Toyota"),long(1),"Air Bag,Air condition");
	var_Items->PutCellCaption(var_Items->AddItem("Ford"),long(1),"Air condition");
	var_Items->PutCellCaption(var_Items->AddItem("Nissan"),long(1),"Air Bag,ABS,ESP");
	var_Items->PutCellCaption(var_Items->AddItem("Mazda"),long(1),"Air Bag, ABS,ESP");
	var_Items->PutCellCaption(var_Items->AddItem("Mazda"),long(1),"ABS,ESP");
spGantt1->ApplyFilter();
spGantt1->EndUpdate();

820:
How can I have a case-sensitive filter

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spGantt1->PutMarkSearchColumn(VARIANT_FALSE);
EXGANTTLib::IColumnsPtr var_Columns = spGantt1->GetColumns();
	EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"Car")));
		var_Column->PutDisplayFilterButton(VARIANT_TRUE);
		var_Column->PutFilterType(EXGANTTLib::FilterTypeEnum(EXGANTTLib::exFilterDoCaseSensitive | EXGANTTLib::exFilter));
		var_Column->PutFilter(L"Mazda");
	EXGANTTLib::IColumnPtr var_Column1 = ((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"Equipment")));
		var_Column1->PutDisplayFilterButton(VARIANT_TRUE);
		var_Column1->PutDisplayFilterPattern(VARIANT_FALSE);
		var_Column1->PutCustomFilter(L"Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*");
		var_Column1->PutFilterType(EXGANTTLib::FilterTypeEnum(EXGANTTLib::exFilterDoCaseSensitive | EXGANTTLib::exPattern));
		var_Column1->PutFilter(L"Air Bag");
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->PutCellCaption(var_Items->AddItem("Mazda"),long(1),"Air Bag");
	var_Items->PutCellCaption(var_Items->AddItem("Toyota"),long(1),"Air Bag,Air condition");
	var_Items->PutCellCaption(var_Items->AddItem("Ford"),long(1),"Air condition");
	var_Items->PutCellCaption(var_Items->AddItem("Nissan"),long(1),"Air Bag,ABS,ESP");
	var_Items->PutCellCaption(var_Items->AddItem("Mazda"),long(1),"Air Bag, ABS,ESP");
	var_Items->PutCellCaption(var_Items->AddItem("Mazda"),long(1),"ABS,ESP");
spGantt1->ApplyFilter();
spGantt1->EndUpdate();

819:
I am using the FormatColumn/FormatCell to format my columns. Is it possible to ignore the SelForeColor, so the foreground color for selected items does not override my settings

// SelectionChanged event - Fired after a new item has been selected.
void OnSelectionChangedGantt1()
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'
		#import <ExGantt.dll>
		using namespace EXGANTTLib;
	*/
	EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
	EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
		var_Items->ClearItemBackColor(0);
		var_Items->PutItemBackColor(var_Items->GetSelectedItem(0),RGB(128,255,255));
}

EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutMarkSearchColumn(VARIANT_FALSE);
spGantt1->PutSelForeColor(spGantt1->GetForeColor());
spGantt1->PutSelBackColor(spGantt1->GetBackColor());
spGantt1->PutShowFocusRect(VARIANT_FALSE);
EXGANTTLib::IColumnsPtr var_Columns = spGantt1->GetColumns();
	EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"Format")));
		var_Column->PutFormatColumn(_bstr_t("type(value) in (0,1) ? 'null' : ( dbl(value)<0 ? '<fgcolor=FF0000>'+ (value format '2|.|3|,|1' ) : (dbl(value)>0 ? '<fgcolor=00") +
"00FF>+'+(value format '2|.|3|,' ): '0.00') )");
		var_Column->PutDef(EXGANTTLib::exCellCaptionFormat,long(1));
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->AddItem(long(10));
	var_Items->AddItem(long(-8));
spGantt1->EndUpdate();

818:
How do I hide the selection
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->PutMarkSearchColumn(VARIANT_FALSE);
spGantt1->PutSelForeColor(spGantt1->GetForeColor());
spGantt1->PutSelBackColor(spGantt1->GetBackColor());
spGantt1->PutShowFocusRect(VARIANT_FALSE);
EXGANTTLib::IColumnsPtr var_Columns = spGantt1->GetColumns();
	EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"Format")));
		var_Column->PutFormatColumn(_bstr_t("type(value) in (0,1) ? 'null' : ( dbl(value)<0 ? '<fgcolor=FF0000>'+ (value format '2|.|3|,|1' ) : (dbl(value)>0 ? '<fgcolor=00") +
"00FF>+'+(value format '2|.|3|,' ): '0.00') )");
		var_Column->PutDef(EXGANTTLib::exCellCaptionFormat,long(1));
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->AddItem(long(10));
	var_Items->AddItem(long(-8));
spGantt1->EndUpdate();

817:
How do I access the cells, or how do I get the values in the columns
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
EXGANTTLib::IColumnsPtr var_Columns = spGantt1->GetColumns();
	var_Columns->Add(L"C1");
	var_Columns->Add(L"C2");
	var_Columns->Add(L"C3");
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	long h = var_Items->AddItem("Item 1");
	var_Items->PutCellCaption(h,long(1),"SubItem 1.1");
	var_Items->PutCellCaption(h,long(2),"SubItem 1.2");
	OutputDebugStringW( _bstr_t(var_Items->GetCellCaption(h,long(2))) );

816:
How can I change the check-boxes appearance

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->PutLinesAtRoot(EXGANTTLib::exLinesAtRoot);
EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Default")));
	var_Column->PutDef(EXGANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
EXGANTTLib::IAppearancePtr var_Appearance = spGantt1->GetVisualAppearance();
	var_Appearance->Add(1,"XP:Button 3 12");
	var_Appearance->Add(2,"XP:Button 3 11");
	var_Appearance->Add(3,"XP:Button 3 10");
spGantt1->PutCheckImage(EXGANTTLib::Unchecked,16777216);
spGantt1->PutCheckImage(EXGANTTLib::Checked,33554432);
spGantt1->PutCheckImage(EXGANTTLib::PartialChecked,50331648);

815:
How can I load my table from an Access 2007, using ADO

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemGantt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'
		#import <ExGantt.dll>
		using namespace EXGANTTLib;
	*/
	EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
	EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
		var_Items->AddBar(Item,"Task",var_Items->GetCellCaption(Item,long(2)),var_Items->GetCellCaption(Item,long(4)),vtMissing,vtMissing);
}

EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
EXGANTTLib::IChartPtr var_Chart = spGantt1->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(EXGANTTLib::exDay);
	var_Chart->PutFirstWeekDay(EXGANTTLib::exMonday);
	var_Chart->PutOverviewVisible(EXGANTTLib::exOverviewShowAll);
spGantt1->PutColumnAutoResize(VARIANT_FALSE);
spGantt1->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\\ExGantt\\Sample\\Access2007\\sample.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGantt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGantt1->EndUpdate();

814:
Is it possible display numbers in the same format no matter of regional settings in the control panel

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Def")))->PutDef(EXGANTTLib::exCellCaptionFormat,long(1));
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	long h = var_Items->AddItem(double(666666.27));
	var_Items->PutFormatCell(h,long(0),L"(value format '') +  ' <fgcolor=808080>(default positive)'");
	h = var_Items->AddItem(double(666666.27));
	var_Items->PutFormatCell(h,long(0),L"(value format '2|.|3|,|1|1')");
	h = var_Items->AddItem(double(-666666.27));
	var_Items->PutFormatCell(h,long(0),L"(value format '') +  ' <fgcolor=808080>(default negative)'");
	h = var_Items->AddItem(double(-666666.27));
	var_Items->PutFormatCell(h,long(0),L"(value format '2|.|3|,|1|1')");
spGantt1->EndUpdate();

813:
The right pane needs to show ONLY the hours 6am to 9pm (every hour) for one day only and the user should not to be able to scroll left or right nor see any other hours. How can I do that

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->GetColumns()->Add(L"Tasks");
EXGANTTLib::IChartPtr var_Chart = spGantt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutScrollRange(EXGANTTLib::exStartDate,COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutScrollRange(EXGANTTLib::exEndDate,COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutUnitScale(EXGANTTLib::exHour);
	var_Chart->PutNonworkingHours(12582975);
	var_Chart->PutShowNonworkingUnits(VARIANT_FALSE);
	var_Chart->GetLevel(0)->PutAlignment(EXGANTTLib::AlignmentEnum(EXGANTTLib::exHOutside | EXGANTTLib::CenterAlignment));
	var_Chart->PutUnitWidth(18);
	var_Chart->PutPaneWidth(VARIANT_TRUE,294);
	var_Chart->PutScrollBar(VARIANT_FALSE);
spGantt1->PutOnResizeControl(EXGANTTLib::exDisableSplitter);
spGantt1->EndUpdate();

812:
Can I use ebn files to display the selected dates

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
EXGANTTLib::IAppearancePtr var_Appearance = spGantt1->GetVisualAppearance();
	var_Appearance->Add(2,"c:\\exontrol\\images\\normal.ebn");
	var_Appearance->Add(1,"CP:2 0 -4 0 4");
EXGANTTLib::IChartPtr var_Chart = spGantt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE());
	var_Chart->PutMarkTodayColor(var_Chart->GetBackColor());
	var_Chart->PutLevelCount(2);
	var_Chart->PutMarkSelectDateColor(0x1000000);
	var_Chart->PutSelectLevel(1);
	var_Chart->PutSelectDate(COleDateTime(2008,1,3,0,00,00).operator DATE(),VARIANT_TRUE);
	var_Chart->PutSelectDate(COleDateTime(2008,1,4,0,00,00).operator DATE(),VARIANT_TRUE);
spGantt1->GetColumns()->Add(L"Default");
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Item 1"),"Task",COleDateTime(2008,1,2,0,00,00).operator DATE(),COleDateTime(2008,1,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2008,1,3,0,00,00).operator DATE(),COleDateTime(2008,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Item 3"),"Task",COleDateTime(2008,1,4,0,00,00).operator DATE(),COleDateTime(2008,1,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Item 4"),"Task",COleDateTime(2008,1,5,0,00,00).operator DATE(),COleDateTime(2008,1,9,0,00,00).operator DATE(),vtMissing,vtMissing);
spGantt1->EndUpdate();

811:
Can I use ebn files to display the selected dates

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn");
EXGANTTLib::IChartPtr var_Chart = spGantt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE());
	var_Chart->PutMarkTodayColor(var_Chart->GetBackColor());
	var_Chart->PutLevelCount(2);
	var_Chart->PutMarkSelectDateColor(0x1000000);
	var_Chart->PutSelectLevel(1);
	var_Chart->PutSelectDate(COleDateTime(2008,1,3,0,00,00).operator DATE(),VARIANT_TRUE);
spGantt1->GetColumns()->Add(L"Default");
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Item 1"),"Task",COleDateTime(2008,1,2,0,00,00).operator DATE(),COleDateTime(2008,1,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2008,1,3,0,00,00).operator DATE(),COleDateTime(2008,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Item 3"),"Task",COleDateTime(2008,1,4,0,00,00).operator DATE(),COleDateTime(2008,1,8,0,00,00).operator DATE(),vtMissing,vtMissing);
spGantt1->EndUpdate();

810:
How can I change the color for selected dates to be solid

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
EXGANTTLib::IChartPtr var_Chart = spGantt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE());
	var_Chart->PutMarkTodayColor(var_Chart->GetBackColor());
	var_Chart->PutLevelCount(2);
	var_Chart->PutMarkSelectDateColor(0x7fff0000);
	var_Chart->PutSelectLevel(1);
	var_Chart->PutSelectDate(COleDateTime(2008,1,15,0,00,00).operator DATE(),VARIANT_TRUE);
	var_Chart->PutSelectDate(COleDateTime(2008,1,16,0,00,00).operator DATE(),VARIANT_TRUE);
spGantt1->EndUpdate();

809:
How can I add or change the padding (spaces) for captions in the control's header

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Padding-Left")))->PutDef(EXGANTTLib::exHeaderPaddingLeft,long(18));
EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Padding-Right")));
	var_Column->PutDef(EXGANTTLib::exHeaderPaddingRight,long(18));
	var_Column->PutHeaderAlignment(EXGANTTLib::RightAlignment);
spGantt1->EndUpdate();

808:
Do you have any plans to add cell spacing and cell padding to the cells

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spGantt1->PutDrawGridLines(EXGANTTLib::exAllLines);
EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Padding-Left")));
	var_Column->PutDef(EXGANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutDef(EXGANTTLib::exCellPaddingLeft,long(18));
((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"No-Padding")))->PutDef(EXGANTTLib::exCellHasCheckBox,VARIANT_TRUE);
((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Empty")))->PutPosition(0);
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->PutCellCaption(var_Items->AddItem("Item A.1"),long(1),"Item A.2");
	var_Items->PutCellCaption(var_Items->AddItem("Item B.1"),long(1),"Item B.2");
	var_Items->PutCellCaption(var_Items->AddItem("Item C.1"),long(1),"Item C.2");
spGantt1->EndUpdate();

807:
Is it possible to display information about the firing events
// Event event - Notifies the application once the control fires an event.
void OnEventGantt1(long   EventID)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'
		#import <ExGantt.dll>
		using namespace EXGANTTLib;
	*/
	EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
	OutputDebugStringW( _bstr_t(spGantt1->GetEventParam(-2)) );
}


806:
Is it possible to scroll the control's content by clicking and moving the mouse up or down

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemGantt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'
		#import <ExGantt.dll>
		using namespace EXGANTTLib;
	*/
	EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
	EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
		var_Items->AddBar(Item,"Task",var_Items->GetCellCaption(Item,long(2)),var_Items->GetCellCaption(Item,long(4)),vtMissing,vtMissing);
}

EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
EXGANTTLib::IChartPtr var_Chart = spGantt1->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(EXGANTTLib::exDay);
	var_Chart->PutFirstWeekDay(EXGANTTLib::exMonday);
	var_Chart->PutOverviewVisible(EXGANTTLib::exOverviewShowAll);
spGantt1->PutColumnAutoResize(VARIANT_FALSE);
spGantt1->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);
spGantt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGantt1->PutAutoDrag(EXGANTTLib::exAutoDragScroll);
spGantt1->EndUpdate();

805:
How do I load bars from my ADO table/database

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemGantt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGANTTLib' for the library: 'ExGantt 1.0 Control Library'
		#import <ExGantt.dll>
		using namespace EXGANTTLib;
	*/
	EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
	EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
		var_Items->AddBar(Item,"Task",var_Items->GetCellCaption(Item,long(2)),var_Items->GetCellCaption(Item,long(4)),vtMissing,vtMissing);
}

EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
EXGANTTLib::IChartPtr var_Chart = spGantt1->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(EXGANTTLib::exDay);
	var_Chart->PutFirstWeekDay(EXGANTTLib::exMonday);
	var_Chart->PutOverviewVisible(EXGANTTLib::exOverviewShowAll);
spGantt1->PutColumnAutoResize(VARIANT_FALSE);
spGantt1->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);
spGantt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGantt1->EndUpdate();

804:
Is it possible to auto-numbering the children items but still keeps the position after filtering

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spGantt1->PutLinesAtRoot(EXGANTTLib::exLinesAtRoot);
EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Items")));
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutFilterType(EXGANTTLib::exFilter);
	var_Column->PutFilter(L"Child 2");
EXGANTTLib::IColumnPtr var_Column1 = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Pos.1")));
	var_Column1->PutFormatColumn(L"1 ropos ''");
	var_Column1->PutPosition(0);
	var_Column1->PutWidth(32);
	var_Column1->PutAllowSizing(VARIANT_FALSE);
EXGANTTLib::IColumnPtr var_Column2 = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Pos.2")));
	var_Column2->PutFormatColumn(L"1 ropos ':'");
	var_Column2->PutPosition(1);
	var_Column2->PutWidth(32);
	var_Column2->PutAllowSizing(VARIANT_FALSE);
EXGANTTLib::IColumnPtr var_Column3 = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Pos.3")));
	var_Column3->PutFormatColumn(L"1 ropos ':|A-Z'");
	var_Column3->PutPosition(2);
	var_Column3->PutWidth(32);
	var_Column3->PutAllowSizing(VARIANT_FALSE);
EXGANTTLib::IColumnPtr var_Column4 = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Pos.4")));
	var_Column4->PutFormatColumn(L"1 ropos '|A-Z|'");
	var_Column4->PutPosition(3);
	var_Column4->PutWidth(32);
	var_Column4->PutAllowSizing(VARIANT_FALSE);
EXGANTTLib::IColumnPtr var_Column5 = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Pos.5")));
	var_Column5->PutFormatColumn(L"'<font Tahoma;7>' + 1 ropos '-<b>||A-Z'");
	var_Column5->PutDef(EXGANTTLib::exCellCaptionFormat,long(1));
	var_Column5->PutPosition(4);
	var_Column5->PutWidth(32);
	var_Column5->PutAllowSizing(VARIANT_FALSE);
EXGANTTLib::IColumnPtr var_Column6 = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Pos.6")));
	var_Column6->PutFormatColumn(L"'<b>'+ 1 ropos '</b>:<fgcolor=FF0000>|A-Z|'");
	var_Column6->PutDef(EXGANTTLib::exCellCaptionFormat,long(1));
	var_Column6->PutPosition(5);
	var_Column6->PutWidth(48);
	var_Column6->PutAllowSizing(VARIANT_FALSE);
EXGANTTLib::IItemsPtr var_Items = spGantt1->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");
spGantt1->ApplyFilter();
spGantt1->EndUpdate();

803:
Is it possible to auto-numbering the children items too

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
spGantt1->BeginUpdate();
spGantt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spGantt1->PutLinesAtRoot(EXGANTTLib::exLinesAtRoot);
spGantt1->GetColumns()->Add(L"Items");
EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Pos.1")));
	var_Column->PutFormatColumn(L"1 rpos ''");
	var_Column->PutPosition(0);
	var_Column->PutWidth(32);
	var_Column->PutAllowSizing(VARIANT_FALSE);
EXGANTTLib::IColumnPtr var_Column1 = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Pos.2")));
	var_Column1->PutFormatColumn(L"1 rpos ':'");
	var_Column1->PutPosition(1);
	var_Column1->PutWidth(32);
	var_Column1->PutAllowSizing(VARIANT_FALSE);
EXGANTTLib::IColumnPtr var_Column2 = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Pos.3")));
	var_Column2->PutFormatColumn(L"1 rpos ':|A-Z'");
	var_Column2->PutPosition(2);
	var_Column2->PutWidth(32);
	var_Column2->PutAllowSizing(VARIANT_FALSE);
EXGANTTLib::IColumnPtr var_Column3 = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Pos.4")));
	var_Column3->PutFormatColumn(L"1 rpos '|A-Z|'");
	var_Column3->PutPosition(3);
	var_Column3->PutWidth(32);
	var_Column3->PutAllowSizing(VARIANT_FALSE);
EXGANTTLib::IColumnPtr var_Column4 = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Pos.5")));
	var_Column4->PutFormatColumn(L"'<font Tahoma;7>' + 1 rpos '-<b>||A-Z'");
	var_Column4->PutDef(EXGANTTLib::exCellCaptionFormat,long(1));
	var_Column4->PutPosition(4);
	var_Column4->PutWidth(32);
	var_Column4->PutAllowSizing(VARIANT_FALSE);
EXGANTTLib::IColumnPtr var_Column5 = ((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Pos.6")));
	var_Column5->PutFormatColumn(L"'<b>'+ 1 rpos '</b>:<fgcolor=FF0000>|A-Z|'");
	var_Column5->PutDef(EXGANTTLib::exCellCaptionFormat,long(1));
	var_Column5->PutPosition(5);
	var_Column5->PutWidth(48);
	var_Column5->PutAllowSizing(VARIANT_FALSE);
EXGANTTLib::IItemsPtr var_Items = spGantt1->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");
spGantt1->EndUpdate();

802:
Is there any way to add auto-numbering

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
EXGANTTLib::IColumnsPtr var_Columns = spGantt1->GetColumns();
	var_Columns->Add(L"Items");
	EXGANTTLib::IColumnPtr var_Column = ((EXGANTTLib::IColumnPtr)(var_Columns->Add(L"Pos")));
		var_Column->PutFormatColumn(L"1 pos ''");
		var_Column->PutPosition(0);
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->AddItem("Item 1");
	var_Items->AddItem("Item 2");
	var_Items->AddItem("Item 3");

801:
How can I format my column to display the percent values “5,00%”

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

	#import <ExGantt.dll>
	using namespace EXGANTTLib;
*/
EXGANTTLib::IGanttPtr spGantt1 = GetDlgItem(IDC_GANTT1)->GetControlUnknown();
((EXGANTTLib::IColumnPtr)(spGantt1->GetColumns()->Add(L"Percent")))->PutFormatColumn(L"((dbl(value) * 100) format '2|,|3.')+'%'");
EXGANTTLib::IItemsPtr var_Items = spGantt1->GetItems();
	var_Items->AddItem(double(0.5));
	var_Items->AddItem(double(0.4));
	var_Items->AddItem(double(0.75));