2337 |
How can I convert the exBarStart/exBarEnd property to a string (by default it returns as VARIANT/VT_DATE type, method 3)
// BarResizing event - Occurs when a bar is moving or resizing. void OnBarResizingG2antt1(long Item,VARIANT Key) { OutputDebugStringW( L"Start" ); /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); OutputDebugStringW( L"Key" ); OutputDebugStringW( _bstr_t(spG2antt1->GetItems()->GetItemBar(Item,Key,EXG2ANTTLib::exBarStartStr)) ); OutputDebugStringW( L"End" ); OutputDebugStringW( L"Key" ); OutputDebugStringW( _bstr_t(spG2antt1->GetItems()->GetItemBar(Item,Key,EXG2ANTTLib::exBarEndStr)) ); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Tasks"); spG2antt1->PutDebug(VARIANT_TRUE); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->PutPaneWidth(VARIANT_FALSE,96); var_Chart->PutResizeUnitScale(EXG2ANTTLib::exMinute); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,24,0,00,00).operator DATE(),"K1",vtMissing); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2006,9,22,0,00,00).operator DATE(),COleDateTime(2006,9,25,0,00,00).operator DATE(),"K2",vtMissing); var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2006,9,23,0,00,00).operator DATE(),COleDateTime(2006,9,26,0,00,00).operator DATE(),"K3",vtMissing); spG2antt1->EndUpdate(); |
2336 |
How can I convert the exBarStart/exBarEnd property to a string (by default it returns as VARIANT/VT_DATE type, method 2)
// BarResizing event - Occurs when a bar is moving or resizing. void OnBarResizingG2antt1(long Item,VARIANT Key) { OutputDebugStringW( L"Start" ); /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); OutputDebugStringW( L"Key" ); OutputDebugStringW( _bstr_t(spG2antt1->FormatABC(L"dateF(value)",spG2antt1->GetItems()->GetItemBar(Item,Key,EXG2ANTTLib::exBarStart),vtMissing,vtMissing)) ); OutputDebugStringW( L"End" ); OutputDebugStringW( L"Key" ); OutputDebugStringW( _bstr_t(spG2antt1->FormatABC(L"dateF(value)",spG2antt1->GetItems()->GetItemBar(Item,Key,EXG2ANTTLib::exBarEnd),vtMissing,vtMissing)) ); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Tasks"); spG2antt1->PutDebug(VARIANT_TRUE); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->PutPaneWidth(VARIANT_FALSE,96); var_Chart->PutResizeUnitScale(EXG2ANTTLib::exMinute); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,24,0,00,00).operator DATE(),"K1",vtMissing); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2006,9,22,0,00,00).operator DATE(),COleDateTime(2006,9,25,0,00,00).operator DATE(),"K2",vtMissing); var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2006,9,23,0,00,00).operator DATE(),COleDateTime(2006,9,26,0,00,00).operator DATE(),"K3",vtMissing); spG2antt1->EndUpdate(); |
2335 |
How can I convert the exBarStart/exBarEnd property to a string (by default it returns as VARIANT/VT_DATE type, method 1)
// BarResizing event - Occurs when a bar is moving or resizing. void OnBarResizingG2antt1(long Item,VARIANT Key) { OutputDebugStringW( L"Start" ); /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); OutputDebugStringW( L"Key" ); OutputDebugStringW( _bstr_t(spG2antt1->FormatABC(L"date(value) format `MM/dd/yyyy HH:mm:ss`",spG2antt1->GetItems()->GetItemBar(Item,Key,EXG2ANTTLib::exBarStart),vtMissing,vtMissing)) ); OutputDebugStringW( L"End" ); OutputDebugStringW( L"Key" ); OutputDebugStringW( _bstr_t(spG2antt1->FormatABC(L"date(value) format `MM/dd/yyyy HH:mm:ss`",spG2antt1->GetItems()->GetItemBar(Item,Key,EXG2ANTTLib::exBarEnd),vtMissing,vtMissing)) ); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Tasks"); spG2antt1->PutDebug(VARIANT_TRUE); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->PutPaneWidth(VARIANT_FALSE,96); var_Chart->PutResizeUnitScale(EXG2ANTTLib::exMinute); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,24,0,00,00).operator DATE(),"K1",vtMissing); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2006,9,22,0,00,00).operator DATE(),COleDateTime(2006,9,25,0,00,00).operator DATE(),"K2",vtMissing); var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2006,9,23,0,00,00).operator DATE(),COleDateTime(2006,9,26,0,00,00).operator DATE(),"K3",vtMissing); spG2antt1->EndUpdate(); |
2334 |
Add/Remove/Updates the item-bar's resources
// Click event - Occurs when the user presses and then releases the left mouse button over the tree control. void OnClickG2antt1() { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->GetSelectedItem(0); var_Items->PutItemBar(h,var_Items->GetFirstItemBar(h),EXG2ANTTLib::exBarResources,"+R4[10%]"); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); spG2antt1->PutHeaderHeight(24); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,96); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task"); var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18)); var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<%=%49%>"); spG2antt1->GetColumns()->Add(L"Machines"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Machine 1"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,6,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"K1",vtMissing); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarResources,"R1,R2"); h = var_Items->AddItem("Machine 2"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,14,0,00,00).operator DATE(),"K2",vtMissing); var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarResources,"R2[75%],R3"); spG2antt1->EndUpdate(); |
2333 |
Distributes resources to a bar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); spG2antt1->PutHeaderHeight(24); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,96); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task"); var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18)); var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<%=%49%>"); spG2antt1->GetColumns()->Add(L"Machines"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Machine 1"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,6,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"K1",vtMissing); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarResources,"R1,R2"); h = var_Items->AddItem("Machine 2"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,14,0,00,00).operator DATE(),"K2",vtMissing); var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarResources,"R2[75%],R3"); spG2antt1->EndUpdate(); |
2332 |
How can I display additional information about a time zone when the user clicks on it (expandable)
|
2331 |
How can I have a tooltip for a marked TimeZone
// MouseMove event - Occurs when the user moves the mouse. void OnMouseMoveG2antt1(short Button,short Shift,long X,long Y) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->ShowToolTip(spG2antt1->GetChart()->GetTimeZoneFromPoint(-1,-1),"",vtMissing,"+8",vtMissing); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2009,12,28,0,00,00).operator DATE()); var_Chart->MarkTimeZone("Top",COleDateTime(2010,1,1,0,00,00).operator DATE(),COleDateTime(2010,1,5,0,00,00).operator DATE(),long(16711680),"1;;<fgcolor=FFFFFF>Top;1"); var_Chart->MarkTimeZone("Partial",COleDateTime(2010,1,8,0,00,00).operator DATE(),COleDateTime(2010,1,12,0,00,00).operator DATE(),long(16711680),"50;;<fgcolor=FFFFFF>Partial;1"); var_Chart->MarkTimeZone("Default",COleDateTime(2010,1,15,0,00,00).operator DATE(),COleDateTime(2010,1,19,0,00,00).operator DATE(),long(16711680),";;<fgcolor=FFFFFF>Default;1"); |
2330 |
Can I set a filter that automatically adds a * before and after the word, so the user can just search for 'cat' and it becomes '*cat*' automatically
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); spG2antt1->PutHeaderHeight(24); spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Items"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutDisplayFilterPattern(VARIANT_TRUE); var_Column->PutDef(EXG2ANTTLib::exFilterPatternTemplate,"*<%filter%>*"); var_Column->PutFilterType(EXG2ANTTLib::exPattern); var_Column->PutFilter(L"1"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); spG2antt1->ApplyFilter(); spG2antt1->EndUpdate(); |
2329 |
The fine dotted lines in the control appear much thicker than the standard ones we've been using. How can we fix this
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); spG2antt1->PutHeaderHeight(24); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines); spG2antt1->PutGridLineStyle(EXG2ANTTLib::exGridLinesGeometric); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutGridLineStyle(EXG2ANTTLib::exGridLinesGeometric); var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines); spG2antt1->PutColumnAutoResize(VARIANT_FALSE); spG2antt1->GetColumns()->Add(L"Column 1"); spG2antt1->GetColumns()->Add(L"Column 2"); spG2antt1->GetColumns()->Add(L"Column 3"); spG2antt1->GetColumns()->Add(L"Column 4"); spG2antt1->EndUpdate(); |
2328 |
Load data as a tree using a parent-id relationship
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutColumnAutoResize(VARIANT_FALSE); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); spG2antt1->PutHeaderHeight(24); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exVLines); spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot); /* 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 Employees WHERE 1=0","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.mdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0); spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs))); spG2antt1->GetColumns()->GetItem(long(0))->PutWidth(128); rs = ::CreateObject(L"ADODB.Recordset"); rs->Open("Employees","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.mdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0); spG2antt1->PutItems(rs->GetRows(0,vtMissing,vtMissing),";0;17"); spG2antt1->GetItems()->PutExpandItem(0,VARIANT_TRUE); spG2antt1->EndUpdate(); |
2327 |
Is there a way to change the contents of the drop down editor based on a value in another column
// AddItem event - Occurs after a new Item has been inserted to Items collection. void OnAddItemG2antt1(long Item) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetItems()->PutCellEditorVisible(Item,long(0),EXG2ANTTLib::exEditorVisible); spG2antt1->GetItems()->PutCellEditorVisible(Item,long(1),EXG2ANTTLib::exEditorVisible); } // EditOpen event - Occurs when the edit operation starts. void OnEditOpenG2antt1() { EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); _variant_t v = var_Items->GetCellValue(var_Items->GetFocusItem(),long(0)); _bstr_t c = var_Items->GetCellCaption(var_Items->GetFocusItem(),long(0)); EXG2ANTTLib::IEditorPtr var_Editor = spG2antt1->GetColumns()->GetItem(long(1))->GetEditor(); var_Editor->ClearItems(); var_Editor->AddItem(v,L"c",vtMissing); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); spG2antt1->PutHeaderHeight(24); spG2antt1->PutGridLineStyle(EXG2ANTTLib::exGridLinesGeometric); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"DropDownList"))); EXG2ANTTLib::IEditorPtr var_Editor = var_Column->GetEditor(); var_Editor->PutEditType(EXG2ANTTLib::DropDownListType); var_Editor->AddItem(1,L"First",vtMissing); var_Editor->AddItem(2,L"Second",vtMissing); var_Editor->AddItem(3,L"Third",vtMissing); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"DropDownList-Related")))->GetEditor()->PutEditType(EXG2ANTTLib::DropDownListType); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutCellValue(var_Items->AddItem(long(1)),long(1),long(-1)); var_Items->PutCellValue(var_Items->AddItem(long(2)),long(1),long(-1)); var_Items->PutCellValue(var_Items->AddItem(long(3)),long(1),long(-1)); var_Items->PutLockedItemCount(EXG2ANTTLib::exBottom,1); long h = var_Items->GetLockedItem(EXG2ANTTLib::exBottom,0); var_Items->PutItemDivider(h,0); var_Items->PutItemDividerLineAlignment(h,EXG2ANTTLib::DividerTop); var_Items->PutCellEditorVisible(h,long(0),EXG2ANTTLib::exEditorHidden); var_Items->PutCellSingleLine(h,long(0),EXG2ANTTLib::exCaptionWordWrap); var_Items->PutCellValueFormat(h,long(0),EXG2ANTTLib::exHTML); var_Items->PutCellValue(h,long(0),_bstr_t("The drop down editor in the second column is filled during the <b>EditOpen event</b>, and the values are based on the selection") + " on the first column."); spG2antt1->EndUpdate(); |
2326 |
Highlight the editable fields
// Change event - Occurs when the user changes the cell's content. void OnChangeG2antt1(long Item,long ColIndex,VARIANT FAR* NewValue) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->Refresh(); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->FreezeEvents(VARIANT_TRUE); spG2antt1->BeginUpdate(); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); spG2antt1->PutHeaderHeight(24); spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot); EXG2ANTTLib::IConditionalFormatsPtr var_ConditionalFormats = spG2antt1->GetConditionalFormats(); EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = var_ConditionalFormats->Add(L"%CE1",vtMissing); var_ConditionalFormat->PutBold(VARIANT_TRUE); var_ConditionalFormat->PutBackColor(RGB(245,245,245)); var_ConditionalFormat->PutApplyTo(EXG2ANTTLib::FormatApplyToEnum(0x1)); EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat1 = var_ConditionalFormats->Add(L"%CE2",vtMissing); var_ConditionalFormat1->PutBold(VARIANT_TRUE); var_ConditionalFormat1->PutBackColor(RGB(245,245,245)); var_ConditionalFormat1->PutApplyTo(EXG2ANTTLib::FormatApplyToEnum(0x2)); EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat2 = var_ConditionalFormats->Add(L"%CE3",vtMissing); var_ConditionalFormat2->PutBold(VARIANT_TRUE); var_ConditionalFormat2->PutBackColor(RGB(245,245,245)); var_ConditionalFormat2->PutApplyTo(EXG2ANTTLib::FormatApplyToEnum(0x3)); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); var_Columns->Add(L"Description"); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Qty"))); var_Column->GetEditor()->PutEditType(EXG2ANTTLib::SpinType); var_Column->PutDef(EXG2ANTTLib::exTotalColumn,"sum(current,rec,%1)"); EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Price"))); var_Column1->PutDef(EXG2ANTTLib::exTotalColumn,"avg(current,rec,%2)"); var_Column1->GetEditor()->PutEditType(EXG2ANTTLib::SpinType); EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Amount"))); var_Column2->PutComputedField(L"%1 * %2"); var_Column2->PutDef(EXG2ANTTLib::exTotalColumn,"sum(current,rec,%3)"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long r = var_Items->AddItem("Root"); long g1 = var_Items->InsertItem(r,vtMissing,"Group 1"); long h = var_Items->InsertItem(g1,vtMissing,"Item 1"); var_Items->PutCellValue(h,long(1),long(1)); var_Items->PutCellValue(h,long(2),long(10)); h = var_Items->InsertItem(g1,vtMissing,"Item 2"); var_Items->PutCellValue(h,long(1),long(2)); var_Items->PutCellValue(h,long(2),long(11)); long g2 = var_Items->InsertItem(r,vtMissing,"Group 2"); h = var_Items->InsertItem(g2,vtMissing,"Item 1"); var_Items->PutCellValue(h,long(1),long(3)); var_Items->PutCellValue(h,long(2),long(12)); h = var_Items->InsertItem(g2,vtMissing,"Item 2"); var_Items->PutCellValue(h,long(1),long(4)); var_Items->PutCellValue(h,long(2),long(13)); var_Items->PutExpandItem(0,VARIANT_TRUE); spG2antt1->EndUpdate(); spG2antt1->FreezeEvents(VARIANT_FALSE); |
2325 |
Highlight the total fields
// Change event - Occurs when the user changes the cell's content. void OnChangeG2antt1(long Item,long ColIndex,VARIANT FAR* NewValue) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->Refresh(); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->FreezeEvents(VARIANT_TRUE); spG2antt1->BeginUpdate(); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); spG2antt1->PutHeaderHeight(24); spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot); EXG2ANTTLib::IConditionalFormatsPtr var_ConditionalFormats = spG2antt1->GetConditionalFormats(); EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = var_ConditionalFormats->Add(L"%CT1",vtMissing); var_ConditionalFormat->PutForeColor(RGB(128,128,128)); var_ConditionalFormat->PutApplyTo(EXG2ANTTLib::FormatApplyToEnum(0x1)); EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat1 = var_ConditionalFormats->Add(L"%CT2",vtMissing); var_ConditionalFormat1->PutForeColor(RGB(128,128,128)); var_ConditionalFormat1->PutApplyTo(EXG2ANTTLib::FormatApplyToEnum(0x2)); EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat2 = var_ConditionalFormats->Add(L"%CT3",vtMissing); var_ConditionalFormat2->PutForeColor(RGB(128,128,128)); var_ConditionalFormat2->PutApplyTo(EXG2ANTTLib::FormatApplyToEnum(0x3)); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); var_Columns->Add(L"Description"); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Qty"))); var_Column->GetEditor()->PutEditType(EXG2ANTTLib::SpinType); var_Column->PutDef(EXG2ANTTLib::exTotalColumn,"sum(current,rec,%1)"); EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Price"))); var_Column1->PutDef(EXG2ANTTLib::exTotalColumn,"avg(current,rec,%2)"); var_Column1->GetEditor()->PutEditType(EXG2ANTTLib::SpinType); EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Amount"))); var_Column2->PutComputedField(L"%1 * %2"); var_Column2->PutDef(EXG2ANTTLib::exTotalColumn,"sum(current,rec,%3)"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long r = var_Items->AddItem("Root"); long g1 = var_Items->InsertItem(r,vtMissing,"Group 1"); long h = var_Items->InsertItem(g1,vtMissing,"Item 1"); var_Items->PutCellValue(h,long(1),long(1)); var_Items->PutCellValue(h,long(2),long(10)); h = var_Items->InsertItem(g1,vtMissing,"Item 2"); var_Items->PutCellValue(h,long(1),long(2)); var_Items->PutCellValue(h,long(2),long(11)); long g2 = var_Items->InsertItem(r,vtMissing,"Group 2"); h = var_Items->InsertItem(g2,vtMissing,"Item 1"); var_Items->PutCellValue(h,long(1),long(3)); var_Items->PutCellValue(h,long(2),long(12)); h = var_Items->InsertItem(g2,vtMissing,"Item 2"); var_Items->PutCellValue(h,long(1),long(4)); var_Items->PutCellValue(h,long(2),long(13)); var_Items->PutExpandItem(0,VARIANT_TRUE); spG2antt1->EndUpdate(); spG2antt1->FreezeEvents(VARIANT_FALSE); |
2324 |
Highlight the leaf items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetConditionalFormats()->Add(L"%CC0=0",vtMissing)->PutForeColor(RGB(128,128,128)); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); spG2antt1->PutHeaderHeight(24); spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Item")))->PutWidth(16); var_Columns->Add(L"Desc"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long hR = var_Items->AddItem("Root"); var_Items->PutCellValue(hR,long(1),"The root directory /"); var_Items->PutExpandItem(hR,VARIANT_TRUE); long h = var_Items->InsertItem(hR,vtMissing,"Home"); var_Items->PutCellValue(h,long(1),"The home directory with user directories Alice and Bob"); var_Items->InsertItem(h,vtMissing,"Alice"); var_Items->InsertItem(h,vtMissing,"Bob"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->InsertItem(hR,vtMissing,"Etc"); var_Items->PutCellValue(h,long(1),"The etc directory with one configuration file"); h = var_Items->InsertItem(h,vtMissing,"nginx.conf"); var_Items->PutCellValue(var_Items->InsertItem(hR,vtMissing,"Var"),long(1),"The var directory"); spG2antt1->EndUpdate(); |
2323 |
Highlight the parent items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetConditionalFormats()->Add(L"%CC0",vtMissing)->PutForeColor(RGB(255,0,0)); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); spG2antt1->PutHeaderHeight(24); spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Item")))->PutWidth(16); var_Columns->Add(L"Desc"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long hR = var_Items->AddItem("Root"); var_Items->PutCellValue(hR,long(1),"The root directory /"); var_Items->PutExpandItem(hR,VARIANT_TRUE); long h = var_Items->InsertItem(hR,vtMissing,"Home"); var_Items->PutCellValue(h,long(1),"The home directory with user directories Alice and Bob"); var_Items->InsertItem(h,vtMissing,"Alice"); var_Items->InsertItem(h,vtMissing,"Bob"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->InsertItem(hR,vtMissing,"Etc"); var_Items->PutCellValue(h,long(1),"The etc directory with one configuration file"); h = var_Items->InsertItem(h,vtMissing,"nginx.conf"); var_Items->PutCellValue(var_Items->InsertItem(hR,vtMissing,"Var"),long(1),"The var directory"); spG2antt1->EndUpdate(); |
2322 |
Highlight the item being expanded or collapsed
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetConditionalFormats()->Add(L"%CX0",vtMissing)->PutBold(VARIANT_TRUE); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); spG2antt1->PutHeaderHeight(24); spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Item")))->PutWidth(16); var_Columns->Add(L"Desc"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long hR = var_Items->AddItem("Root"); var_Items->PutCellValue(hR,long(1),"The root directory /"); var_Items->PutExpandItem(hR,VARIANT_TRUE); long h = var_Items->InsertItem(hR,vtMissing,"Home"); var_Items->PutCellValue(h,long(1),"The home directory with user directories Alice and Bob"); var_Items->InsertItem(h,vtMissing,"Alice"); var_Items->InsertItem(h,vtMissing,"Bob"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->InsertItem(hR,vtMissing,"Etc"); var_Items->PutCellValue(h,long(1),"The etc directory with one configuration file"); h = var_Items->InsertItem(h,vtMissing,"nginx.conf"); var_Items->PutCellValue(var_Items->InsertItem(hR,vtMissing,"Var"),long(1),"The var directory"); spG2antt1->EndUpdate(); |
2321 |
I am using exTotalColumn. Is there an option to exclude specific cells to display the total
// Change event - Occurs when the user changes the cell's content. void OnChangeG2antt1(long Item,long ColIndex,VARIANT FAR* NewValue) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->Refresh(); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->FreezeEvents(VARIANT_TRUE); spG2antt1->BeginUpdate(); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); spG2antt1->PutHeaderHeight(24); spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); var_Columns->Add(L"Description"); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Qty"))); var_Column->GetEditor()->PutEditType(EXG2ANTTLib::SpinType); var_Column->PutDef(EXG2ANTTLib::exTotalColumn,"sum(current,rec,%1)"); EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Price"))); var_Column1->PutDef(EXG2ANTTLib::exTotalColumn,"avg(current,rec,%2)"); var_Column1->GetEditor()->PutEditType(EXG2ANTTLib::SpinType); EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Amount"))); var_Column2->PutComputedField(L"%1 * %2"); var_Column2->PutDef(EXG2ANTTLib::exTotalColumn,"sum(current,rec,%3)"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long r = var_Items->AddItem("Root"); long g1 = var_Items->InsertItem(r,vtMissing,"Group 1"); var_Items->PutFormatCell(g1,long(2),L"`<average missing>`"); var_Items->PutCellEditorVisible(g1,long(2),EXG2ANTTLib::exEditorHidden); var_Items->PutCellBold(g1,long(2),VARIANT_TRUE); var_Items->PutCellForeColor(g1,long(2),RGB(255,0,0)); long h = var_Items->InsertItem(g1,vtMissing,"Item 1"); var_Items->PutCellValue(h,long(1),long(1)); var_Items->PutCellValue(h,long(2),long(10)); h = var_Items->InsertItem(g1,vtMissing,"Item 2"); var_Items->PutCellValue(h,long(1),long(2)); var_Items->PutCellValue(h,long(2),long(11)); long g2 = var_Items->InsertItem(r,vtMissing,"Group 2"); h = var_Items->InsertItem(g2,vtMissing,"Item 1"); var_Items->PutCellValue(h,long(1),long(3)); var_Items->PutCellValue(h,long(2),long(12)); h = var_Items->InsertItem(g2,vtMissing,"Item 2"); var_Items->PutCellValue(h,long(1),long(4)); var_Items->PutCellValue(h,long(2),long(13)); var_Items->PutExpandItem(0,VARIANT_TRUE); spG2antt1->EndUpdate(); spG2antt1->FreezeEvents(VARIANT_FALSE); |
2320 |
How can I add a total column
// Change event - Occurs when the user changes the cell's content. void OnChangeG2antt1(long Item,long ColIndex,VARIANT FAR* NewValue) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->Refresh(); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->FreezeEvents(VARIANT_TRUE); spG2antt1->BeginUpdate(); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); spG2antt1->PutHeaderHeight(24); spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); var_Columns->Add(L"Description"); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Qty"))); var_Column->GetEditor()->PutEditType(EXG2ANTTLib::SpinType); var_Column->PutDef(EXG2ANTTLib::exTotalColumn,"sum(current,rec,%1)"); EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Price"))); var_Column1->PutDef(EXG2ANTTLib::exTotalColumn,"avg(current,rec,%2)"); var_Column1->GetEditor()->PutEditType(EXG2ANTTLib::SpinType); EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Amount"))); var_Column2->PutComputedField(L"%1 * %2"); var_Column2->PutDef(EXG2ANTTLib::exTotalColumn,"sum(current,rec,%3)"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long r = var_Items->AddItem("Root"); long g1 = var_Items->InsertItem(r,vtMissing,"Group 1"); long h = var_Items->InsertItem(g1,vtMissing,"Item 1"); var_Items->PutCellValue(h,long(1),long(1)); var_Items->PutCellValue(h,long(2),long(10)); h = var_Items->InsertItem(g1,vtMissing,"Item 2"); var_Items->PutCellValue(h,long(1),long(2)); var_Items->PutCellValue(h,long(2),long(11)); long g2 = var_Items->InsertItem(r,vtMissing,"Group 2"); h = var_Items->InsertItem(g2,vtMissing,"Item 1"); var_Items->PutCellValue(h,long(1),long(3)); var_Items->PutCellValue(h,long(2),long(12)); h = var_Items->InsertItem(g2,vtMissing,"Item 2"); var_Items->PutCellValue(h,long(1),long(4)); var_Items->PutCellValue(h,long(2),long(13)); var_Items->PutExpandItem(0,VARIANT_TRUE); spG2antt1->EndUpdate(); spG2antt1->FreezeEvents(VARIANT_FALSE); |
2319 |
Is it possible when I move the horizontal scroll bar, that the whole chart scrolls live during move the horizontal scroll bar. Not it scrolls just when I release the left mouse, not during change the horizontal scroll position
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutLevelCount(2); var_Chart->PutToolTip(L""); |
2318 |
The exLinkStyle is not valid (the style of the link is still solid) if the link's width is greater than 1. What can be done
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,128); spG2antt1->PutAntiAliasing(VARIANT_TRUE); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing); long h2 = var_Items->AddItem("Task 2"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"K2",vtMissing); var_Items->AddLink("L1",h1,"K1",h2,"K2"); var_Items->PutLink("L1",EXG2ANTTLib::exLinkStyle,long(2)); var_Items->PutLink("L1",EXG2ANTTLib::exLinkWidth,long(2)); long h3 = var_Items->AddItem("Task 4"); var_Items->AddBar(h3,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"K3",vtMissing); var_Items->AddLink("L2",h2,"K2",h3,"K3"); var_Items->PutLink("L2",EXG2ANTTLib::exLinkStyle,long(1)); var_Items->PutLink("L2",EXG2ANTTLib::exLinkWidth,long(2)); spG2antt1->EndUpdate(); |
2317 |
How can I change the tooltip's margins (method 2)
// MouseMove event - Occurs when the user moves the mouse. void OnMouseMoveG2antt1(short Button,short Shift,long X,long Y) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->ShowToolTip(spG2antt1->GetChart()->GetBarFromPoint(-1,-1),vtMissing,vtMissing,vtMissing,vtMissing); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutToolTipMargin(L"16,8"); spG2antt1->GetColumns()->Add(L"Def"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar); var_Chart->PutPaneWidth(VARIANT_FALSE,64); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2010,1,1,0,00,00).operator DATE()); var_Chart->GetBars()->GetItem("Task")->PutDef(EXG2ANTTLib::exBarToolTip,"..."); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,2,0,00,00).operator DATE(),COleDateTime(2010,1,5,0,00,00).operator DATE(),"A","A"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,5,0,00,00).operator DATE(),COleDateTime(2010,1,8,0,00,00).operator DATE(),"B","B"); spG2antt1->EndUpdate(); |
2316 |
Are there any properties to set text margins at tooltip, like Margins="5,5" (method 1). Margins is used to get some space between text and the tooltips border
// MouseMove event - Occurs when the user moves the mouse. void OnMouseMoveG2antt1(short Button,short Shift,long X,long Y) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->ShowToolTip(spG2antt1->GetChart()->GetBarFromPoint(-1,-1),vtMissing,vtMissing,vtMissing,vtMissing); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutToolTipMargin(L"16,8"); spG2antt1->GetColumns()->Add(L"Def"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar); var_Chart->PutPaneWidth(VARIANT_FALSE,64); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2010,1,1,0,00,00).operator DATE()); var_Chart->GetBars()->GetItem("Task")->PutDef(EXG2ANTTLib::exBarToolTip,"..."); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,2,0,00,00).operator DATE(),COleDateTime(2010,1,5,0,00,00).operator DATE(),"A","A"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,5,0,00,00).operator DATE(),COleDateTime(2010,1,8,0,00,00).operator DATE(),"B","B"); spG2antt1->EndUpdate(); |
2315 |
exShowExtendedLinks
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutDefaultItemHeight(24); spG2antt1->PutHeaderHeight(20); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); spG2antt1->PutAntiAliasing(VARIANT_TRUE); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutLevelCount(2); var_Chart->PutUnitScale(EXG2ANTTLib::exHour); var_Chart->PutFirstVisibleDate(COleDateTime(2024,1,10,0,00,00).operator DATE()); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(1); var_Level->PutDrawTickLines(EXG2ANTTLib::exLevelNoLine); var_Level->DrawTickLinesFrom(0,EXG2ANTTLib::exLevelDotLine); var_Chart->PutAllowResizeChart(EXG2ANTTLib::ResizeChartEnum(0xfffffef9 | EXG2ANTTLib::exAllowChangeUnitScale | EXG2ANTTLib::exAllowResizeChartMiddle | EXG2ANTTLib::exAllowResizeChartHeader)); var_Chart->PutShowLinks(EXG2ANTTLib::exShowExtendedLinks); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("T1"),"Task",COleDateTime(2024,1,10,10,00,00).operator DATE(),COleDateTime(2024,1,10,10,20,00).operator DATE(),"T1",vtMissing); var_Items->AddBar(var_Items->AddItem("T2"),"Task",COleDateTime(2024,1,10,9,00,00).operator DATE(),COleDateTime(2024,1,10,12,00,00).operator DATE(),"T2",vtMissing); var_Items->AddBar(var_Items->AddItem("T3"),"Task",COleDateTime(2024,1,10,8,00,00).operator DATE(),COleDateTime(2024,1,10,8,30,00).operator DATE(),"T3",vtMissing); var_Items->AddBar(var_Items->AddItem("T4"),"Task",COleDateTime(2024,1,10,8,00,00).operator DATE(),COleDateTime(2024,1,10,8,30,00).operator DATE(),"T4",vtMissing); var_Items->AddLink("L13",var_Items->GetItemByIndex(0),"T1",var_Items->GetItemByIndex(2),"T3"); var_Items->AddLink("L14",var_Items->GetItemByIndex(0),"T1",var_Items->GetItemByIndex(3),"T4"); var_Items->AddLink("L24",var_Items->GetItemByIndex(1),"T2",var_Items->GetItemByIndex(3),"T4"); spG2antt1->EndUpdate(); |
2314 |
According to the documentation of the ShowExtendedLinksEnum value exShowExtendedLinks (1) it is possible to distinctly visualise links (rather than showing them one over another) when two or more links start or end on the same bar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutDefaultItemHeight(24); spG2antt1->PutHeaderHeight(20); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); spG2antt1->PutAntiAliasing(VARIANT_TRUE); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutLevelCount(2); var_Chart->PutUnitScale(EXG2ANTTLib::exHour); var_Chart->PutFirstVisibleDate(COleDateTime(2024,1,10,0,00,00).operator DATE()); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(1); var_Level->PutDrawTickLines(EXG2ANTTLib::exLevelNoLine); var_Level->DrawTickLinesFrom(0,EXG2ANTTLib::exLevelDotLine); var_Chart->PutAllowResizeChart(EXG2ANTTLib::ResizeChartEnum(0xfffffef9 | EXG2ANTTLib::exAllowChangeUnitScale | EXG2ANTTLib::exAllowResizeChartMiddle | EXG2ANTTLib::exAllowResizeChartHeader)); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("T1"),"Task",COleDateTime(2024,1,10,10,00,00).operator DATE(),COleDateTime(2024,1,10,10,20,00).operator DATE(),"T1",vtMissing); var_Items->AddBar(var_Items->AddItem("T2"),"Task",COleDateTime(2024,1,10,9,00,00).operator DATE(),COleDateTime(2024,1,10,12,00,00).operator DATE(),"T2",vtMissing); var_Items->AddBar(var_Items->AddItem("T3"),"Task",COleDateTime(2024,1,10,8,00,00).operator DATE(),COleDateTime(2024,1,10,8,30,00).operator DATE(),"T3",vtMissing); var_Items->AddBar(var_Items->AddItem("T4"),"Task",COleDateTime(2024,1,10,8,00,00).operator DATE(),COleDateTime(2024,1,10,8,30,00).operator DATE(),"T4",vtMissing); var_Items->AddLink("L1",var_Items->GetItemByIndex(0),"T1",var_Items->GetItemByIndex(2),"T3"); var_Items->AddLink("L2",var_Items->GetItemByIndex(1),"T2",var_Items->GetItemByIndex(3),"T4"); var_Items->PutLink("L2",EXG2ANTTLib::exLinkShowRound,long(4)); spG2antt1->EndUpdate(); |
2313 |
How to use arrows key left/right to move the cursor left/right inside the text
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IEditorPtr var_Editor = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Edit")))->GetEditor(); var_Editor->PutEditType(EXG2ANTTLib::EditType); var_Editor->PutOption(EXG2ANTTLib::exLeftArrow,VARIANT_FALSE); var_Editor->PutOption(EXG2ANTTLib::exRightArrow,VARIANT_FALSE); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddItem("000"); var_Items->AddItem("111"); var_Items->AddItem("222"); spG2antt1->EndUpdate(); |
2312 |
How can I force the cursor to jump to the end of the editor once the user clicks the cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutSelBackColor(spG2antt1->GetBackColor()); spG2antt1->PutSelForeColor(spG2antt1->GetForeColor()); EXG2ANTTLib::IEditorPtr var_Editor = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Edit")))->GetEditor(); var_Editor->PutEditType(EXG2ANTTLib::EditType); var_Editor->PutOption(EXG2ANTTLib::exEditSelStart,long(-1)); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddItem("000"); var_Items->AddItem("111"); var_Items->AddItem("222"); spG2antt1->EndUpdate(); |
2311 |
How can I show the overview with a different color except or outside the selection
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetVisualAppearance()->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABVIDg6AADACAxRDAMgBQKAAzAJBIYhiGgcYCgMZBSDeCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADE2YAoJDUN4nDKMMDybBkRxtDCPIDnGQoD") + "iGI4nSbKIzSCKMQhrEKZZrnaLJFgOTY8ABLEBvfSgASof6MKBlKhKGoiUo2SCFEaBTBNHxDL6raqqWJ5HDINQlWzbcjjKKFYRbOqTZDkGj4XqKTo3YBAdZSXJsXwTGKk" + "ji3ZgMOR3HaQaTjOgINpuDZdRzkUYZUDFSwSDqQIRtCpbJqzFZDZbLNbYBYME47AayID0CbdCgmaalSZHNxbVa0BzpXrFLw1TLoDy8AJ+ABseKzfo9PxdIygZRzKJ8ao" + "fE+YxynIfJcC8QgbCmL5eiEPIKH6RABlibJpicW4/FcAx/HOYRGmud4+CcHxdmiDhkGEIIIEkQJSGMHQHFGSBlFEUITEmewAAQIQ2AYRpDGQJAoEIXhXCkCB5kmSAdmg" + "VZPmgZJ8gaT4oHSeIHk8aIEnWCJiEiFgmgmYoIiYJIIE8aB8niB0pmyfIGE+ZYmDQPpjgOUg6DqY5DgYPg2mQAxqEKEJkEkFhGhGZIJA4QA2mOY4GDwOsumCe4NAACJK" + "DoPQOFkZJThaSoZHSGYXmYCYGGKGJmEmFhmCsJoDFYag5iaSISDIAAjAkPJLhyS4JlYbA5iSeZmHqHpnkmdh+hOZx5lSOAzGgSQ+DAAAimkNIkiKTh6DSbIjmkChGhKJ" + "JpEoVoWiSaJThyKImmSWI4ACCwNkqBhgDsahKhaJopmqComiqKpqkqEhghKYpAAIJIQmYA46jaLZrgqZo6i6a5KnaPotiZRQkiyIg6lIXw7myCwmkqMpsksNpOjObQLC" + "KQYQiwOpOEKGAPAsZpajabZLHaXo3m4C4GlmNJNisVpFjWZZzkaao6m6S42m6O5vAuRpyjqLhLhidYxgmE5KnqPpvkudp+j+cAMAcAo+i8WIOkSPZuguZwDkKcJMDafp" + "BE8XAengPJxEwVwWkWcYMGcGpGnGTBTBCRIwhkXwikichMhcJpJnKDIPB+NYNimAgqkucwMkcMoInKO4fC2F5ikyZw6k6c5MncPpPnOLJXAiTZJhOXxGlGdINCcSpSnS" + "TQ3E6UY0CuYgulSdRNFcVpVnWDRnFSVBwh0axeledgNFsXJRA+HYXGaWZ2g2JxqlqdpNjcZZYmYCJDHKXJ3E2K4doux3gbE8OEF4ygtjuH6L8eAHAHgFGCO8bY2QZgZD" + "iBwJ4FRijxE4G8DoxBxj6B6EINwTADjvBaMseYHBng1GaPMTg7wepxA4J4Rx8RjgfCYFMeoEQ6BpGqPUTob2MD2A6IQLoNAKiHAuG0WYAAJCVBCCETAHR3DMFWPgDwD2" + "9j4E8CoV4sw7imAIIcJASggAHBeBIJw5grikCmHoSYNxWjrH2BMAoNgqAZE8O0GYEg5DgAIG8DgxwjhXGaCYZIcgnxBGSDILgmwTjKHkJMNwqgjCREoGEC4RRMifHqJc" + "YokQ6BgEYJEUIaQOhlHIIESAECAg="); spG2antt1->PutBackColorLevelHeader(spG2antt1->GetBackColor()); spG2antt1->PutBackground(EXG2ANTTLib::exOverviewSelResize,RGB(1,0,0)); spG2antt1->PutBackground(EXG2ANTTLib::exOverviewSelOut,RGB(240,240,240)); spG2antt1->GetChart()->PutOverviewSelBackColor(RGB(255,255,255)); spG2antt1->PutBackground(EXG2ANTTLib::exOverviewSelUnit,0x1000000); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2001,6,21,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutOverviewVisible(EXG2ANTTLib::OverviewVisibleEnum(0x400 | EXG2ANTTLib::exOverviewShowSelMargins | EXG2ANTTLib::exOverviewShowMargins | EXG2ANTTLib::exOverviewShowDateTimeScaleBottom | EXG2ANTTLib::exOverviewShowAllVisible)); var_Chart->PutOverviewHeight(64); var_Chart->PutLevelCount(2); var_Chart->PutUnitScale(EXG2ANTTLib::exDay); var_Chart->PutLabel(EXG2ANTTLib::exHour,L""); var_Chart->PutLabel(EXG2ANTTLib::exMinute,L""); var_Chart->PutLabel(EXG2ANTTLib::exSecond,L""); var_Chart->PutAllowOverviewZoom(EXG2ANTTLib::exAlwaysZoom); spG2antt1->GetColumns()->Add(L"Column"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Item 1"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,11,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2001,7,2,0,00,00).operator DATE(),COleDateTime(2001,7,11,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Item 3"),"Task",COleDateTime(2001,11,2,0,00,00).operator DATE(),COleDateTime(2001,11,11,0,00,00).operator DATE(),vtMissing,vtMissing); spG2antt1->EndUpdate(); |
2310 |
Resize the chart using the overview's selection left and right margins (blue)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutBackColorLevelHeader(spG2antt1->GetBackColor()); spG2antt1->PutBackground(EXG2ANTTLib::exOverviewSelResize,RGB(0,0,255)); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2001,6,21,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutOverviewVisible(EXG2ANTTLib::OverviewVisibleEnum(0x400 | EXG2ANTTLib::exOverviewShowSelMargins | EXG2ANTTLib::exOverviewShowMargins | EXG2ANTTLib::exOverviewShowDateTimeScaleBottom | EXG2ANTTLib::exOverviewShowAllVisible)); var_Chart->PutOverviewHeight(64); var_Chart->PutLevelCount(2); var_Chart->PutUnitScale(EXG2ANTTLib::exDay); spG2antt1->GetColumns()->Add(L"Column"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Item 1"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,11,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2001,7,2,0,00,00).operator DATE(),COleDateTime(2001,7,11,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Item 3"),"Task",COleDateTime(2001,11,2,0,00,00).operator DATE(),COleDateTime(2001,11,11,0,00,00).operator DATE(),vtMissing,vtMissing); spG2antt1->EndUpdate(); |
2309 |
Resize the chart using the overview's selection left and right margins (black)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutBackColorLevelHeader(spG2antt1->GetBackColor()); spG2antt1->PutBackground(EXG2ANTTLib::exOverviewSelResize,RGB(1,0,0)); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2001,6,21,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutOverviewVisible(EXG2ANTTLib::OverviewVisibleEnum(0x400 | EXG2ANTTLib::exOverviewShowSelMargins | EXG2ANTTLib::exOverviewShowMargins | EXG2ANTTLib::exOverviewShowDateTimeScaleBottom | EXG2ANTTLib::exOverviewShowAllVisible)); var_Chart->PutOverviewHeight(64); var_Chart->PutLevelCount(2); var_Chart->PutUnitScale(EXG2ANTTLib::exDay); spG2antt1->GetColumns()->Add(L"Column"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Item 1"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,11,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2001,7,2,0,00,00).operator DATE(),COleDateTime(2001,7,11,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Item 3"),"Task",COleDateTime(2001,11,2,0,00,00).operator DATE(),COleDateTime(2001,11,11,0,00,00).operator DATE(),vtMissing,vtMissing); spG2antt1->EndUpdate(); |
2308 |
Disable temporarily the column's sort, resize and drag and drop
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutOnResizeControl(EXG2ANTTLib::exResizeChart); spG2antt1->PutSortBarVisible(VARIANT_TRUE); spG2antt1->PutSortBarCaption(L"<fgcolor 808080><c>the header and the sort-bar are disabled (no drag and drop is allowed)"); spG2antt1->PutAllowGroupBy(VARIANT_TRUE); spG2antt1->PutHeaderEnabled(VARIANT_FALSE); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Index")))->PutFormatColumn(L"1 index ``"); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Pos")))->PutFormatColumn(L"1 apos ``"); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Edit")))->GetEditor()->PutEditType(EXG2ANTTLib::EditType); spG2antt1->PutGridLineStyle(EXG2ANTTLib::exGridLinesGeometric); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exVLines); spG2antt1->PutGridLineColor(RGB(224,224,224)); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,196); var_Chart->PutGridLineStyle(EXG2ANTTLib::exGridLinesGeometric); var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(1); var_Level->PutDrawGridLines(VARIANT_TRUE); var_Level->PutGridLineColor(spG2antt1->GetGridLineColor()); spG2antt1->EndUpdate(); |
2307 |
Adds a Finish-Start(FS) link (method 3)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Name"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,64); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Item 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); long h2 = var_Items->AddItem("Item 2"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddLink("Link1",h1,"",h2,""); var_Items->SchedulePDM(0,""); spG2antt1->EndUpdate(); |
2306 |
Adds a Start-Start(SS) link (method 3)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Name"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,64); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Item 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); long h2 = var_Items->AddItem("Item 2"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddLink("Link1",h1,"",h2,""); var_Items->PutLink("Link1",EXG2ANTTLib::exLinkStartPos,long(0)); var_Items->PutLink("Link1",EXG2ANTTLib::exLinkEndPos,long(0)); var_Items->SchedulePDM(0,""); spG2antt1->EndUpdate(); |
2305 |
Adds a Finish-Finish(FF) link (method 3)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Name"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,64); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Item 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); long h2 = var_Items->AddItem("Item 2"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddLink("Link1",h1,"",h2,""); var_Items->PutLink("Link1",EXG2ANTTLib::exLinkStartPos,long(2)); var_Items->PutLink("Link1",EXG2ANTTLib::exLinkEndPos,long(2)); var_Items->SchedulePDM(0,""); spG2antt1->EndUpdate(); |
2304 |
Adds a Start-Finish(SF) link (method 3)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Name"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,64); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Item 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); long h2 = var_Items->AddItem("Item 2"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddLink("Link1",h1,"",h2,""); var_Items->PutLink("Link1",EXG2ANTTLib::exLinkStartPos,long(0)); var_Items->PutLink("Link1",EXG2ANTTLib::exLinkEndPos,long(2)); var_Items->SchedulePDM(0,""); spG2antt1->EndUpdate(); |
2303 |
Adds a Finish-Start(FS) link (method 2)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Name"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,64); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Item 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); long h2 = var_Items->AddItem("Item 2"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->PutItemBar(h2,"",EXG2ANTTLib::exBarPredecessor,"1FS"); var_Items->SchedulePDM(0,""); spG2antt1->EndUpdate(); |
2302 |
Adds a Start-Start(SS) link (method 2)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Name"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,64); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Item 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); long h2 = var_Items->AddItem("Item 2"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->PutItemBar(h2,"",EXG2ANTTLib::exBarPredecessor,"1SS"); var_Items->SchedulePDM(0,""); spG2antt1->EndUpdate(); |
2301 |
Adds a Finish-Finish(FF) link (method 2)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Name"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,64); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Item 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); long h2 = var_Items->AddItem("Item 2"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->PutItemBar(h2,"",EXG2ANTTLib::exBarPredecessor,"1FF"); var_Items->SchedulePDM(0,""); spG2antt1->EndUpdate(); |
2300 |
Adds a Start-Finish(SF) link (method 2)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Name"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,64); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Item 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); long h2 = var_Items->AddItem("Item 2"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->PutItemBar(h2,"",EXG2ANTTLib::exBarPredecessor,"1SF"); var_Items->SchedulePDM(0,""); spG2antt1->EndUpdate(); |
2299 |
Adds a Start-Finish(SF) link (method 1)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Name"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,64); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Item 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); long h2 = var_Items->AddItem("Item 2"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddLink("Link1",h1,"",h2,""); var_Items->PutLink("Link1",EXG2ANTTLib::exLinkType,"SF"); var_Items->SchedulePDM(0,""); spG2antt1->EndUpdate(); |
2298 |
Adds a Finish-Finish(FF) link (method 1)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Name"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,64); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Item 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); long h2 = var_Items->AddItem("Item 2"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddLink("Link1",h1,"",h2,""); var_Items->PutLink("Link1",EXG2ANTTLib::exLinkType,"FF"); var_Items->SchedulePDM(0,""); spG2antt1->EndUpdate(); |
2297 |
Adds a Start-Start(SS) link (method 1)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Name"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,64); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Item 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); long h2 = var_Items->AddItem("Item 2"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddLink("Link1",h1,"",h2,""); var_Items->PutLink("Link1",EXG2ANTTLib::exLinkType,"SS"); var_Items->SchedulePDM(0,""); spG2antt1->EndUpdate(); |
2296 |
Adds a Finish-Start(FS) link (method 1)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Name"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,64); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Item 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); long h2 = var_Items->AddItem("Item 2"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddLink("Link1",h1,"",h2,""); var_Items->PutLink("Link1",EXG2ANTTLib::exLinkType,"FS"); var_Items->SchedulePDM(0,""); spG2antt1->EndUpdate(); |
2295 |
What is the difference between lags with "W" or without
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Name"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,64); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->Add(L"Task:Split"); var_Bar->PutShortcut(L"Task"); var_Bar->PutDef(EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Item 1"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Item 3"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->PutItemBar(var_Items->GetItemByIndex(0),"",EXG2ANTTLib::exBarSuccessor,"2SF:-1,3SF:-1W"); var_Items->SchedulePDM(0,""); spG2antt1->EndUpdate(); |
2294 |
What is the difference between lags with "W" or without
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Name"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,64); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Item 1"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Item 3"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->PutItemBar(var_Items->GetItemByIndex(0),"",EXG2ANTTLib::exBarSuccessor,"2SF:-1,3SF:-1W"); var_Items->SchedulePDM(0,""); spG2antt1->EndUpdate(); |
2293 |
How can I remove all outgoing links
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Name"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,64); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Item 1"),"Task",COleDateTime(2001,1,1,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Item 3"),"Task",COleDateTime(2001,1,9,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddLink("L1",var_Items->GetItemByIndex(0),"",var_Items->GetItemByIndex(1),""); var_Items->AddLink("L2",var_Items->GetItemByIndex(1),"",var_Items->GetItemByIndex(2),""); var_Items->PutItemBar(var_Items->GetItemByIndex(1),"",EXG2ANTTLib::exBarSuccessor,""); spG2antt1->EndUpdate(); |
2292 |
How can I remove all incoming links
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Name"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,64); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Item 1"),"Task",COleDateTime(2001,1,1,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Item 3"),"Task",COleDateTime(2001,1,9,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddLink("L1",var_Items->GetItemByIndex(0),"",var_Items->GetItemByIndex(1),""); var_Items->AddLink("L2",var_Items->GetItemByIndex(1),"",var_Items->GetItemByIndex(2),""); var_Items->PutItemBar(var_Items->GetItemByIndex(1),"",EXG2ANTTLib::exBarPredecessor,""); spG2antt1->EndUpdate(); |
2291 |
How do I add a link between two bars (method 3)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Name"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,64); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Item 1"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,1,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarSuccessor,"2SF"); spG2antt1->EndUpdate(); |
2290 |
How do I add a link between two bars (method 2)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Name"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,64); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Item 1"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,1,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarPredecessor,"2SF"); spG2antt1->EndUpdate(); |
2289 |
Highlight the selected-link while editing the predecessor/successor column
// AddLink event - Occurs when the user links two bars using the mouse. void OnAddLinkG2antt1(LPCTSTR LinkKey) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetItems()->PutLink(LinkKey,EXG2ANTTLib::exLinkShowRound,long(3)); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutOnResizeControl(EXG2ANTTLib::exResizeChart); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); spG2antt1->PutColumnAutoResize(VARIANT_FALSE); spG2antt1->PutHeaderHeight(32); spG2antt1->PutDefaultItemHeight(28); spG2antt1->PutBackColorLevelHeader(RGB(255,255,255)); spG2antt1->PutBackground(EXG2ANTTLib::exPSLinkColorEditSel,RGB(160,160,160)); spG2antt1->PutBackground(EXG2ANTTLib::exPSBarColorEditSel,RGB(128,128,128)); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(48); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start"))); var_Column->PutWidth(48); var_Column->GetEditor()->PutEditType(EXG2ANTTLib::DateType); var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1)); EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"End"))); var_Column1->PutWidth(48); var_Column1->GetEditor()->PutEditType(EXG2ANTTLib::DateType); var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(543)); EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Predecessor"))); EXG2ANTTLib::IEditorPtr var_Editor = var_Column2->GetEditor(); var_Editor->PutEditType(EXG2ANTTLib::EditType); var_Editor->PutEditType(EXG2ANTTLib::MaskType); var_Editor->PutMask(L";;;rich"); var_Column2->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(270)); EXG2ANTTLib::IColumnPtr var_Column3 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Successor"))); EXG2ANTTLib::IEditorPtr var_Editor1 = var_Column3->GetEditor(); var_Editor1->PutEditType(EXG2ANTTLib::EditType); var_Editor1->PutEditType(EXG2ANTTLib::MaskType); var_Editor1->PutMask(L";;;rich"); var_Column3->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(271)); EXG2ANTTLib::IColumnPtr var_Column4 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"(I)"))); var_Column4->PutFormatColumn(L"1 index ``"); var_Column4->PutPosition(0); var_Column4->PutAllowSizing(VARIANT_FALSE); var_Column4->PutWidth(20); spG2antt1->PutColumnAutoResize(VARIANT_TRUE); spG2antt1->PutGridLineStyle(EXG2ANTTLib::exGridLinesGeometric); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines); spG2antt1->PutGridLineColor(RGB(224,224,224)); spG2antt1->PutAntiAliasing(VARIANT_TRUE); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutShowLinks(EXG2ANTTLib::exShowExtendedLinks); var_Chart->PutLinksStyle(EXG2ANTTLib::exLinkSolid); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,362); var_Chart->PutNonworkingDays(0); var_Chart->PutAllowLinkBars(VARIANT_TRUE); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAutoEndInclusive); var_Chart->PutAllowZoomOnFly(EXG2ANTTLib::ZoomOnFlyEnum(0xfffffcc4 | EXG2ANTTLib::exZoomOnFlyIncludeSelectedItems | EXG2ANTTLib::exZoomOnFlyBarsOnly | EXG2ANTTLib::exZoomOnFly | EXG2ANTTLib::exZoomOnFlyCtrl | EXG2ANTTLib::exZoomOnFlyShift)); var_Chart->PutGridLineStyle(EXG2ANTTLib::exGridLinesGeometric); var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task"); var_Bar->PutHeight(15); var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<%=%C5%>"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE); var_Items->AddBar(var_Items->AddItem("Phase A"),"Task",COleDateTime(2001,1,1,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Phase B"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Phase C"),"Task",COleDateTime(2000,12,29,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddLink("L1",var_Items->GetItemByIndex(0),"",var_Items->GetItemByIndex(1),""); var_Items->PutLink("L1",EXG2ANTTLib::exLinkPDMDelay,long(1)); var_Items->AddLink("L2",var_Items->GetItemByIndex(0),"",var_Items->GetItemByIndex(2),""); var_Items->AddLink("L3",var_Items->GetItemByIndex(2),"",var_Items->GetItemByIndex(1),""); var_Items->SchedulePDM(0,""); spG2antt1->EndUpdate(); |
2288 |
Adding an editable successor column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(48); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Successor"))); EXG2ANTTLib::IEditorPtr var_Editor = var_Column->GetEditor(); var_Editor->PutEditType(EXG2ANTTLib::EditType); var_Editor->PutEditType(EXG2ANTTLib::MaskType); var_Editor->PutMask(L";;;rich"); var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(271)); EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"(I)"))); var_Column1->PutFormatColumn(L"1 index ``"); var_Column1->PutPosition(0); var_Column1->PutAllowSizing(VARIANT_FALSE); var_Column1->PutWidth(20); spG2antt1->PutColumnAutoResize(VARIANT_TRUE); spG2antt1->PutGridLineStyle(EXG2ANTTLib::exGridLinesGeometric); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines); spG2antt1->PutGridLineColor(RGB(224,224,224)); spG2antt1->PutAntiAliasing(VARIANT_TRUE); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,256); var_Chart->PutAllowLinkBars(VARIANT_TRUE); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAutoEndInclusive); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE); var_Items->AddBar(var_Items->AddItem("Phase A"),"Task",COleDateTime(2001,1,1,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Phase B"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Phase C"),"Task",COleDateTime(2000,12,29,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddLink("L1",var_Items->GetItemByIndex(0),"",var_Items->GetItemByIndex(1),""); var_Items->AddLink("L2",var_Items->GetItemByIndex(0),"",var_Items->GetItemByIndex(2),""); var_Items->AddLink("L3",var_Items->GetItemByIndex(2),"",var_Items->GetItemByIndex(1),""); spG2antt1->EndUpdate(); |
2287 |
Adding an editable predecessor column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(48); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Predecessor"))); EXG2ANTTLib::IEditorPtr var_Editor = var_Column->GetEditor(); var_Editor->PutEditType(EXG2ANTTLib::EditType); var_Editor->PutEditType(EXG2ANTTLib::MaskType); var_Editor->PutMask(L";;;rich"); var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(270)); EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"(I)"))); var_Column1->PutFormatColumn(L"1 index ``"); var_Column1->PutPosition(0); var_Column1->PutAllowSizing(VARIANT_FALSE); var_Column1->PutWidth(20); spG2antt1->PutColumnAutoResize(VARIANT_TRUE); spG2antt1->PutGridLineStyle(EXG2ANTTLib::exGridLinesGeometric); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines); spG2antt1->PutGridLineColor(RGB(224,224,224)); spG2antt1->PutAntiAliasing(VARIANT_TRUE); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,256); var_Chart->PutAllowLinkBars(VARIANT_TRUE); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAutoEndInclusive); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE); var_Items->AddBar(var_Items->AddItem("Phase A"),"Task",COleDateTime(2001,1,1,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Phase B"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Phase C"),"Task",COleDateTime(2000,12,29,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddLink("L1",var_Items->GetItemByIndex(0),"",var_Items->GetItemByIndex(1),""); var_Items->AddLink("L2",var_Items->GetItemByIndex(0),"",var_Items->GetItemByIndex(2),""); var_Items->AddLink("L3",var_Items->GetItemByIndex(2),"",var_Items->GetItemByIndex(1),""); spG2antt1->EndUpdate(); |
2286 |
Adding an Index column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Name")))->PutWidth(48); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Index"))); var_Column->PutFormatColumn(L"1 index ``"); var_Column->PutPosition(0); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutWidth(48); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddItem("Phase A"); var_Items->AddItem("Phase B"); var_Items->AddItem("Phase C"); spG2antt1->EndUpdate(); |
2285 |
Create a new bar should start at 1 day (after moving some pixel to the right 1 days is showing) and new days should been showing as soon as you hit the next day. How can I do that (create bar manually)
// CreateBar event - Fired when the user creates a new bar. void OnCreateBarG2antt1(long Item,DATE DateStart,DATE DateEnd) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetItems()->AddBar(Item,"Task",DateStart,DateEnd,"","new"); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutOnResizeControl(EXG2ANTTLib::exResizeChart); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Index")))->PutFormatColumn(L"1 index ``"); spG2antt1->PutGridLineStyle(EXG2ANTTLib::exGridLinesGeometric); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exHLines); spG2antt1->PutGridLineColor(RGB(224,224,224)); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,64); var_Chart->PutNonworkingDays(0); var_Chart->PutAllowLinkBars(VARIANT_TRUE); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarManualEndInclusive); var_Chart->PutAllowZoomOnFly(EXG2ANTTLib::ZoomOnFlyEnum(0xfffffcc4 | EXG2ANTTLib::exZoomOnFlyIncludeSelectedItems | EXG2ANTTLib::exZoomOnFlyBarsOnly | EXG2ANTTLib::exZoomOnFly | EXG2ANTTLib::exZoomOnFlyCtrl | EXG2ANTTLib::exZoomOnFlyShift)); var_Chart->PutGridLineStyle(spG2antt1->GetGridLineStyle()); var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(1); var_Level->PutDrawGridLines(VARIANT_TRUE); var_Level->PutGridLineColor(spG2antt1->GetGridLineColor()); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddItem(""); var_Items->AddItem(""); var_Items->AddItem(""); spG2antt1->EndUpdate(); |
2284 |
Create a new bar should start at 1 day (after moving some pixel to the right 1 days is showing) and new days should been showing as soon as you hit the next day. How can I do that (create bar automatically)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutOnResizeControl(EXG2ANTTLib::exResizeChart); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Index")))->PutFormatColumn(L"1 index ``"); spG2antt1->PutGridLineStyle(EXG2ANTTLib::exGridLinesGeometric); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exHLines); spG2antt1->PutGridLineColor(RGB(224,224,224)); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,28,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,64); var_Chart->PutNonworkingDays(0); var_Chart->PutAllowLinkBars(VARIANT_TRUE); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAutoEndInclusive); var_Chart->PutAllowZoomOnFly(EXG2ANTTLib::ZoomOnFlyEnum(0xfffffcc4 | EXG2ANTTLib::exZoomOnFlyIncludeSelectedItems | EXG2ANTTLib::exZoomOnFlyBarsOnly | EXG2ANTTLib::exZoomOnFly | EXG2ANTTLib::exZoomOnFlyCtrl | EXG2ANTTLib::exZoomOnFlyShift)); var_Chart->PutGridLineStyle(spG2antt1->GetGridLineStyle()); var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(1); var_Level->PutDrawGridLines(VARIANT_TRUE); var_Level->PutGridLineColor(spG2antt1->GetGridLineColor()); spG2antt1->EndUpdate(); |
2283 |
How can I display the "<%ddd%> <%d%> <%mmm%>" format followed by number of working-days when using the DateTickerLabel property (method 4, locale)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutScrollBars(EXG2ANTTLib::ScrollBarsEnum(EXG2ANTTLib::exVScrollEmptySpace | EXG2ANTTLib::exVertical)); spG2antt1->PutBackground(EXG2ANTTLib::exDateTickerLabelVAlign,RGB(1,0,0)); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->GetBars()->Add(L"Task:Split")->PutShortcut(L"Task"); var_Chart->GetBars()->GetItem("Task")->PutDef(EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE); var_Chart->PutPaneWidth(VARIANT_FALSE,96); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto); var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->PutDrawDateTicker(VARIANT_TRUE); var_Chart->PutDateTickerLabel(L"<%=value format `ddd dd`%><fgcolor 808080><%=(value=end?` (` + (wcount) + `wd)`:``)%>"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,6,28,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2005,6,28,0,00,00).operator DATE(),COleDateTime(2005,7,1,0,00,00).operator DATE(),vtMissing,vtMissing); spG2antt1->EndUpdate(); |
2282 |
How can I display the "<%ddd%> <%d%> <%mmm%>" format followed by number of days when using the DateTickerLabel property (method 4, locale)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutScrollBars(EXG2ANTTLib::ScrollBarsEnum(EXG2ANTTLib::exVScrollEmptySpace | EXG2ANTTLib::exVertical)); spG2antt1->PutBackground(EXG2ANTTLib::exDateTickerLabelVAlign,RGB(1,0,0)); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,96); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto); var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->PutDrawDateTicker(VARIANT_TRUE); var_Chart->PutDateTickerLabel(L"<%=value format `ddd dd`%><fgcolor 808080><%=(value=end?` (` + (end-start) + `d)`:``)%>"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,6,28,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2005,6,28,0,00,00).operator DATE(),COleDateTime(2005,7,1,0,00,00).operator DATE(),vtMissing,vtMissing); spG2antt1->EndUpdate(); |
2281 |
How can I display the "<%ddd%> <%d%> <%mmm%>" format followed by number of days when using the DateTickerLabel property (method 3, english locale)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutScrollBars(EXG2ANTTLib::ScrollBarsEnum(EXG2ANTTLib::exVScrollEmptySpace | EXG2ANTTLib::exVertical)); spG2antt1->PutBackground(EXG2ANTTLib::exDateTickerLabelVAlign,RGB(1,0,0)); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,96); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto); var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->PutDrawDateTicker(VARIANT_TRUE); var_Chart->PutDateTickerLabel(_bstr_t("<%=(0 array (0:=(longdate(date(value)) split `,`)) left 3) + ` ` + ((2 array ((1 array =:0) split ` `)) lpad `00`) + (value=en") + "d?` (` + (end-start) + `d)`:``)%>"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,6,28,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2005,6,28,0,00,00).operator DATE(),COleDateTime(2005,7,1,0,00,00).operator DATE(),vtMissing,vtMissing); spG2antt1->EndUpdate(); |
2280 |
How can I display the "<%ddd%> <%d%> <%mmm%>" format for start and end margins, but end margin should display one day before followed by the number of days
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutScrollBars(EXG2ANTTLib::ScrollBarsEnum(EXG2ANTTLib::exVScrollEmptySpace | EXG2ANTTLib::exVertical)); spG2antt1->PutBackground(EXG2ANTTLib::exDateTickerLabelVAlign,RGB(1,0,0)); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,96); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto); var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->PutDrawDateTicker(VARIANT_TRUE); var_Chart->PutDateTickerLabel(_bstr_t("<%=(weekday(0:=(value-(value=end?1:0))) array 'Sun Mon Tue Wed Thu Fri Sat' split ' ') + ` ` + day(=:0) + ` ` + ((month(=:0) - ") + "1) array 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec' split ' ') + (value=end?` (` + (end-start) + `d)`:``)%>"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,6,28,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2005,6,28,0,00,00).operator DATE(),COleDateTime(2005,7,1,0,00,00).operator DATE(),vtMissing,vtMissing); spG2antt1->EndUpdate(); |
2279 |
How can I display the "<%ddd%> <%d%> <%mmm%>" format followed by number of days when using the DateTickerLabel property (method 2)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutScrollBars(EXG2ANTTLib::ScrollBarsEnum(EXG2ANTTLib::exVScrollEmptySpace | EXG2ANTTLib::exVertical)); spG2antt1->PutBackground(EXG2ANTTLib::exDateTickerLabelVAlign,RGB(1,0,0)); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,96); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto); var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->PutDrawDateTicker(VARIANT_TRUE); var_Chart->PutDateTickerLabel(L"<%ddd%> <%d%> <%mmm%><%=(value=end?` (` + (end-start) + `d)`:``)%>"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,6,28,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2005,6,28,0,00,00).operator DATE(),COleDateTime(2005,7,1,0,00,00).operator DATE(),vtMissing,vtMissing); spG2antt1->EndUpdate(); |
2278 |
How can I display the "<%ddd%> <%d%> <%mmm%>" format followed by number of days when using the DateTickerLabel property (method 1)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutScrollBars(EXG2ANTTLib::ScrollBarsEnum(EXG2ANTTLib::exVScrollEmptySpace | EXG2ANTTLib::exVertical)); spG2antt1->PutBackground(EXG2ANTTLib::exDateTickerLabelVAlign,RGB(1,0,0)); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,96); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto); var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->PutDrawDateTicker(VARIANT_TRUE); var_Chart->PutDateTickerLabel(_bstr_t("<%=(weekday(value) array 'Sun Mon Tue Wed Thu Fri Sat' split ' ') + ` ` + day(value) + ` ` + ((month(value) - 1) array 'Jan Feb") + " Mar Apr May Jun Jul Aug Sep Oct Nov Dec' split ' ') + (value=end?` (` + (end-start) + `d)`:``)%>"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,6,28,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2005,6,28,0,00,00).operator DATE(),COleDateTime(2005,7,1,0,00,00).operator DATE(),vtMissing,vtMissing); spG2antt1->EndUpdate(); |
2277 |
How can I display just the end-margin when user resizes the bar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutScrollBars(EXG2ANTTLib::ScrollBarsEnum(EXG2ANTTLib::exVScrollEmptySpace | EXG2ANTTLib::exVertical)); spG2antt1->PutBackground(EXG2ANTTLib::exDateTickerLabelVAlign,RGB(1,0,0)); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,96); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto); var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->PutDrawDateTicker(VARIANT_TRUE); var_Chart->PutDateTickerLabel(L"<%=value=start?``:value%>"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,6,28,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2005,6,23,0,00,00).operator DATE(),COleDateTime(2005,7,3,0,00,00).operator DATE(),vtMissing,vtMissing); spG2antt1->EndUpdate(); |
2276 |
Is it possible to include the number of days (duration in days, hours, minutes) within the date-label
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutScrollBars(EXG2ANTTLib::ScrollBarsEnum(EXG2ANTTLib::exVScrollEmptySpace | EXG2ANTTLib::exVertical)); spG2antt1->PutBackground(EXG2ANTTLib::exDateTickerLabelVAlign,RGB(1,0,0)); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,96); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto); var_Chart->PutResizeUnitScale(EXG2ANTTLib::exHour); var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->PutDrawDateTicker(VARIANT_TRUE); var_Chart->PutDateTickerLabel(_bstr_t("<%=date(value=end?value-1:value)%><fgcolor 666666><off -4><%=value=end?` ` + ((1:=int(0:= end - start)) != 0 ? (=:1 + ' day(s)'") + ") : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != 0 ? =:1 + ' hour(s) ' : '' ) + ((1:=round((=:0 - " + "=:1)*60)) != 0 ? =:1 + ' min(s)' : ''):``%>"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,6,28,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2005,6,23,0,00,00).operator DATE(),COleDateTime(2005,7,3,0,00,00).operator DATE(),vtMissing,vtMissing); spG2antt1->EndUpdate(); |
2275 |
Is it possible to include the number of days within the date-label
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutScrollBars(EXG2ANTTLib::ScrollBarsEnum(EXG2ANTTLib::exVScrollEmptySpace | EXG2ANTTLib::exVertical)); spG2antt1->PutBackground(EXG2ANTTLib::exDateTickerLabelVAlign,RGB(1,0,0)); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,96); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto); var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->PutDrawDateTicker(VARIANT_TRUE); var_Chart->PutDateTickerLabel(L"<%mmm%> <%d%><fgcolor 808080><%=value=end?` (`+(end - start) + ` days)`:``%>"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,6,28,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2005,6,23,0,00,00).operator DATE(),COleDateTime(2005,7,3,0,00,00).operator DATE(),vtMissing,vtMissing); spG2antt1->EndUpdate(); |
2274 |
Is it possible to show the date-label with the bar being created, moved or resized instead below the header-bar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutScrollBars(EXG2ANTTLib::ScrollBarsEnum(EXG2ANTTLib::exVScrollEmptySpace | EXG2ANTTLib::exVertical)); spG2antt1->PutBackground(EXG2ANTTLib::exDateTickerLabelVAlign,RGB(1,0,0)); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,96); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto); var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->PutDrawDateTicker(VARIANT_TRUE); var_Chart->PutDateTickerLabel(L"<%mmm%> <%d%>"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,6,28,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2005,6,23,0,00,00).operator DATE(),COleDateTime(2005,7,3,0,00,00).operator DATE(),vtMissing,vtMissing); spG2antt1->EndUpdate(); |
2273 |
Date-label customization
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance(); var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABT0GACAADACAxRDAMgBQKAAzAJBIYhiGgcYCgMZBSDeCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADCOIwAFBIZhrE4ZRwGCQRRgyI43RhHUBzV") + "IUBxDEaTZLlGY4NjSIYHThPMzyDRlEyBBqVKKoWLZMjiIY2RhJM7SBR0OROGQaRJrewZHDUMJiQjZVoVNTkNyxH6uYzoKSqVACLowTJNFZXDDkeR5JqcKBqChIEpKO5w" + "RriAABVZoAA3Rq+AAuPBJIwYAAyXTIdTwThkBz3R6tchgOw7LxeZJpWbZOo0TgGFwTLDQNCifI7Vi6NJ1DdcKLNNx3tDBdpGXZ4JznGa8a7jN57dr+JQ7U6degACytKx" + "LBeOprHMcA+GafxaAiBIUA0JgziGVJkGUGJIFyUYiBEN5VBsGxCEUEIcn0cAxBgWBijmM4Ekec57n0RwJBgBgCgCEZCC4BoBmAdBwgSApgkgMQcB8YQIEYERHAceBWBa" + "BYRkGQgagaYY0HAaYHmICIBBwGJiEiFglEcBYYiYKoKhGQRCC6C5inQcBNgyYxIlIMoNGMWI2DCDAigiLgrgiYhohoHoIGIGBmByBwhEgXgXgOYQoEoCoDGCWAWAiAgg" + "AgDgDEcH5pGUHAoCWSR2F0cxOjSHQJEAQCAg="); var_Appearance->Add(2,"CP:1 -2 -2 4 4"); spG2antt1->PutScrollBars(EXG2ANTTLib::ScrollBarsEnum(EXG2ANTTLib::exVScrollEmptySpace | EXG2ANTTLib::exVertical)); spG2antt1->PutBackground(EXG2ANTTLib::exDateTickerLabelBack,0x2000000); spG2antt1->PutBackground(EXG2ANTTLib::exDateTickerLabelFore,RGB(255,255,255)); spG2antt1->PutBackground(EXG2ANTTLib::exDateTickerLabelHAlign,RGB(1,0,0)); spG2antt1->PutBackground(EXG2ANTTLib::exDateTickerLabelVAlign,RGB(1,0,0)); spG2antt1->PutBackground(EXG2ANTTLib::exDateTickerLabelHMargin,RGB(4,0,0)); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,96); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto); var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->PutDrawDateTicker(VARIANT_TRUE); var_Chart->PutDateTickerLabel(L"<%mmm%><br><%d%>"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,6,28,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2005,6,23,0,00,00).operator DATE(),COleDateTime(2005,7,3,0,00,00).operator DATE(),vtMissing,vtMissing); spG2antt1->EndUpdate(); |
2272 |
How can I change the visual appearance for the date-label (EBN)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetVisualAppearance()->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABaICg6AADACAxRDAMgBQKAAzAJBIYhiGgcYCgMZBSDeCYXABCEYRXBIZQ7BKNIxjSJwFiCCQwSDKEjyCKcGRHF6MI6gOYpCgOIYjRJNIASV") + "AceAAGaUZrjSgobjmOYhAJCL70WAFFr/DCgZThGgJHomMIhAhHAJwTQ8EytJqmKajCaRSDUJZkWZOIyjBd6a5tVbXEaVTAccxhOKeahvGo5Fred40TRINCWHI1d4NH69" + "JbwMLbSgMIKFABXdhWFC+Ex9Kiea7kOqIJwyA5bY5kGRWDRkLzROAALJ1Cz7KqydpDYyAGbABagAYfPy8JzxHKNarfA5GZzuG4zdi8U41WCBdpnHQNS4KL6ndBbWrdFo" + "iC8X4QnAOQ8B4dp6BONQoBoTBnEOKZIkoMYQi2JZECIb4mDYNoEgoIQ8k2PIIDEGBAEuO4UmcF5xHufgqiACAGAKAJfmKdJogGWRAACbYCk0KA0mCA5OFgRgSgSYRIDy" + "YAymGCAsm0QhNAgdJmgeX5DgiYYImISIWCaCBhCMUgqEITJIjSZ4Lk4OJGDKDJjEiVgvDmYpTDILILGAc4gmSD5kAkBhChCY5YmYOwzA6GQmBSEpkkgShJDoZBkA4OQ6" + "iUSB+FaFZlgkZJmhUDopEQAIOE6OYGDeGJmEmFg3hgTo5HoYIYGOWY2G6G9cCIaoLE6SZWE+HZngmZhPh1YJMkyBolkoBoCiCZbBn4O4ogmIoKiKaJJiKCA7ieY4+hKH" + "wpEoVoW3MI4+H4PApkgaoeieagIGqHF3jocoPimaoKiaD4omeY5Gi6JhrAqRoyiYapjkYfg8iuCoOjqLprkqDo4DzcROkKLRsEsFpG4+I5OH4PQskqfpOjObQKn6TA9X" + "EVpWjIbYLGaWoyG0Y5WlWNYtDuBpijibQ7HYfg9i6Cx2mqOpuksdpoD3cRenKO5vEuVp26wI5eH4PgvkuZp+j+cALmafA+XEZwGkCcIMCcCpAnAY5mH4PoxAwNwSkScR" + "MDcEA+jCfBfBqRpxkwdwYgsZBzm8IpInITIXCaSdxHMKpKnKTI3C6S4lmgNJSkCT5slcNpNnODJnAMNZzkQJpvDYdAMDUTpQnQRQ7A2UANhuPRKFKZJ4iiVIOHUDRGDm" + "U4higJJrGuQAEAQgI"); spG2antt1->PutScrollBars(EXG2ANTTLib::ScrollBarsEnum(EXG2ANTTLib::exVScrollEmptySpace | EXG2ANTTLib::exVertical)); spG2antt1->PutBackground(EXG2ANTTLib::exDateTickerLabelBack,0x1000000); spG2antt1->PutBackground(EXG2ANTTLib::exDateTickerLabelFore,RGB(10,10,10)); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,96); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto); var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->PutDrawDateTicker(VARIANT_TRUE); var_Chart->PutDateTickerLabel(L" <%mmm%> <%d%>"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,6,28,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2005,6,23,0,00,00).operator DATE(),COleDateTime(2005,7,3,0,00,00).operator DATE(),vtMissing,vtMissing); spG2antt1->EndUpdate(); |
2271 |
How can I change the visual appearance for the date-label (solid colors)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutScrollBars(EXG2ANTTLib::ScrollBarsEnum(EXG2ANTTLib::exVScrollEmptySpace | EXG2ANTTLib::exVertical)); spG2antt1->PutBackground(EXG2ANTTLib::exDateTickerLabelBack,RGB(1,0,0)); spG2antt1->PutBackground(EXG2ANTTLib::exDateTickerLabelFore,RGB(255,255,255)); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,96); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto); var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->PutDrawDateTicker(VARIANT_TRUE); var_Chart->PutDateTickerLabel(L"<%mmm%> <%d%>"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,6,28,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2005,6,23,0,00,00).operator DATE(),COleDateTime(2005,7,3,0,00,00).operator DATE(),vtMissing,vtMissing); spG2antt1->EndUpdate(); |
2270 |
Expandable-caption
// AnchorClick event - Occurs when an anchor element is clicked. void OnAnchorClickG2antt1(LPCTSTR AnchorID,LPCTSTR Options) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); OutputDebugStringW( L"AnchorID" ); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutColumnAutoResize(VARIANT_TRUE); spG2antt1->PutTreeColumnIndex(-1); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines); spG2antt1->PutGridLineStyle(EXG2ANTTLib::exGridLinesGeometric); spG2antt1->PutBackColorAlternate(RGB(240,240,240)); spG2antt1->PutShowFocusRect(VARIANT_FALSE); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddItem("before item"); long h = var_Items->AddItem(_bstr_t("<solidline> <c><b>Bank Account 1</b></solidline><br>+ owner: String <r><a 1;e64=gA8ABzABvABsABpABkg8JABuABlAA+AAgAECMcTi4AMwAM4") + "AjMGhEGOUVAA4AAwk8plcqihwAElg0wiUlOkOiUEgQvgcFhsKhkIhUQiUUnccj0gn0jmMagUlowAMNOpEfkMNkkmlEqrctjQmAAjAA5AA2sssHcbnkdq1Ln1QtVSjQAA" + "EBA==>▲</a><br><solidline>+ balance: Currency = 0</solidline><br>+ deposit(amount: Currency)<r><a 2;e64=gA8ABjAA+AECMwAM8D" + "ABvABshoAOQAEAAHAAGEWjEajMGNoAMoAOgANERMgAOcHAAvAEJhcEh0Qh0Tg0CmkqMMFlUuhkxiMTisXjNCjk6EwAEYAHIAG1MjY7lUsnkwh8/nUClk5gwAAEBA==>&" + "#9650;</a><br>+ withdraw(amount: Currency)"); var_Items->PutCellValueFormat(h,long(0),EXG2ANTTLib::exHTML); var_Items->PutCellSingleLine(h,long(0),EXG2ANTTLib::exCaptionWordWrap); h = var_Items->AddItem(_bstr_t("<solidline> <c><b>Bank Account 2</b><br> <c><fgcolor 808080>properties</solidline><a 1;e64=gArAAgABvAB3ABuABlAByAA6gYAKYAOkNABp") + "hIAM8RHgAMMRGIAHcLAA2AA0AA9jQAIIAHEsABCAB6mEyO01ABznBwnBrlcvJU4Os4NkwlsClstjctIoAIYAJoAMYAKkXk8wqMIltRlEtNVQABHABoAFNsRPABVABWo1" + "XpMHAE+l88otTONWslasoAosbGFwjFqoton1owN7jZRAE3jdTI1jnIAJeQnxJyFqxWHtUKqdTr9/jcKv9fNtgj8bwUFuFbABOAFonlNM1xsGun0+0tFpt3h1TitfxWlt" + "9ft41toyyM6nRIqQAMUZnxkAF3kJMjMhxUVtkT4FtpsylsqlQ+AEdh3kEwAEYAHMlAHGv8jjovjwA8kd5/n8uRg1FjDpP8jKGPIgSCOej6io+ziSIgginqGhyHIZBY8o" + "ilSCL++b+L4q0AKshUBgBESAgA==><r>▼</a></fgcolor><br><c><fgcolor 808080>methods</fgcolor><r><a 2;e64=gArAAgABkABlABwABvABzAB" + "pAB0AAoABhABthYAOoAN0RAA6gYAIcaAByksHjgAMYAPIAFIAHkVkIyAA7lA2AA0AA9ABnABBAA4n4AIQANVDoECoBFkQAJoAO9Dp9CIlDop2q0NABojNAJ4AKNDplAo" + "BIpAAI4AphXo1qmVHp9pJ1dp10r8+oFzphSut4AFfldmsgArFLABKrcqt1cGFgxONKk9AGNkcYNYAON1p5GABsABVklcy54h91yMQhxYttzkdHy84plRwxZodmJNDtIx" + "utH2g3zufrUdy9RrlCF8p0Ejz2XGuS2ViolDnk8H0wk/VEwAEYAHIAnHNxs2mPHi3VmJi64AgUEqMQiVcg0mi1RikWjEMjcdiUggkjjaTJMhCOpWlqXgAACAg><fgcol" + "or 808080>▼</fgcolor></a>"); var_Items->PutCellValueFormat(h,long(0),EXG2ANTTLib::exHTML); var_Items->PutCellSingleLine(h,long(0),EXG2ANTTLib::exCaptionWordWrap); var_Items->AddItem("after item"); spG2antt1->EndUpdate(); |
2269 |
Expandable-caption
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutColumnAutoResize(VARIANT_TRUE); spG2antt1->PutTreeColumnIndex(-1); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines); spG2antt1->PutGridLineStyle(EXG2ANTTLib::exGridLinesGeometric); spG2antt1->PutBackColorAlternate(RGB(240,240,240)); spG2antt1->PutShowFocusRect(VARIANT_FALSE); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddItem("before item"); long h = var_Items->AddItem("<solidline><b>Header</b></solidline><br>Line1<r><a ;exp=show lines>+</a><br>Line2<br>Line3"); var_Items->PutCellValueFormat(h,long(0),EXG2ANTTLib::exHTML); var_Items->PutCellSingleLine(h,long(0),EXG2ANTTLib::exCaptionWordWrap); var_Items->AddItem("after item"); spG2antt1->EndUpdate(); |
2268 |
Can I change the pattern for a specific bar only
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2009,12,31,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->PutPaneWidth(VARIANT_FALSE,96); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task"); var_Bar->PutStartColor(RGB(255,255,255)); var_Bar->PutEndColor(var_Bar->GetColor()); spG2antt1->GetColumns()->Add(L"Types"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Original"),"Task",COleDateTime(2010,1,4,0,00,00).operator DATE(),COleDateTime(2010,1,9,0,00,00).operator DATE(),"",vtMissing); long h = var_Items->AddItem("W/h Pattern"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,4,0,00,00).operator DATE(),COleDateTime(2010,1,9,0,00,00).operator DATE(),"",vtMissing); var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarPattern,long(6)); var_Items->AddBar(var_Items->AddItem("Original"),"Task",COleDateTime(2010,1,4,0,00,00).operator DATE(),COleDateTime(2010,1,9,0,00,00).operator DATE(),"",vtMissing); spG2antt1->EndUpdate(); |
2267 |
Force hover-all feature
|
2266 |
Disable hover-all feature (Windows 11 or greater)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->PutBackground(EXG2ANTTLib::exScrollHoverAll,RGB(1,0,0)); |
2265 |
I'm using the Milestone bar type, but find it to small and want to enlarge it. I can change the bar height, but then the shape gets a bit distorted (e.g. it doesn't scale properly)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance(); var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABJYCg6AADACAxRDgMQBQKAAzQFAYZhmGSGAAGIZhXgmFgAQhFcZQSKUOQTDKMIRfeQwAiNf4hQKBMIjKKAShaHCVIDlSThYAKCQxDZNUCQX") + "DcdRRDaBR7hGgoaj6JolSRFUgSABEEigNIxToOU4jFgeCR2C7AZBEbTENBtBIUKDsKA4IBiFxAVjQFpSNZlWzdN64LhuK47UrWbYiXZeN5XXblaTxPrAMBwKzrLwPBqH" + "XrfeIYXhlDzVC7GchxTCsSxXCaPY7lWZZPRGN49ODMNBibL9EwSA6laToWpRVpGSYpVrGdT2KgNQxbL61YLse5ZTrGF5vXrONz4LBeAwHP7FXLwfJaVxFeaPZq7eT6LR" + "fEKa5PmgdJ7DuLotkeL5Am0eA4F2ToOHeK5hnOco8HIfQ/GOUZumWeY9h2fx/lOJ5Im8bY+j+LpWnecYxH6YAHgWMB/hgeAGAYe4aheSZ5gGYJICGG4BByaA2BIfRgjY" + "RgTgWihaAobhhggdgBG+IY1nYHoImCRgaBAeQiEiJgHHGIgVnoKoLmEOBFmUchjAiVgYF4XZoloOoImKaJNGyDpkAiJZdggZAZBYLxphmWQaEqDRYmkLhOhEZJZD4UoM" + "FSGJ6FOFZhheEhDhYJZHGYW4PGWWYFlSDQjmkbhi0WBZaCcepmgmBgygsJtLHCCYnBkBh0hkWAJlYMIICeBgKHqBxhimdh3h+ZYWEoa4MigR4hh6IZnhoJheGuIpYD6D" + "humAOhFh+JJaCedoWgIaYGg2RYjCgahNnGIIbgmaZqigKI5jmaoVGqOIiEuKxjnobZjhGKwJCKNRoCSSpejaLorggeo8i8a51koVIwFaeoijOIRsEsApJhgIArC4ZIzi" + "aKg+lCM5tDsRoUjUXRqkqWIrhuSxulmKQtmkIYsjgY4LGqZIum4e4UAAOpRBQJQBICA=="); var_Appearance->Add(2,"CP:1 1 1 11 -2"); spG2antt1->PutDefaultItemHeight(32); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutPaneWidth(VARIANT_FALSE,128); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Milestone"); var_Bar->PutHeight(24); var_Bar->PutColor(0x2000000); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Task 1"),"Milestone",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,2,0,00,00).operator DATE(),vtMissing,vtMissing); spG2antt1->EndUpdate(); |
2264 |
I'm using the Milestone bar type, but find it to small and want to enlarge it. I can change the bar height, but then the shape gets a bit distorted (e.g. it doesn't scale properly)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance(); var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABXYCg6AADACAxRDgMQBQKAAzQFAYZhmGSGAAGIZhXgmFgAQhFcZQSKUOQTDKMIRfeQwAiNf4hQKBMIjKKAShaHCVIDlSThYAKCQxDZNUCDN") + "DYAR1FCeQACCCaDgOII/SZJMiRNIEQARBIoDRMM5DVLIZYHQjCcBkERtNQvHiBRQoSw6GAAGIaRDQMZSNZlWxMfx9XyeBoVeapFhbO4mZavEyCeTgfS3MBwLA3XZxTTx" + "KIaD6KASbepEKh6VDNF52bYrA6XWy/T6PW7GDLmUY1H5UQpnfR4Uj/JyUT7KIS7bpMNTOWYfZ7XcxibKaZw2LDvIoxWL6UosH7UEpXfR/RLGcIVL7KKTLbpQNp8GwYXJ" + "WAMBJ+mubB3gaV5qhyNp/FIFhfmoLgPg+RZkmCeA7gWN46iSXJ4G2Mh6m+ax7nGdJ4G6MxegoXpaiSPJ/CmRZTnyJR3iAOAKASAZgGOfImBcD5iigXx7B6ZhVHAPhPHM" + "WJDD0CohkSfQrEYE58ioGAPnKJBfggYg4goJIJmIaImCOA8gjQYg9kqMZAngNQMAOSIrByT5CmAcA/ksMYon8K4GEOfIsBjLQuESEYkFkHhKhIZJJCCLQYk+YpEGZNhB" + "kSbgrkeM7viIT5zBCAA/kucZsn8LxHHOfI4BwT5ylQbU9kGLJ/CyBoJj4cYcCcKZUjYGwPkMDDlkqcZhgUMwPBKaIID8DQSReMoIVYRQgmiIgIn8MJlnMCB+VKaYUjpO" + "xylgboaEbQQ3BuD5TBgfg8kuAgMncbobgOYJjDWTwCmCB1oGIVJ/DQCQDnyTAjCsYgujkP5MjqaJKhcDIaCSRwg3eMIGDyCxyAieA3k0FxRG8dgOCMVJxC8CJTnCVwmg" + "+cxchgP5NCIUpcjeLZbHyfw1gkexYhteZSDjkQNAeSYDGyT5LCyUQ8EvL58DeSkrFwJ+ZmSG4/G+cxsh0PxNkKDJ0C+CQGkWOBthadpQniNBtDIMJ8DiSlWGMKYPnOCI" + "mD8TgiiidI6GyO41huQwdGcYorj1g5smIKZPkOBweC+SQjmCYA0i6bIRjYbgYFMNJvC0CBLCCCA9k2Iwik6SQOjWJQDEAQCAg"); var_Appearance->Add(2,"CP:1 -6 0 20 0"); spG2antt1->PutDefaultItemHeight(32); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutPaneWidth(VARIANT_FALSE,128); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Milestone"); var_Bar->PutHeight(28); var_Bar->PutColor(0x2000000); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Task 1"),"Milestone",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,2,0,00,00).operator DATE(),vtMissing,vtMissing); spG2antt1->EndUpdate(); |
2263 |
I'm using the Milestone bar type, but find it to small and want to enlarge it. I can change the bar height, but then the shape gets a bit distorted (e.g. it doesn't scale properly)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutDefaultItemHeight(32); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutPaneWidth(VARIANT_FALSE,128); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->GetBars()->GetItem("Milestone")->PutHeight(28); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Task 1"),"Milestone",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,2,0,00,00).operator DATE(),vtMissing,vtMissing); spG2antt1->EndUpdate(); |
2262 |
Display the bar's tooltip at runtime
// MouseMove event - Occurs when the user moves the mouse. void OnMouseMoveG2antt1(short Button,short Shift,long X,long Y) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->ShowToolTip(spG2antt1->GetChart()->GetBarFromPoint(-1,-1),vtMissing,vtMissing,vtMissing,vtMissing); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Def"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar); var_Chart->PutPaneWidth(VARIANT_FALSE,64); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2010,1,1,0,00,00).operator DATE()); var_Chart->GetBars()->GetItem("Task")->PutDef(EXG2ANTTLib::exBarToolTip,"..."); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,2,0,00,00).operator DATE(),COleDateTime(2010,1,5,0,00,00).operator DATE(),"A","A"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,5,0,00,00).operator DATE(),COleDateTime(2010,1,8,0,00,00).operator DATE(),"B","B"); spG2antt1->EndUpdate(); |
2261 |
Includes the cell's state and user-data to bar's tooltip
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Def")))->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar); var_Chart->PutPaneWidth(VARIANT_FALSE,96); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2010,1,1,0,00,00).operator DATE()); var_Chart->GetBars()->GetItem("Task")->PutDef(EXG2ANTTLib::exBarToolTip,"<%=%C0%><br>Start: <%=%1%><br>End: <%=%2%><br>State: <b><%=%CS0%></b><br>UserData: <b><%=%CD0%></b>"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Machine 1"); var_Items->PutCellState(h,long(0),1); var_Items->PutCellData(h,long(0),"just some data"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,2,0,00,00).operator DATE(),COleDateTime(2010,1,5,0,00,00).operator DATE(),"A","A"); h = var_Items->AddItem("Machine 2"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,2,0,00,00).operator DATE(),COleDateTime(2010,1,5,0,00,00).operator DATE(),"B","B"); var_Items->PutCellData(h,long(0),"just nother data"); spG2antt1->EndUpdate(); |
2260 |
Shows the tooltip of the object moved relative to its default position
// MouseMove event - Occurs when the user moves the mouse. void OnMouseMoveG2antt1(short Button,short Shift,long X,long Y) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->ShowToolTip(L"<null>","<null>",vtMissing,"+8","+8"); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Def"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar); var_Chart->PutPaneWidth(VARIANT_FALSE,64); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2010,1,1,0,00,00).operator DATE()); var_Chart->GetBars()->GetItem("Task")->PutDef(EXG2ANTTLib::exBarToolTip,"<b><%=%C0 + ` ` + %9%></b><br>Start: <b><%=%1%></b><br>End: <b><%=%2%></b>"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,2,0,00,00).operator DATE(),COleDateTime(2010,1,5,0,00,00).operator DATE(),"A","A"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,5,0,00,00).operator DATE(),COleDateTime(2010,1,8,0,00,00).operator DATE(),"B","B"); spG2antt1->EndUpdate(); |
2259 |
Adds, changes or replaces the title of the object's tooltip
// MouseMove event - Occurs when the user moves the mouse. void OnMouseMoveG2antt1(short Button,short Shift,long X,long Y) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->ShowToolTip(L"<null>",spG2antt1->GetChart()->GetBarFromPoint(-1,-1),vtMissing,vtMissing,vtMissing); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Def"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar); var_Chart->PutPaneWidth(VARIANT_FALSE,64); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2010,1,1,0,00,00).operator DATE()); var_Chart->GetBars()->GetItem("Task")->PutDef(EXG2ANTTLib::exBarToolTip,"<b><%=%C0 + ` ` + %9%></b><br>Start: <b><%=%1%></b><br>End: <b><%=%2%></b>"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,2,0,00,00).operator DATE(),COleDateTime(2010,1,5,0,00,00).operator DATE(),"A","A"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,5,0,00,00).operator DATE(),COleDateTime(2010,1,8,0,00,00).operator DATE(),"B","B"); spG2antt1->EndUpdate(); |
2258 |
Adds, changes or replaces the object's tooltip
// MouseMove event - Occurs when the user moves the mouse. void OnMouseMoveG2antt1(short Button,short Shift,long X,long Y) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->ShowToolTip(spG2antt1->GetChart()->GetBarFromPoint(-1,-1),vtMissing,vtMissing,vtMissing,vtMissing); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Def"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar); var_Chart->PutPaneWidth(VARIANT_FALSE,64); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2010,1,1,0,00,00).operator DATE()); var_Chart->GetBars()->GetItem("Task")->PutDef(EXG2ANTTLib::exBarToolTip,"<b><%=%C0 + ` ` + %9%></b><br>Start: <b><%=%1%></b><br>End: <b><%=%2%></b>"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,2,0,00,00).operator DATE(),COleDateTime(2010,1,5,0,00,00).operator DATE(),"A","A"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,5,0,00,00).operator DATE(),COleDateTime(2010,1,8,0,00,00).operator DATE(),"B","B"); spG2antt1->EndUpdate(); |
2257 |
Shows a new tooltip and title at current position
// MouseMove event - Occurs when the user moves the mouse. void OnMouseMoveG2antt1(short Button,short Shift,long X,long Y) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->ShowToolTip(L"new content","new title",vtMissing,vtMissing,vtMissing); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Def"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar); var_Chart->PutPaneWidth(VARIANT_FALSE,64); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2010,1,1,0,00,00).operator DATE()); var_Chart->GetBars()->GetItem("Task")->PutDef(EXG2ANTTLib::exBarToolTip,"<b><%=%C0 + ` ` + %9%></b><br>Start: <b><%=%1%></b><br>End: <b><%=%2%></b>"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,2,0,00,00).operator DATE(),COleDateTime(2010,1,5,0,00,00).operator DATE(),"A","A"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,5,0,00,00).operator DATE(),COleDateTime(2010,1,8,0,00,00).operator DATE(),"B","B"); spG2antt1->EndUpdate(); |
2256 |
Shows a new tooltip and title moved relative to the current position
// MouseMove event - Occurs when the user moves the mouse. void OnMouseMoveG2antt1(short Button,short Shift,long X,long Y) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->ShowToolTip(L"new content","new title",vtMissing,"+8","+8"); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Def"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar); var_Chart->PutPaneWidth(VARIANT_FALSE,64); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2010,1,1,0,00,00).operator DATE()); var_Chart->GetBars()->GetItem("Task")->PutDef(EXG2ANTTLib::exBarToolTip,"<b><%=%C0 + ` ` + %9%></b><br>Start: <b><%=%1%></b><br>End: <b><%=%2%></b>"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,2,0,00,00).operator DATE(),COleDateTime(2010,1,5,0,00,00).operator DATE(),"A","A"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,5,0,00,00).operator DATE(),COleDateTime(2010,1,8,0,00,00).operator DATE(),"B","B"); spG2antt1->EndUpdate(); |
2255 |
Displays a different tooltip at a fixed position
// MouseMove event - Occurs when the user moves the mouse. void OnMouseMoveG2antt1(short Button,short Shift,long X,long Y) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->ShowToolTip(L"new content","",vtMissing,long(128),long(128)); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Def"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar); var_Chart->PutPaneWidth(VARIANT_FALSE,64); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2010,1,1,0,00,00).operator DATE()); var_Chart->GetBars()->GetItem("Task")->PutDef(EXG2ANTTLib::exBarToolTip,"<b><%=%C0 + ` ` + %9%></b><br>Start: <b><%=%1%></b><br>End: <b><%=%2%></b>"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,2,0,00,00).operator DATE(),COleDateTime(2010,1,5,0,00,00).operator DATE(),"A","A"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,5,0,00,00).operator DATE(),COleDateTime(2010,1,8,0,00,00).operator DATE(),"B","B"); spG2antt1->EndUpdate(); |
2254 |
Hide the tooltip
// MouseMove event - Occurs when the user moves the mouse. void OnMouseMoveG2antt1(short Button,short Shift,long X,long Y) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->ShowToolTip(L"","",vtMissing,vtMissing,vtMissing); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Def"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar); var_Chart->PutPaneWidth(VARIANT_FALSE,64); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2010,1,1,0,00,00).operator DATE()); var_Chart->GetBars()->GetItem("Task")->PutDef(EXG2ANTTLib::exBarToolTip,"<b><%=%C0 + ` ` + %9%></b><br>Start: <b><%=%1%></b><br>End: <b><%=%2%></b>"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,2,0,00,00).operator DATE(),COleDateTime(2010,1,5,0,00,00).operator DATE(),"A","A"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,5,0,00,00).operator DATE(),COleDateTime(2010,1,8,0,00,00).operator DATE(),"B","B"); spG2antt1->EndUpdate(); |
2253 |
I need 2 bars that are linked together and cannot be moved/splitted alone (moving one should move the two bars, like a « Group » of bars). How can I achieve that
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Task"); spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,96); var_Chart->PutLevelCount(2); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddItem(vtMissing); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,5,12,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"T1",vtMissing); var_Items->PutItemBar(h1,"",EXG2ANTTLib::exBarHAlignCaption,long(18)); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,4,12,00,00).operator DATE(),"T2",vtMissing); var_Items->PutItemBar(h1,"T2",EXG2ANTTLib::exBarColor,long(255)); var_Items->GroupBars(h1,"T1",VARIANT_TRUE,h1,"T2",VARIANT_TRUE,long(27),long(0)); var_Items->AddItem(vtMissing); spG2antt1->EndUpdate(); |
2252 |
How can I show the tooltip programmatically ( I want to be able to set the tooltip content dynamically just before the tooltip start to appear, not using the exBarTooltip )
// ToolTip event - Fired when the control prepares the object's tooltip. void OnToolTipG2antt1(long Item,long ColIndex,BOOL FAR* Visible,long FAR* X,long FAR* Y,long CX,long CY) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->ShowToolTip(spG2antt1->GetChart()->GetBarFromPoint(-1,-1),vtMissing,vtMissing,vtMissing,vtMissing); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Def"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar); var_Chart->PutPaneWidth(VARIANT_FALSE,64); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2010,1,1,0,00,00).operator DATE()); var_Chart->GetBars()->GetItem("Task")->PutDef(EXG2ANTTLib::exBarToolTip,"..."); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,2,0,00,00).operator DATE(),COleDateTime(2010,1,5,0,00,00).operator DATE(),"A","A"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,5,0,00,00).operator DATE(),COleDateTime(2010,1,8,0,00,00).operator DATE(),"B","B"); var_Items->AddBar(h,"Task",COleDateTime(2010,1,8,0,00,00).operator DATE(),COleDateTime(2010,1,11,0,00,00).operator DATE(),"C","C"); var_Items->GroupBars(h,"A",VARIANT_FALSE,h,"B",VARIANT_TRUE,long(39),vtMissing); var_Items->GroupBars(h,"B",VARIANT_FALSE,h,"C",VARIANT_TRUE,long(39),vtMissing); spG2antt1->EndUpdate(); |
2251 |
I'd like to move itembars from one item to another, using .Chart.Bars("Task").Def(exBarCanMoveToAnother) = True this works for any new bar. The question is how can I specify this feature for bars already created
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutDefaultItemHeight(32); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exRowLines); spG2antt1->PutGridLineStyle(EXG2ANTTLib::exGridLinesGeometric); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutDrawGridLines(EXG2ANTTLib::exRowLines); var_Chart->PutGridLineStyle(EXG2ANTTLib::exGridLinesGeometric); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutAllowLinkBars(VARIANT_FALSE); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task"); var_Bar->PutOverlaidType(EXG2ANTTLib::exOverlaidBarsCascade); var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"only horizontal"); var_Bar->PutDef(EXG2ANTTLib::exBarCaptionVOffset,long(18)); var_Bar->PutDef(EXG2ANTTLib::exBarCanMoveToAnother,VARIANT_TRUE); spG2antt1->GetColumns()->Add(L"Column"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Item 1"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"A",vtMissing); var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"B",vtMissing); var_Items->AddBar(var_Items->AddItem("Item 3"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"C",vtMissing); var_Items->PutItemBar(0,"<*>",EXG2ANTTLib::exBarCanMoveToAnother,VARIANT_FALSE); spG2antt1->EndUpdate(); |
2250 |
I'd like to move itembars from one item to another, using .Chart.Bars("Task").Def(exBarCanMoveToAnother) = True this works for any new bar. The question is can I disable this for particular item-bars
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutDefaultItemHeight(32); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exRowLines); spG2antt1->PutGridLineStyle(EXG2ANTTLib::exGridLinesGeometric); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutDrawGridLines(EXG2ANTTLib::exRowLines); var_Chart->PutGridLineStyle(EXG2ANTTLib::exGridLinesGeometric); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutAllowLinkBars(VARIANT_FALSE); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task"); var_Bar->PutOverlaidType(EXG2ANTTLib::exOverlaidBarsCascade); var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"anywhere"); var_Bar->PutDef(EXG2ANTTLib::exBarCaptionVOffset,long(18)); var_Bar->PutDef(EXG2ANTTLib::exBarCanMoveToAnother,VARIANT_TRUE); spG2antt1->GetColumns()->Add(L"Column"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Item 1"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"A",vtMissing); long h = var_Items->AddItem("Item 2"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"B","only horiontal"); var_Items->PutItemBar(h,"B",EXG2ANTTLib::exBarCanMoveToAnother,VARIANT_FALSE); var_Items->AddBar(var_Items->AddItem("Item 3"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"C",vtMissing); spG2antt1->EndUpdate(); |
2249 |
I need the top row to display months, while the second to show units in weeks, but can 10 by 10 days days. Is it possible
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutDrawGridLines(EXG2ANTTLib::exVLines); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutUnitWidth(30); var_Chart->PutLevelCount(2); var_Chart->GetLevel(0)->PutUnit(EXG2ANTTLib::exMonth); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(1); var_Level->PutUnit(EXG2ANTTLib::exDay); var_Level->PutCount(10); spG2antt1->EndUpdate(); |
2248 |
Limit the chart's margins when using the CopyTo method
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutMarkSearchColumn(VARIANT_FALSE); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); var_Columns->Add(L"Tasks"); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start"))); var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1)); var_Column->GetEditor()->PutEditType(EXG2ANTTLib::SpinType); EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"End"))); var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2)); var_Column1->GetEditor()->PutEditType(EXG2ANTTLib::SpinType); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,196); var_Chart->PutLevelCount(2); var_Chart->PutShowEmptyBars(1); var_Chart->PutFirstVisibleDate(COleDateTime(2009,1,1,0,00,00).operator DATE()); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE); var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2009,1,2,0,00,00).operator DATE(),COleDateTime(2009,1,7,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2009,1,4,0,00,00).operator DATE(),COleDateTime(2009,1,9,0,00,00).operator DATE(),vtMissing,vtMissing); EXG2ANTTLib::IChartPtr var_Chart1 = spG2antt1->GetChart(); var_Chart1->PutStartPrintDate(COleDateTime(2009,1,4,0,00,00).operator DATE()); var_Chart1->PutEndPrintDate(COleDateTime(2009,1,5,0,00,00).operator DATE()); _variant_t var_CopyTo = spG2antt1->GetCopyTo(L"c:/temp/xtest.pdf"); OutputDebugStringW( L"Look for C:\\Temp\\xtest.pdf file." ); spG2antt1->EndUpdate(); |
2247 |
I want to always keep the bottom item stationary. It can always display even when scrolling vertically. The bar placed at the bottom item is must be movable to other items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); _bstr_t color = 15790320; spG2antt1->BeginUpdate(); spG2antt1->PutDebug(VARIANT_TRUE); spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); spG2antt1->PutShowLockedItems(VARIANT_TRUE); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,128); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2015,12,31,0,00,00).operator DATE()); var_Chart->GetBars()->GetItem("Task")->PutDef(EXG2ANTTLib::exBarCanMoveToAnother,VARIANT_TRUE); spG2antt1->GetColumns()->Add(L"Column"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutLockedItemCount(EXG2ANTTLib::exTop,3); long h = var_Items->GetLockedItem(EXG2ANTTLib::exTop,0); var_Items->PutItemBackColor(h,color); spG2antt1->GetChart()->PutItemBackColor(h,color); var_Items->PutCellValue(h,long(0),"locked-top 1"); var_Items->AddBar(h,"Task",COleDateTime(2016,1,4,0,00,00).operator DATE(),COleDateTime(2016,1,8,0,00,00).operator DATE(),"T1",vtMissing); h = var_Items->GetLockedItem(EXG2ANTTLib::exTop,1); var_Items->PutItemBackColor(h,color); spG2antt1->GetChart()->PutItemBackColor(h,color); var_Items->PutCellValue(h,long(0),"locked-top 2"); var_Items->AddBar(h,"Task",COleDateTime(2016,1,5,0,00,00).operator DATE(),COleDateTime(2016,1,9,0,00,00).operator DATE(),"T2",vtMissing); h = var_Items->GetLockedItem(EXG2ANTTLib::exTop,2); var_Items->PutSelectItem(h,VARIANT_FALSE); var_Items->PutItemDivider(h,0); var_Items->PutItemHeight(h,2); var_Items->AddBar(var_Items->AddItem("un-locked item 1"),"Task",COleDateTime(2016,1,4,0,00,00).operator DATE(),COleDateTime(2016,1,8,0,00,00).operator DATE(),"T3",vtMissing); var_Items->AddBar(var_Items->AddItem("un-locked item 2"),"Task",COleDateTime(2016,1,5,0,00,00).operator DATE(),COleDateTime(2016,1,9,0,00,00).operator DATE(),"T4",vtMissing); var_Items->PutLockedItemCount(EXG2ANTTLib::exMiddle,3); h = var_Items->GetLockedItem(EXG2ANTTLib::exMiddle,0); var_Items->PutSelectItem(h,VARIANT_FALSE); var_Items->PutItemDivider(h,0); var_Items->PutItemHeight(h,2); h = var_Items->GetLockedItem(EXG2ANTTLib::exMiddle,1); var_Items->PutItemBackColor(h,color); spG2antt1->GetChart()->PutItemBackColor(h,color); var_Items->PutCellValue(h,long(0),"locked-bottom 1"); var_Items->AddBar(h,"Task",COleDateTime(2016,1,4,0,00,00).operator DATE(),COleDateTime(2016,1,8,0,00,00).operator DATE(),"T5",vtMissing); h = var_Items->GetLockedItem(EXG2ANTTLib::exMiddle,2); var_Items->PutItemBackColor(h,color); spG2antt1->GetChart()->PutItemBackColor(h,color); var_Items->PutCellValue(h,long(0),"locked-bottom 2"); var_Items->AddBar(h,"Task",COleDateTime(2016,1,5,0,00,00).operator DATE(),COleDateTime(2016,1,9,0,00,00).operator DATE(),"T6",vtMissing); spG2antt1->EndUpdate(); |
2246 |
How can I get a cell that shows the sum of a column of minutes in hours + minutes format
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Minutes"))); var_Column->PutSortType(EXG2ANTTLib::SortNumeric); EXG2ANTTLib::IEditorPtr var_Editor = var_Column->GetEditor(); var_Editor->PutEditType(EXG2ANTTLib::EditType); var_Editor->PutNumeric(EXG2ANTTLib::exInteger); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddItem(long(10)); var_Items->AddItem(long(20)); var_Items->AddItem(long(30)); var_Items->AddItem(long(40)); var_Items->AddItem(long(50)); long h = var_Items->AddItem("sum(all,dir,dbl(%0))"); var_Items->PutSelectableItem(h,VARIANT_FALSE); var_Items->PutSortableItem(h,VARIANT_FALSE); var_Items->PutCellValueFormat(h,long(0),EXG2ANTTLib::ValueFormatEnum(EXG2ANTTLib::exTotalField | EXG2ANTTLib::exHTML)); var_Items->PutCellHAlignment(h,long(0),EXG2ANTTLib::RightAlignment); var_Items->PutFormatCell(h,long(0),L"'<b>HH:NN</b>: '+ (int(value/60) lpad '00') + ':' + ((value mod 60) lpad '00')"); spG2antt1->EndUpdate(); |
2245 |
Ensure that a bar fits the chart's visible area (unique keys)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2023,3,26,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->PutPaneWidth(VARIANT_FALSE,128); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Task A"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"T1",vtMissing); var_Items->AddBar(var_Items->AddItem("Task B"),"Task",COleDateTime(2001,1,20,0,00,00).operator DATE(),COleDateTime(2001,1,31,0,00,00).operator DATE(),"T2",vtMissing); var_Items->EnsureVisibleBar(0,"T1"); spG2antt1->EndUpdate(); |
2244 |
Ensure that a bar fits the chart's visible area
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2023,3,26,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->PutPaneWidth(VARIANT_FALSE,128); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task A"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"T1",vtMissing); long h2 = var_Items->AddItem("Task B"); var_Items->AddBar(h2,"Task",COleDateTime(2001,1,20,0,00,00).operator DATE(),COleDateTime(2001,1,31,0,00,00).operator DATE(),"T2",vtMissing); var_Items->EnsureVisibleBar(h1,"T1"); spG2antt1->EndUpdate(); |
2243 |
Is it possible to change the visual appearance for the frame to create newly bar by drag and drop
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); spG2antt1->PutBackground(EXG2ANTTLib::exChartCreateBar,0x1000000); spG2antt1->PutBackground(EXG2ANTTLib::exCreateBarHeight,RGB(15,0,0)); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto); var_Chart->PutPaneWidth(VARIANT_FALSE,128); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task"); var_Bar->PutColor(0x1000000); var_Bar->PutHeight(15); spG2antt1->GetColumns()->Add(L"Column"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Item 1"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2001,1,6,0,00,00).operator DATE(),COleDateTime(2001,1,14,0,00,00).operator DATE(),vtMissing,vtMissing); spG2antt1->EndUpdate(); |
2242 |
Highlight the match once the filter is applied
// FilterChange event - Occurs when the filter was changed. void OnFilterChangeG2antt1() { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); _variant_t format = spG2antt1->FormatABC(L"`lower(value) replace lower('` + value + `') with '<bgcolor 000000><fgcolor FFFFFF>` + value + `</fgcolor></bgcolor>'`",spG2antt1->GetFilterBarPromptPattern(),vtMissing,vtMissing); spG2antt1->GetColumns()->GetItem(long(0))->PutFormatColumn(L"format"); spG2antt1->GetColumns()->GetItem(long(1))->PutFormatColumn(L"format"); spG2antt1->GetColumns()->GetItem(long(2))->PutFormatColumn(L"format"); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutSelBackColor(spG2antt1->GetBackColor()); spG2antt1->PutSelForeColor(spG2antt1->GetForeColor()); spG2antt1->PutColumnAutoResize(VARIANT_TRUE); spG2antt1->PutContinueColumnScroll(VARIANT_FALSE); spG2antt1->PutMarkSearchColumn(VARIANT_FALSE); spG2antt1->PutSearchColumnIndex(1); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); spG2antt1->PutHeaderHeight(23); spG2antt1->PutBackColorLevelHeader(spG2antt1->GetBackColor()); spG2antt1->PutFilterBarCaption(L"`<b>` + value + `</b><r><fgcolor=808080>` + ( matchitemcount < 0 ? abs(matchitemcount + 1) + ` result(s)` : ``)"); spG2antt1->PutFilterBarPromptVisible(EXG2ANTTLib::FilterBarVisibleEnum(EXG2ANTTLib::exFilterBarCompact | EXG2ANTTLib::exFilterBarCaptionVisible | EXG2ANTTLib::exFilterBarVisible | EXG2ANTTLib::exFilterBarPromptVisible)); spG2antt1->PutFilterBarBackColor(spG2antt1->GetBackColor()); spG2antt1->PutFilterBarPromptPattern(L"and"); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Name"))); var_Column->PutDef(EXG2ANTTLib::exCellValueFormat,long(1)); var_Column->PutFormatColumn(L"lower(value)"); EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Title"))); var_Column1->PutDef(EXG2ANTTLib::exCellValueFormat,long(1)); var_Column1->PutFormatColumn(L"lower(value)"); EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"City"))); var_Column2->PutDef(EXG2ANTTLib::exCellValueFormat,long(1)); var_Column2->PutFormatColumn(L"lower(value)"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h0 = var_Items->AddItem("Nancy Davolio"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Andrew Fuller"); var_Items->PutCellValue(h0,long(1),"Vice President, Sales"); var_Items->PutCellValue(h0,long(2),"Tacoma"); var_Items->PutSelectItem(h0,VARIANT_TRUE); h0 = var_Items->AddItem("Janet Leverling"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Kirkland"); h0 = var_Items->AddItem("Margaret Peacock"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"Redmond"); h0 = var_Items->AddItem("Steven Buchanan"); var_Items->PutCellValue(h0,long(1),"Sales Manager"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Michael Suyama"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Robert King"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); h0 = var_Items->AddItem("Laura Callahan"); var_Items->PutCellValue(h0,long(1),"Inside Sales Coordinator"); var_Items->PutCellValue(h0,long(2),"Seattle"); h0 = var_Items->AddItem("Anne Dodsworth"); var_Items->PutCellValue(h0,long(1),"Sales Representative"); var_Items->PutCellValue(h0,long(2),"London"); spG2antt1->EndUpdate(); |
2241 |
The count of filtered items includes the group-parents. How can I exclude them from count
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exVLines); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Flat); spG2antt1->PutHeaderHeight(24); spG2antt1->PutSortBarHeight(28); spG2antt1->PutSortBarVisible(VARIANT_TRUE); spG2antt1->PutAllowGroupBy(VARIANT_TRUE); spG2antt1->GetColumns()->Add(L"Col 1"); spG2antt1->GetColumns()->Add(L"Col 2"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutCellValue(var_Items->AddItem("219 Smith"),long(1),"Ignacio 1234"); var_Items->PutCellValue(var_Items->AddItem("1666 County Road 309A"),long(1),"897 Manassa"); var_Items->PutCellValue(var_Items->AddItem("38 Lone Pine"),long(1),"Durango 11"); var_Items->PutCellValue(var_Items->AddItem("612 Jachim Street"),long(1),"Lamar 222"); spG2antt1->PutLayout(L"MultipleSort=\"C1:1\""); spG2antt1->PutFilterBarCaption(L"`<b>` + value + `</b><r><fgcolor=808080>` + ( matchitemcount < 0 ? leafitemcount + ` result(s)` : ``)"); spG2antt1->PutFilterBarPromptVisible(EXG2ANTTLib::FilterBarVisibleEnum(EXG2ANTTLib::exFilterBarCompact | EXG2ANTTLib::exFilterBarCaptionVisible | EXG2ANTTLib::exFilterBarVisible | EXG2ANTTLib::exFilterBarPromptVisible)); spG2antt1->PutFilterBarPromptType(EXG2ANTTLib::FilterPromptEnum(EXG2ANTTLib::exFilterPromptCaseSensitive | EXG2ANTTLib::exFilterPromptContainsAll)); spG2antt1->PutFilterBarPromptPattern(L"12"); spG2antt1->PutFilterBarBackColor(spG2antt1->GetBackColor()); spG2antt1->EndUpdate(); |
2240 |
Is it possible to display the count of filtered items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exVLines); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); spG2antt1->PutHeaderHeight(24); spG2antt1->GetColumns()->Add(L"Col 1"); spG2antt1->GetColumns()->Add(L"Col 2"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutCellValue(var_Items->AddItem("219 Smith"),long(1),"Ignacio 1234"); var_Items->PutCellValue(var_Items->AddItem("1666 County Road 309A"),long(1),"897 Manassa"); var_Items->PutCellValue(var_Items->AddItem("38 Lone Pine"),long(1),"Durango 11"); var_Items->PutCellValue(var_Items->AddItem("612 Jachim Street"),long(1),"Lamar 222"); spG2antt1->PutFilterBarCaption(L"`<b>` + value + `</b><r><fgcolor=808080>` + ( matchitemcount < 0 ? abs(matchitemcount + 1) + ` result(s)` : ``)"); spG2antt1->PutFilterBarPromptVisible(EXG2ANTTLib::FilterBarVisibleEnum(EXG2ANTTLib::exFilterBarCompact | EXG2ANTTLib::exFilterBarCaptionVisible | EXG2ANTTLib::exFilterBarVisible | EXG2ANTTLib::exFilterBarPromptVisible)); spG2antt1->PutFilterBarPromptType(EXG2ANTTLib::FilterPromptEnum(EXG2ANTTLib::exFilterPromptCaseSensitive | EXG2ANTTLib::exFilterPromptContainsAll)); spG2antt1->PutFilterBarPromptPattern(L"12"); spG2antt1->PutFilterBarBackColor(spG2antt1->GetBackColor()); spG2antt1->EndUpdate(); |
2239 |
ADOR, MDB (JET)
// AddItem event - Occurs after a new Item has been inserted to Items collection. void OnAddItemG2antt1(long Item) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(Item,"Task",var_Items->GetCellValue(Item,long(2)),var_Items->GetCellValue(Item,long(4)),vtMissing,vtMissing); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutColumnAutoResize(VARIANT_FALSE); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library' #import <msado15.dll> rename("EOF","REOF") */ ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset"); rs->Open("Orders","Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.mdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0); spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs))); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(1994,8,4,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->PutPaneWidth(VARIANT_FALSE,256); spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE); spG2antt1->GetColumns()->GetItem(long(2))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1)); spG2antt1->GetColumns()->GetItem(long(4))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2)); spG2antt1->EndUpdate(); |
2238 |
exOverlaidBarsOffset + exOverlaidBarTransparent + exBarCanMoveToAnother
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutDefaultItemHeight(22); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exRowLines); spG2antt1->PutGridLineStyle(EXG2ANTTLib::exGridLinesGeometric); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutDrawGridLines(EXG2ANTTLib::exRowLines); var_Chart->PutGridLineStyle(EXG2ANTTLib::exGridLinesGeometric); var_Chart->PutResizeUnitScale(EXG2ANTTLib::exHour); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task"); var_Bar->PutOverlaidType(EXG2ANTTLib::OverlaidBarsTypeEnum(EXG2ANTTLib::exOverlaidBarsTransparent | EXG2ANTTLib::exOverlaidBarsOffset)); var_Bar->PutOverlaid(EXG2ANTTLib::exOverlaidBarsTransparent,long(70)); var_Bar->PutDef(EXG2ANTTLib::exBarCanMoveToAnother,VARIANT_TRUE); spG2antt1->PutItemsAllowSizing(EXG2ANTTLib::exResizeItem); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutSelectableItem(var_Items->AddItem(vtMissing),VARIANT_FALSE); long h = var_Items->AddItem("Task 1"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A1",vtMissing); var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"A2",vtMissing); var_Items->AddBar(h,"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"A3",vtMissing); var_Items->PutItemHeight(h,64); h = var_Items->AddItem("Task 2"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,7,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"A4",vtMissing); var_Items->AddBar(h,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"A5",vtMissing); var_Items->PutSelectableItem(var_Items->AddItem(vtMissing),VARIANT_FALSE); spG2antt1->EndUpdate(); |
2237 |
Editors (ImageSize = 32)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutImageSize(32); spG2antt1->PutDefaultItemHeight(36); spG2antt1->PutHeaderHeight(spG2antt1->GetDefaultItemHeight()); spG2antt1->PutSortBarHeight(spG2antt1->GetDefaultItemHeight()); spG2antt1->GetFont()->PutSize(_variant_t(long(16))); spG2antt1->GetFilterBarFont()->PutSize(_variant_t(spG2antt1->GetFont()->GetSize())); spG2antt1->GetToolTipFont()->PutSize(_variant_t(spG2antt1->GetFont()->GetSize())); spG2antt1->PutIndent(26); spG2antt1->Images(_bstr_t("gBJJgBAIDAAEg4AEEKAD/hz/EMNh8TIRNGwAjEZAEXjAojKAjMLjABhkaABAk0plUrlktl0vmExmUzmk1m03nE5nU7nk9miAoE+oVDolFo1HpFJpU5h8Sf9OqFNqUOq") + "NUqdPq9VrFWrlbr1QpdhAFAkFis1ntFptVrtkrpszrNvmVxqk3uVtm1kmF3sdBvF/wGBmV+j9BYGHwWJulfxdax2NyFdx2JlV6l9Nw7AAGZymdz2Cy2GxErvWcz9ivlw" + "yV21cuxugwktzGIzmvwtl0+53U5y0a0Wazmmyu/3dCyOMyXHx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XJwkTszlVqm2GokewxtBT1DpQjRxDN0rUV" + "DNKdC3lb6tzNOwh6upMSSYfv4YBCl/bsn9PxiFCEo7SI6Obc9HeOrnY8x4jtHtdpN4GRbaorhsbu18Pph5CiHymI0RpSXGJ/z2oUOxYxG858AyiI+bfJtuTcG5yelBJy" + "T8okhqFd4a5yxL0rvulYtKCsZiWxWkc1s1cRoxxwhA31DLE0mR9l9HqX8fJgTDmFMVH0MIsRzVYnwnMi1dyzmhLt2kS2pxIiU62Wj5ptQGlSYFakLonTUJNLKaM5Wzlf" + "fEkuFkk5wTrhVO2eE7G6lJhxFFYUZ55zmn0WuBCD4pzhirFCKkbomsOoIYmZx5p90LoYWGPdD5g0QmJRKYxbZ6zYoVQ2jVGylSak7KSkFH6RSjpHKFuU+YMyNo5SulkC" + "6I0vonTCitMXPoEpVS2H5FQfEqp2R1opIgAEkJISYARTCukOhmPNI5Ex/wzGHUsicMwA1LHgQ90Y/KpoQHAD+pB/R4NzIaMAB9Xaw1gqaAOsh/A/ptIkWUfhGK1kZH8R" + "gH5GqvgArqRmt4AAPrTroRofBGADkqr6Rmu4D7CEaHARiwpJrEEZsXXwlVjyMWRsaRqwdkLGNBABZmytmyMnaINZqyVpLR2ftKAAAdd6h2osbaskdiq4EZtgSmyNcbVW" + "RJNXe3AA7REar3b0stlAAXBtoRmvJGLjEYAHUWsFcwCD/rnaop9aEICMAPdK5hT6xpeuzdOtAgKuJeGfdq6ggEbkTvAP+p9UCHXrvKkcgIA=="); EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance(); var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABfICg6AADACAxRDgMQBQKAAzQFAYbhkGCGAAGMZxRgmFgAQhFcZQSKUOQTDKMIziaQAGgkNQwCSLIwjNIsBxPFKVQChEYxSjKA40SJNUgyj") + "6CCY+QLIE5PfQgAL9I6eJABCCSQKkYx0HScRiwPBIbAZAYhCZqaKhWgkKI/WBQIABRDVLx5ESi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/cTzaAEUwHHiTKInaCQShsFYJUJAdRURQ9EwvCIZBpEWwLChENQwWLCNj2TScBwjCyqbale45ViqdoDU5EUiXJJ8ZxnECfYyrGjaMpCeKB" + "UrGYTVRBIMxLLSia5oeJqMrnBpNVrIUgXCAGFwHK6BcauXIIDp6XoWWRbAAWDpVVzNNC3YzkCIceADHKiXxmVz4JLdGZ1QTGID2XaYaxWK4oZjsVSc4KDHbETbHFi9Fo" + "3NaaxGisew+GYc4HlCR5NAAAIIEkQJSGMOgdE4RhYDwJJsAaAYQgmPpolCWgSCiBJzjcEIAkQXIBm8d5UhOQgCDUIBDDJDhgggJgKgKYJIDSVoDk8KBFF4OohEMZgWDs" + "YYDj4GoGmGSB2B6B5iAiBgYDsYRjGSbIJo4RgqDuIpIAoLoLmMCJGDKDJjJiLA7xqUAAgGTwYnYPoPmQCQGEKEJkEkFg9gGY44BoRoSmSSQ2EKEggHgRhShSZRJFYVoV" + "mWCRmFKFAgGOTheheZgJgYYoYmYSYWGaF4lkMMJ0hqZpJjYbobmcCZGHKHJmjmJh0h2Z4JmYcIaE8WZ2H6H5oAoBoCiCaBKBYfdjGoJoKiKaJKDaDojmkChGgmIgpCoV" + "oWiWaJZiSd4mmmSh2h6J5qAqBoiiiaY5iSeIpmqComiqKpqkqNouiuah6hqMIsmsSpWiuGhP1kOoumuSp2j6L5sAsBo54gKwWkaMZsgsJpKjKbJLDaRYxYWRpSjSbIZi" + "Se41m2CxmlqNptksdpejebR5iSfI4m4S4W16boLiaao6m5fJ9jubwLkaco8m8S5WnaPZunuOp4j6b5Lnac4SA0PAGlgP4wEwFwGkGcIMCcCpCnCCxiA8NYAAmMJfkSbh" + "FCcFpFnGDBnBqRpUhuEwTDeZ5lHCfw6HIQxLCaAxygyJwqgGcATE4FA6hWY4tjEAAQBAgIA=="); spG2antt1->PutBackColorHeader(0x4c6c6c6); spG2antt1->PutSelBackColor(0x4000000); spG2antt1->PutSelForeColor(RGB(0,0,1)); spG2antt1->PutShowFocusRect(VARIANT_FALSE); spG2antt1->PutCheckImage(EXG2ANTTLib::Unchecked,16777216); spG2antt1->PutCheckImage(EXG2ANTTLib::Checked,33554432); spG2antt1->PutCheckImage(EXG2ANTTLib::PartialChecked,50331648); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Editors")))->PutDef(EXG2ANTTLib::exCellValueFormat,long(1)); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->GetCellEditor(var_Items->AddItem("(ReadOnly)"),long(0))->PutEditType(EXG2ANTTLib::ReadOnly); var_Items->GetCellEditor(var_Items->AddItem("(EditType)"),long(0))->PutEditType(EXG2ANTTLib::EditType); long h = var_Items->AddItem("Value 1"); EXG2ANTTLib::IEditorPtr var_Editor = var_Items->GetCellEditor(h,long(0)); var_Editor->PutEditType(EXG2ANTTLib::DropDownType); var_Editor->AddItem(1,L"Value 1",long(1)); var_Editor->AddItem(2,L"Value 2",long(2)); var_Editor->AddItem(3,L"Value 3",long(3)); var_Items->PutFormatCell(h,long(0),L"value + ' (DropDownType)'"); h = var_Items->AddItem(long(1)); EXG2ANTTLib::IEditorPtr var_Editor1 = var_Items->GetCellEditor(h,long(0)); var_Editor1->PutEditType(EXG2ANTTLib::DropDownListType); var_Editor1->PutDropDownAutoWidth(EXG2ANTTLib::exDropDownEditorWidth); var_Editor1->AddItem(1,L"Nancy Davolio",long(1)); var_Editor1->AddItem(2,L"Andrew Fuller",long(2)); var_Editor1->AddItem(3,L"Janet Leverling",long(3)); var_Editor1->AddItem(4,L"Peacock Margaret",long(3)); var_Editor1->AddItem(5,L"Steven Buchanan",long(2)); var_Editor1->AddItem(6,L"Michael Suyama",long(1)); var_Editor1->AddItem(7,L"Robert King",long(2)); var_Editor1->AddItem(8,L"Laura Callahan",long(3)); var_Editor1->AddItem(9,L"Anne Dodsworth",long(2)); var_Items->PutFormatCell(h,long(0),L"value + ' (DropDownList - single column list)'"); h = var_Items->AddItem(long(1)); EXG2ANTTLib::IEditorPtr var_Editor2 = var_Items->GetCellEditor(h,long(0)); var_Editor2->PutEditType(EXG2ANTTLib::DropDownListType); var_Editor2->PutDropDownAutoWidth(EXG2ANTTLib::exDropDownEditorWidth); var_Editor2->AddItem(1,L"Nancy Davolio",long(1)); var_Editor2->AddItem(2,L"Andrew Fuller",long(2)); var_Editor2->InsertItem(3,L"Janet Leverling",long(3),long(2)); var_Editor2->InsertItem(4,L"Peacock Margaret",long(3),long(2)); var_Editor2->InsertItem(5,L"Steven Buchanan",long(2),long(2)); var_Editor2->InsertItem(6,L"Michael Suyama",long(1),long(5)); var_Editor2->InsertItem(7,L"Robert King",long(2),long(2)); var_Editor2->InsertItem(8,L"Laura Callahan",long(3),long(2)); var_Editor2->InsertItem(9,L"Anne Dodsworth",long(2),long(5)); var_Editor2->ExpandAll(); var_Items->PutFormatCell(h,long(0),L"value + ' (DropDownList - single column tree)'"); h = var_Items->AddItem(long(1)); EXG2ANTTLib::IEditorPtr var_Editor3 = var_Items->GetCellEditor(h,long(0)); var_Editor3->PutEditType(EXG2ANTTLib::DropDownListType); var_Editor3->PutDropDownAutoWidth(EXG2ANTTLib::exDropDownEditorWidth); var_Editor3->PutOption(EXG2ANTTLib::exDropDownColumnCaption,"Name¦Title¦City¦Phone"); var_Editor3->PutOption(EXG2ANTTLib::exDropDownColumnWidth,"312¦¦¦96"); var_Editor3->AddItem(1,L"Nancy Davolio¦Sales Representative¦Seattle¦(206) 555-9857",long(1)); var_Editor3->AddItem(2,L"Andrew Fuller¦<b>Vice President</b>, Sales¦Tacoma¦(206) 555-9482",long(2)); var_Editor3->AddItem(3,L"Janet Leverling¦Sales Representative¦Kirkland¦(206) 555-3412",long(3)); var_Editor3->AddItem(4,L"Peacock Margaret¦Sales Representative¦Redmond¦(206) 555-8122",long(3)); var_Editor3->AddItem(5,L"Steven Buchanan¦Sales Manager¦London¦(71) 555-4848",long(2)); var_Editor3->AddItem(6,L"Michael Suyama¦Sales Representative¦London¦(71) 555-7773",long(1)); var_Editor3->AddItem(7,L"Robert King¦Sales Representative¦Kirkland¦(71) 555-5598",long(2)); var_Editor3->AddItem(8,L"Laura Callahan¦Inside Sales Coordinator¦Seattle¦(206) 555-1189",long(3)); var_Editor3->AddItem(9,L"Anne Dodsworth¦Sales Representative¦London¦(71) 555-4444",long(2)); var_Items->PutFormatCell(h,long(0),L"value + ' (DropDownList - multiple columns list)'"); h = var_Items->AddItem(long(1)); EXG2ANTTLib::IEditorPtr var_Editor4 = var_Items->GetCellEditor(h,long(0)); var_Editor4->PutEditType(EXG2ANTTLib::DropDownListType); var_Editor4->PutDropDownAutoWidth(EXG2ANTTLib::exDropDownEditorWidth); var_Editor4->PutOption(EXG2ANTTLib::exDropDownColumnCaption,"Name¦Title¦City¦Phone"); var_Editor4->PutOption(EXG2ANTTLib::exDropDownColumnWidth,"312¦¦¦96"); var_Editor4->AddItem(1,L"Nancy Davolio¦Sales Representative¦Seattle¦(206) 555-9857",long(1)); var_Editor4->AddItem(2,L"Andrew Fuller¦<b>Vice President</b>, Sales¦Tacoma¦(206) 555-9482",long(2)); var_Editor4->InsertItem(3,L"Janet Leverling¦Sales Representative¦Kirkland¦(206) 555-3412",long(3),long(2)); var_Editor4->InsertItem(4,L"Peacock Margaret¦Sales Representative¦Redmond¦(206) 555-8122",long(3),long(2)); var_Editor4->InsertItem(5,L"Steven Buchanan¦Sales Manager¦London¦(71) 555-4848",long(2),long(2)); var_Editor4->InsertItem(6,L"Michael Suyama¦Sales Representative¦London¦(71) 555-7773",long(1),long(5)); var_Editor4->InsertItem(7,L"Robert King¦Sales Representative¦Kirkland¦(71) 555-5598",long(2),long(2)); var_Editor4->InsertItem(8,L"Laura Callahan¦Inside Sales Coordinator¦Seattle¦(206) 555-1189",long(3),long(2)); var_Editor4->InsertItem(9,L"Anne Dodsworth¦Sales Representative¦London¦(71) 555-4444",long(2),long(5)); var_Editor4->ExpandAll(); var_Items->PutFormatCell(h,long(0),L"value + ' (DropDownList - multiple columns tree)'"); h = var_Items->AddItem(long(100)); var_Items->GetCellEditor(h,long(0))->PutEditType(EXG2ANTTLib::SpinType); var_Items->PutFormatCell(h,long(0),L"value + ' (SpinType)'"); var_Items->GetCellEditor(var_Items->AddItem("(MemoType)"),long(0))->PutEditType(EXG2ANTTLib::MemoType); h = var_Items->AddItem(long(3)); EXG2ANTTLib::IEditorPtr var_Editor5 = var_Items->GetCellEditor(h,long(0)); var_Editor5->PutEditType(EXG2ANTTLib::CheckListType); var_Editor5->AddItem(1,L"Border",long(1)); var_Editor5->AddItem(2,L"Single",long(2)); var_Editor5->AddItem(4,L"Frame",long(3)); var_Items->PutFormatCell(h,long(0),L"value + ' (CheckListType)'"); h = var_Items->AddItem("193.226.40.161"); EXG2ANTTLib::IEditorPtr var_Editor6 = var_Items->GetCellEditor(h,long(0)); var_Editor6->PutMask(L"{0,255}.{0,255}.{0,255}.{0,255}"); var_Editor6->PutEditType(EXG2ANTTLib::MaskType); var_Items->PutFormatCell(h,long(0),L"value + ' (MaskType)'"); h = var_Items->AddItem(long(65280)); EXG2ANTTLib::IEditorPtr var_Editor7 = var_Items->GetCellEditor(h,long(0)); var_Editor7->PutEditType(EXG2ANTTLib::ColorType); var_Editor7->PutMask(L"`RGB(`{0,255}\\,{0,255}\\,{0,255}`)`;;0"); var_Items->PutFormatCell(h,long(0),L"value + ' (ColorType)'"); h = var_Items->AddItem("Tahoma"); var_Items->GetCellEditor(h,long(0))->PutEditType(EXG2ANTTLib::FontType); var_Items->PutFormatCell(h,long(0),L"value + ' (FontType)'"); h = var_Items->AddItem(_bstr_t("gBHJJGHA5MIwAEIe4AAAFhwbiAliQwig7ixFjBQjRbjhljxwkB7kSFkiQkyblCllSwli7lzFmDQmTbmjlmzwnD7nQBnk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") + "lVq1XrFZrVbrldr1YhgAEL5AgBhj/AAssMJthABFof4JDhIWCgYKDBATFT8M6hUIFAQAEQCCDwYF/QoWDZCRBgOKgIYHCQXMisKBAEQAAgOBZaSgQhjERANKQiZhIWam" + "YyIBQ6FzcNKxQLJT4ADA4RjwObAAidBYdHwABQgUxMQYZEI0cD4OgnYKaKyzIRFNQx2YCKoFHScYD0ADXQwUAgwLoLQDqaCWBJoNQ9NBxFJTVQORgiarqSABbamGwtDA" + "wBUWhQmqYALnOFQvGYPA4m6AwKhkZxKj2PBWC0SZCgmVY6CwIJgieBAniubRKHgaYgiwQwGiCfxGDWbBRmGZYIi2VwGnAexxGUSwUFiaR+hQPbBgOCoLCIHh4DAARCmQ" + "G4AlgNxuhwWgpFAEQUhuOxOk0NrhAaQoBmgPYdFSIZPjYGYbn+HhgEoAA7HMBIOjUM51AoPojHkEwVlET5slgWZtAEUBdjeSoeF6X5/rQRRSi+QB6GychsEAfZshKYAB" + "GQZorlAOgMBqEgAjYHB2jqSoigmYBLk+QZnBqGhggAEwImgbojgoIwSE+MxUHiS4REQCQWluD48B+JJoL+YQikuaI9AALgLmsJQfnSdAvDkCJEhIIIBgOegLEiPBqCyC" + "AAjcCwgAAIJBhQBQkHGL4gDaNBokkZQMiwUAuioJQiCAQYsHMcwwEIeoigAYIogsGIwFKIYICIWguEoPgQhsawBASGgwCuJwLH8K4LigAIaDwbxMAOKxbisPwfASQATF" + "ASoagIEYwgcSoKGiAA/mEdIuiGPxCmObIlhMIJNHONxFH8EpPCGeB+noEpBBSSRjCsPZEiyKhgjAH5whSdLEjwDxjC8TxVEMFRzFWJJZBUSI0gQEQLBOM4VHkIg1D0CA" + "JDQNg/p4AAdoC"); var_Items->GetCellEditor(h,long(0))->PutEditType(EXG2ANTTLib::PictureType); var_Items->PutFormatCell(h,long(0),L"value + ' (PictureType)'"); var_Items->GetCellEditor(var_Items->AddItem("(ButtonType)"),long(0))->PutEditType(EXG2ANTTLib::ButtonType); h = var_Items->AddItem(long(25)); var_Items->GetCellEditor(h,long(0))->PutEditType(EXG2ANTTLib::ProgressBarType); var_Items->PutFormatCell(h,long(0),L"value + ' (ProgressBarType)'"); h = var_Items->AddItem("Value 1"); EXG2ANTTLib::IEditorPtr var_Editor8 = var_Items->GetCellEditor(h,long(0)); var_Editor8->PutEditType(EXG2ANTTLib::PickEditType); var_Editor8->AddItem(1,L"Value 1",long(1)); var_Editor8->AddItem(2,L"Value 2",long(2)); var_Editor8->AddItem(3,L"Value 3",long(3)); var_Items->PutFormatCell(h,long(0),L"value + ' (PickEditType)'"); var_Items->GetCellEditor(var_Items->AddItem("(LinkEditType)"),long(0))->PutEditType(EXG2ANTTLib::LinkEditType); EXG2ANTTLib::IEditorPtr var_Editor9 = var_Items->GetCellEditor(var_Items->AddItem("(UserEditorType)"),long(0)); var_Editor9->PutEditType(EXG2ANTTLib::UserEditorType); var_Editor9->UserEditor(L"Exontrol.ComboBox",L""); /* Copy and paste the following directives to your header file as it defines the namespace 'EXCOMBOBOXLib' for the library: 'ExComboBox 1.0 Control Library' #import <ExComboBox.dll> using namespace EXCOMBOBOXLib; */ EXCOMBOBOXLib::IComboBoxPtr var_ComboBox = ((EXCOMBOBOXLib::IComboBoxPtr)(var_Editor9->GetUserEditorObject())); var_ComboBox->BeginUpdate(); var_ComboBox->PutLabelHeight(spG2antt1->GetDefaultItemHeight()); var_ComboBox->PutStyle(EXCOMBOBOXLib::DropDownList); var_ComboBox->PutColumnAutoResize(VARIANT_FALSE); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library' #import <msado15.dll> rename("EOF","REOF") */ ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset"); rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0); var_ComboBox->PutDataSource(((ADODB::_RecordsetPtr)(rs))); var_ComboBox->PutMinHeightList(128); var_ComboBox->PutSearchColumnIndex(0); var_ComboBox->PutUseTabKey(VARIANT_FALSE); var_ComboBox->EndUpdate(); h = var_Items->AddItem(long(255)); EXG2ANTTLib::IEditorPtr var_Editor10 = var_Items->GetCellEditor(h,long(0)); var_Editor10->PutEditType(EXG2ANTTLib::ColorListType); var_Editor10->PutOption(EXG2ANTTLib::exColorListShowName,VARIANT_TRUE); var_Items->PutFormatCell(h,long(0),L"value + ' (ColorListType)'"); var_Items->GetCellEditor(var_Items->AddItem(long(65280)),long(0))->PutEditType(EXG2ANTTLib::ColorListType); var_Items->GetCellEditor(var_Items->AddItem("(MemoDropDownType)"),long(0))->PutEditType(EXG2ANTTLib::MemoDropDownType); EXG2ANTTLib::IEditorPtr var_Editor11 = var_Items->GetCellEditor(var_Items->AddItem(long(-1)),long(0)); var_Editor11->PutEditType(EXG2ANTTLib::CheckValueType); var_Editor11->PutOption(EXG2ANTTLib::exCheckValue2,long(1)); h = var_Items->AddItem(long(50)); EXG2ANTTLib::IEditorPtr var_Editor12 = var_Items->GetCellEditor(h,long(0)); var_Editor12->PutEditType(EXG2ANTTLib::SliderType); var_Editor12->PutOption(EXG2ANTTLib::exSliderWidth,long(-60)); var_Editor12->PutOption(EXG2ANTTLib::exSliderTickFrequency,long(10)); var_Editor12->PutOption(EXG2ANTTLib::exSliderTickStyle,long(2)); var_Items->PutFormatCell(h,long(0),L"value + ' (SliderType)'"); h = var_Items->AddItem(long(100)); var_Items->GetCellEditor(h,long(0))->PutEditType(EXG2ANTTLib::CalculatorType); var_Items->PutFormatCell(h,long(0),L"value + ' (CalculatorType)'"); var_Items->EnsureVisibleItem(h); spG2antt1->EndUpdate(); |
2236 |
Editors (ImageSize = 16, default)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutImageSize(16); spG2antt1->Images(_bstr_t("gBJJgBAIDAAEg4ACEKAD/hz/EMNh8TIRNGwAjEZAEXjAojJAjMLjABAAgjUYkUnlUrlktl0vmExmUzmk1m03nE5nU7nkrQCAntBoVDolFo1HoM/ADAplLptImdMYFOq") + "dSqlXq1QrVbrlGpVWsFNrNdnNjsk7pQAtNroFnt0sh8Yr9iulTuNxs1Eu8OiT/vsnsNVutXlk/oGGtVKxGLxWNtsZtN8iUYuNvy0Zvd+xNYwdwvl4p870GCqc8vOeuVt" + "tmp1knyOayWVy+WzN/ze1wOElenm+12WUz/Bv2/3UyyWrzeutux2GSyGP2dQ33C1ur3GD3M4zUNzHdlWjq/E3nGzVpjWv4HA7fRy/Tv2IrN8rPW6nZ3ve7mUlfu20Z8a" + "cvQyb+vY9jasYoDwMm+LytVBDqKG3z8O3Cb8P+mkAuY9cCQ2uL4KaxDKvkp8RNLEjqugnrwQo/UWPzFyeQw5sNLZFENrI4kOqU66pw8uzmOKvTqNqjULJvGL1JO48GtT" + "GsbLdEL3scxLlyiw8dQeoUVxdLTtyKmUjwGlslRPJsnK1HbAKbKCrsQo8uQk/CeP44iaR/ATnTNPLvyxPU+z9P9AUDQVBowiofJXQ6Oo+kKMpIkjztE4TKn4P6JowfgP" + "nwD5/nAjB8AOeAPo0eAA1IAFH07UhAIMpYAVIYFHqBUhwVjV1S1EtQAHxW65V0AZwAeuQAnwB5gAPYViEDVhwAHTQBkCjB4gOhwDmCyhH0sACAg=="); EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance(); var_Appearance->Add(4,_bstr_t("gBFLBCJwBAEHhEJAAEhABUYCg6AADACAxRDgMQBQKAAzQFAYbhkGCGAAGMZxRgmFgAQhFcZQSKUOQTDKMIziYBYfgkMIgSbJUgDGAkRRdDSOYDmGQYDiCIoRShOMIjH") + "LUXxtDaIZwhEAoJb+RgAUY/cTzaAEUwHHiTKInaCQShsFYJUJAdRURQ9EwvCIZBpEWwLChENQwWLCNj2TScBwjCyqbale45ViqdoDU5EUiXJJ8ZxnECfYyrGjaMpCeKB" + "UrGYTVRBIMxLLSia5oeJqMrnBpNVrIUgXCAGFwHK6BcauXIIDp6XoWWRbAAWDpVVzNNC3YzkCIceADHKiXxmVz4JLdGZ1QTGID2XaYaxWK4oZjsVSc4KDHbETbHFi9Fo" + "3NaaxGisew+GYc4HlCR5NAAAIIEkQJSGMOgdE4RhYDwJJsAaAYQgmPpolCWgSCiBJzjcEIAkQXIBm8d5UhOQgCDUIBDDJDhgggJgKgKYJIDSVoDk8KBFF4OohEMZgWDs" + "YYDj4GoGmGSB2B6B5iAiBgYDsYRjGSbIJo4RgqDuIpIAoLoLmMCJGDKDJjJiLA7xqUAAgGTwYnYPoPmQCQGEKEJkEkFg9gGY44BoRoSmSSQ2EKEggHgRhShSZRJFYVoV" + "mWCRmFKFAgGOTheheZgJgYYoYmYSYWGaF4lkMMJ0hqZpJjYbobmcCZGHKHJmjmJh0h2Z4JmYcIaE8WZ2H6H5oAoBoCiCaBKBYfdjGoJoKiKaJKDaDojmkChGgmIgpCoV" + "oWiWaJZiSd4mmmSh2h6J5qAqBoiiiaY5iSeIpmqComiqKpqkqNouiuah6hqMIsmsSpWiuGhP1kOoumuSp2j6L5sAsBo54gKwWkaMZsgsJpKjKbJLDaRYxYWRpSjSbIZi" + "Se41m2CxmlqNptksdpejebR5iSfI4m4S4W16boLiaao6m5fJ9jubwLkaco8m8S5WnaPZunuOp4j6b5Lnac4SA0PAGlgP4wEwFwGkGcIMCcCpCnCCxiA8NYAAmMJfkSbh" + "FCcFpFnGDBnBqRpUhuEwTDeZ5lHCfw6HIQxLCaAxygyJwqgGcATE4FA6hWY4tjEAAQBAgIA=="); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Editors")))->PutDef(EXG2ANTTLib::exCellValueFormat,long(1)); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->GetCellEditor(var_Items->AddItem("(ReadOnly)"),long(0))->PutEditType(EXG2ANTTLib::ReadOnly); var_Items->GetCellEditor(var_Items->AddItem("(EditType)"),long(0))->PutEditType(EXG2ANTTLib::EditType); long h = var_Items->AddItem("Value 1"); EXG2ANTTLib::IEditorPtr var_Editor = var_Items->GetCellEditor(h,long(0)); var_Editor->PutEditType(EXG2ANTTLib::DropDownType); var_Editor->AddItem(1,L"Value 1",long(1)); var_Editor->AddItem(2,L"Value 2",long(2)); var_Editor->AddItem(3,L"Value 3",long(3)); var_Items->PutFormatCell(h,long(0),L"value + ' (DropDownType)'"); h = var_Items->AddItem(long(1)); EXG2ANTTLib::IEditorPtr var_Editor1 = var_Items->GetCellEditor(h,long(0)); var_Editor1->PutEditType(EXG2ANTTLib::DropDownListType); var_Editor1->PutDropDownAutoWidth(EXG2ANTTLib::exDropDownEditorWidth); var_Editor1->AddItem(1,L"Nancy Davolio",long(1)); var_Editor1->AddItem(2,L"Andrew Fuller",long(2)); var_Editor1->AddItem(3,L"Janet Leverling",long(3)); var_Editor1->AddItem(4,L"Peacock Margaret",long(3)); var_Editor1->AddItem(5,L"Steven Buchanan",long(2)); var_Editor1->AddItem(6,L"Michael Suyama",long(1)); var_Editor1->AddItem(7,L"Robert King",long(2)); var_Editor1->AddItem(8,L"Laura Callahan",long(3)); var_Editor1->AddItem(9,L"Anne Dodsworth",long(2)); var_Items->PutFormatCell(h,long(0),L"value + ' (DropDownList - single column list)'"); h = var_Items->AddItem(long(1)); EXG2ANTTLib::IEditorPtr var_Editor2 = var_Items->GetCellEditor(h,long(0)); var_Editor2->PutEditType(EXG2ANTTLib::DropDownListType); var_Editor2->PutDropDownAutoWidth(EXG2ANTTLib::exDropDownEditorWidth); var_Editor2->AddItem(1,L"Nancy Davolio",long(1)); var_Editor2->AddItem(2,L"Andrew Fuller",long(2)); var_Editor2->InsertItem(3,L"Janet Leverling",long(3),long(2)); var_Editor2->InsertItem(4,L"Peacock Margaret",long(3),long(2)); var_Editor2->InsertItem(5,L"Steven Buchanan",long(2),long(2)); var_Editor2->InsertItem(6,L"Michael Suyama",long(1),long(5)); var_Editor2->InsertItem(7,L"Robert King",long(2),long(2)); var_Editor2->InsertItem(8,L"Laura Callahan",long(3),long(2)); var_Editor2->InsertItem(9,L"Anne Dodsworth",long(2),long(5)); var_Editor2->ExpandAll(); var_Items->PutFormatCell(h,long(0),L"value + ' (DropDownList - single column tree)'"); h = var_Items->AddItem(long(1)); EXG2ANTTLib::IEditorPtr var_Editor3 = var_Items->GetCellEditor(h,long(0)); var_Editor3->PutEditType(EXG2ANTTLib::DropDownListType); var_Editor3->PutDropDownAutoWidth(EXG2ANTTLib::exDropDownEditorWidth); var_Editor3->PutOption(EXG2ANTTLib::exDropDownColumnCaption,"Name¦Title¦City¦Phone"); var_Editor3->PutOption(EXG2ANTTLib::exDropDownColumnWidth,"312¦¦¦96"); var_Editor3->AddItem(1,L"Nancy Davolio¦Sales Representative¦Seattle¦(206) 555-9857",long(1)); var_Editor3->AddItem(2,L"Andrew Fuller¦<b>Vice President</b>, Sales¦Tacoma¦(206) 555-9482",long(2)); var_Editor3->AddItem(3,L"Janet Leverling¦Sales Representative¦Kirkland¦(206) 555-3412",long(3)); var_Editor3->AddItem(4,L"Peacock Margaret¦Sales Representative¦Redmond¦(206) 555-8122",long(3)); var_Editor3->AddItem(5,L"Steven Buchanan¦Sales Manager¦London¦(71) 555-4848",long(2)); var_Editor3->AddItem(6,L"Michael Suyama¦Sales Representative¦London¦(71) 555-7773",long(1)); var_Editor3->AddItem(7,L"Robert King¦Sales Representative¦Kirkland¦(71) 555-5598",long(2)); var_Editor3->AddItem(8,L"Laura Callahan¦Inside Sales Coordinator¦Seattle¦(206) 555-1189",long(3)); var_Editor3->AddItem(9,L"Anne Dodsworth¦Sales Representative¦London¦(71) 555-4444",long(2)); var_Items->PutFormatCell(h,long(0),L"value + ' (DropDownList - multiple columns list)'"); h = var_Items->AddItem(long(1)); EXG2ANTTLib::IEditorPtr var_Editor4 = var_Items->GetCellEditor(h,long(0)); var_Editor4->PutEditType(EXG2ANTTLib::DropDownListType); var_Editor4->PutDropDownAutoWidth(EXG2ANTTLib::exDropDownEditorWidth); var_Editor4->PutOption(EXG2ANTTLib::exDropDownColumnCaption,"Name¦Title¦City¦Phone"); var_Editor4->PutOption(EXG2ANTTLib::exDropDownColumnWidth,"312¦¦¦96"); var_Editor4->AddItem(1,L"Nancy Davolio¦Sales Representative¦Seattle¦(206) 555-9857",long(1)); var_Editor4->AddItem(2,L"Andrew Fuller¦<b>Vice President</b>, Sales¦Tacoma¦(206) 555-9482",long(2)); var_Editor4->InsertItem(3,L"Janet Leverling¦Sales Representative¦Kirkland¦(206) 555-3412",long(3),long(2)); var_Editor4->InsertItem(4,L"Peacock Margaret¦Sales Representative¦Redmond¦(206) 555-8122",long(3),long(2)); var_Editor4->InsertItem(5,L"Steven Buchanan¦Sales Manager¦London¦(71) 555-4848",long(2),long(2)); var_Editor4->InsertItem(6,L"Michael Suyama¦Sales Representative¦London¦(71) 555-7773",long(1),long(5)); var_Editor4->InsertItem(7,L"Robert King¦Sales Representative¦Kirkland¦(71) 555-5598",long(2),long(2)); var_Editor4->InsertItem(8,L"Laura Callahan¦Inside Sales Coordinator¦Seattle¦(206) 555-1189",long(3),long(2)); var_Editor4->InsertItem(9,L"Anne Dodsworth¦Sales Representative¦London¦(71) 555-4444",long(2),long(5)); var_Editor4->ExpandAll(); var_Items->PutFormatCell(h,long(0),L"value + ' (DropDownList - multiple columns tree)'"); h = var_Items->AddItem(long(100)); var_Items->GetCellEditor(h,long(0))->PutEditType(EXG2ANTTLib::SpinType); var_Items->PutFormatCell(h,long(0),L"value + ' (SpinType)'"); var_Items->GetCellEditor(var_Items->AddItem("(MemoType)"),long(0))->PutEditType(EXG2ANTTLib::MemoType); h = var_Items->AddItem(long(3)); EXG2ANTTLib::IEditorPtr var_Editor5 = var_Items->GetCellEditor(h,long(0)); var_Editor5->PutEditType(EXG2ANTTLib::CheckListType); var_Editor5->AddItem(1,L"Border",long(1)); var_Editor5->AddItem(2,L"Single",long(2)); var_Editor5->AddItem(4,L"Frame",long(3)); var_Items->PutFormatCell(h,long(0),L"value + ' (CheckListType)'"); h = var_Items->AddItem("193.226.40.161"); EXG2ANTTLib::IEditorPtr var_Editor6 = var_Items->GetCellEditor(h,long(0)); var_Editor6->PutMask(L"{0,255}.{0,255}.{0,255}.{0,255}"); var_Editor6->PutEditType(EXG2ANTTLib::MaskType); var_Items->PutFormatCell(h,long(0),L"value + ' (MaskType)'"); h = var_Items->AddItem(long(65280)); EXG2ANTTLib::IEditorPtr var_Editor7 = var_Items->GetCellEditor(h,long(0)); var_Editor7->PutEditType(EXG2ANTTLib::ColorType); var_Editor7->PutMask(L"`RGB(`{0,255}\\,{0,255}\\,{0,255}`)`;;0"); var_Items->PutFormatCell(h,long(0),L"value + ' (ColorType)'"); h = var_Items->AddItem("Tahoma"); var_Items->GetCellEditor(h,long(0))->PutEditType(EXG2ANTTLib::FontType); var_Items->PutFormatCell(h,long(0),L"value + ' (FontType)'"); h = var_Items->AddItem(_bstr_t("gBHJJGHA5MIwAEIe4AAAFhwbiAliQwig7ixFjBQjRbjhljxwkB7kSFkiQkyblCllSwli7lzFmDQmTbmjlmzwnD7nQBnk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") + "lVq1XrFZrVbrldr1YhgAEL5AgBhj/AAssMJthABFof4JDhIWCgYKDBATFT8M6hUIFAQAEQCCDwYF/QoWDZCRBgOKgIYHCQXMisKBAEQAAgOBZaSgQhjERANKQiZhIWam" + "YyIBQ6FzcNKxQLJT4ADA4RjwObAAidBYdHwABQgUxMQYZEI0cD4OgnYKaKyzIRFNQx2YCKoFHScYD0ADXQwUAgwLoLQDqaCWBJoNQ9NBxFJTVQORgiarqSABbamGwtDA" + "wBUWhQmqYALnOFQvGYPA4m6AwKhkZxKj2PBWC0SZCgmVY6CwIJgieBAniubRKHgaYgiwQwGiCfxGDWbBRmGZYIi2VwGnAexxGUSwUFiaR+hQPbBgOCoLCIHh4DAARCmQ" + "G4AlgNxuhwWgpFAEQUhuOxOk0NrhAaQoBmgPYdFSIZPjYGYbn+HhgEoAA7HMBIOjUM51AoPojHkEwVlET5slgWZtAEUBdjeSoeF6X5/rQRRSi+QB6GychsEAfZshKYAB" + "GQZorlAOgMBqEgAjYHB2jqSoigmYBLk+QZnBqGhggAEwImgbojgoIwSE+MxUHiS4REQCQWluD48B+JJoL+YQikuaI9AALgLmsJQfnSdAvDkCJEhIIIBgOegLEiPBqCyC" + "AAjcCwgAAIJBhQBQkHGL4gDaNBokkZQMiwUAuioJQiCAQYsHMcwwEIeoigAYIogsGIwFKIYICIWguEoPgQhsawBASGgwCuJwLH8K4LigAIaDwbxMAOKxbisPwfASQATF" + "ASoagIEYwgcSoKGiAA/mEdIuiGPxCmObIlhMIJNHONxFH8EpPCGeB+noEpBBSSRjCsPZEiyKhgjAH5whSdLEjwDxjC8TxVEMFRzFWJJZBUSI0gQEQLBOM4VHkIg1D0CA" + "JDQNg/p4AAdoC"); var_Items->GetCellEditor(h,long(0))->PutEditType(EXG2ANTTLib::PictureType); var_Items->PutFormatCell(h,long(0),L"value + ' (PictureType)'"); var_Items->GetCellEditor(var_Items->AddItem("(ButtonType)"),long(0))->PutEditType(EXG2ANTTLib::ButtonType); h = var_Items->AddItem(long(25)); var_Items->GetCellEditor(h,long(0))->PutEditType(EXG2ANTTLib::ProgressBarType); var_Items->PutFormatCell(h,long(0),L"value + ' (ProgressBarType)'"); h = var_Items->AddItem("Value 1"); EXG2ANTTLib::IEditorPtr var_Editor8 = var_Items->GetCellEditor(h,long(0)); var_Editor8->PutEditType(EXG2ANTTLib::PickEditType); var_Editor8->AddItem(1,L"Value 1",long(1)); var_Editor8->AddItem(2,L"Value 2",long(2)); var_Editor8->AddItem(3,L"Value 3",long(3)); var_Items->PutFormatCell(h,long(0),L"value + ' (PickEditType)'"); var_Items->GetCellEditor(var_Items->AddItem("(LinkEditType)"),long(0))->PutEditType(EXG2ANTTLib::LinkEditType); EXG2ANTTLib::IEditorPtr var_Editor9 = var_Items->GetCellEditor(var_Items->AddItem("(UserEditorType)"),long(0)); var_Editor9->PutEditType(EXG2ANTTLib::UserEditorType); var_Editor9->UserEditor(L"Exontrol.ComboBox",L""); /* Copy and paste the following directives to your header file as it defines the namespace 'EXCOMBOBOXLib' for the library: 'ExComboBox 1.0 Control Library' #import <ExComboBox.dll> using namespace EXCOMBOBOXLib; */ EXCOMBOBOXLib::IComboBoxPtr var_ComboBox = ((EXCOMBOBOXLib::IComboBoxPtr)(var_Editor9->GetUserEditorObject())); var_ComboBox->BeginUpdate(); var_ComboBox->PutLabelHeight(spG2antt1->GetDefaultItemHeight()); var_ComboBox->PutStyle(EXCOMBOBOXLib::DropDownList); var_ComboBox->PutColumnAutoResize(VARIANT_FALSE); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library' #import <msado15.dll> rename("EOF","REOF") */ ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset"); rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0); var_ComboBox->PutDataSource(((ADODB::_RecordsetPtr)(rs))); var_ComboBox->PutMinHeightList(128); var_ComboBox->PutSearchColumnIndex(0); var_ComboBox->PutUseTabKey(VARIANT_FALSE); var_ComboBox->EndUpdate(); h = var_Items->AddItem(long(255)); EXG2ANTTLib::IEditorPtr var_Editor10 = var_Items->GetCellEditor(h,long(0)); var_Editor10->PutEditType(EXG2ANTTLib::ColorListType); var_Editor10->PutOption(EXG2ANTTLib::exColorListShowName,VARIANT_TRUE); var_Items->PutFormatCell(h,long(0),L"value + ' (ColorListType)'"); var_Items->GetCellEditor(var_Items->AddItem(long(65280)),long(0))->PutEditType(EXG2ANTTLib::ColorListType); var_Items->GetCellEditor(var_Items->AddItem("(MemoDropDownType)"),long(0))->PutEditType(EXG2ANTTLib::MemoDropDownType); EXG2ANTTLib::IEditorPtr var_Editor11 = var_Items->GetCellEditor(var_Items->AddItem(long(-1)),long(0)); var_Editor11->PutEditType(EXG2ANTTLib::CheckValueType); var_Editor11->PutOption(EXG2ANTTLib::exCheckValue2,long(1)); h = var_Items->AddItem(long(50)); EXG2ANTTLib::IEditorPtr var_Editor12 = var_Items->GetCellEditor(h,long(0)); var_Editor12->PutEditType(EXG2ANTTLib::SliderType); var_Editor12->PutOption(EXG2ANTTLib::exSliderWidth,long(-60)); var_Editor12->PutOption(EXG2ANTTLib::exSliderTickFrequency,long(10)); var_Editor12->PutOption(EXG2ANTTLib::exSliderTickStyle,long(2)); var_Items->PutFormatCell(h,long(0),L"value + ' (SliderType)'"); h = var_Items->AddItem(long(100)); var_Items->GetCellEditor(h,long(0))->PutEditType(EXG2ANTTLib::CalculatorType); var_Items->PutFormatCell(h,long(0),L"value + ' (CalculatorType)'"); var_Items->EnsureVisibleItem(h); spG2antt1->EndUpdate(); |
2235 |
Is it possible to limit the overlaid to two rows only
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutNonworkingDays(0); var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,17,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,64); var_Chart->PutLevelCount(2); var_Chart->GetBars()->GetItem("Task")->PutOverlaidType(EXG2ANTTLib::exOverlaidBarsCascade); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task"); var_Items->AddBar(h1,"Task",COleDateTime(2006,9,26,0,00,00).operator DATE(),COleDateTime(2006,10,6,0,00,00).operator DATE(),"K1","K1"); var_Items->AddBar(h1,"Task",COleDateTime(2006,10,5,0,00,00).operator DATE(),COleDateTime(2006,10,10,0,00,00).operator DATE(),"K3","K2"); var_Items->AddBar(h1,"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,27,0,00,00).operator DATE(),"T1","T"); var_Items->PutItemBar(0,"<T*>",EXG2ANTTLib::exBarColor,long(65280)); var_Items->PutItemBar(0,"<K*>",EXG2ANTTLib::exBarOverlaidKey,"Level0"); var_Items->PutItemBar(0,"<T*>",EXG2ANTTLib::exBarOverlaidKey,"Level1"); var_Items->PutItemMaxHeight(h1,26); spG2antt1->EndUpdate(); |
2234 |
Is it possible to sort the bars
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutAntiAliasing(VARIANT_TRUE); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Task")))->PutAllowSort(VARIANT_FALSE); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Name"))); var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(0)); var_Column->PutSortType(EXG2ANTTLib::SortString); var_Column->PutVisible(VARIANT_FALSE); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,31,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutLevelCount(2); var_Chart->GetBars()->GetItem("Task")->PutPattern(EXG2ANTTLib::exPatternSolid); var_Chart->GetBars()->Copy(L"Task",L"Red")->PutColor(RGB(255,0,0)); var_Chart->PutNonworkingDaysPattern(EXG2ANTTLib::exPatternBDiagonal); var_Chart->PutNonworkingDaysColor(RGB(224,224,224)); var_Chart->PutLinksStyle(EXG2ANTTLib::exLinkSolid); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE); long h1 = var_Items->AddItem("Task 1"); var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),vtMissing,vtMissing); long h2 = var_Items->AddItem("Task 2"); var_Items->AddBar(h2,"Red",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),vtMissing,vtMissing); long h3 = var_Items->AddItem("Task 3"); var_Items->AddBar(h3,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),vtMissing,vtMissing); long h4 = var_Items->AddItem("Task 4"); var_Items->AddBar(h4,"Red",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),vtMissing,vtMissing); long h5 = var_Items->AddItem("Task 5"); var_Items->AddBar(h5,"Red",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddLink("L1",h1,"",h3,""); var_Items->AddLink("L2",h2,"",h4,""); var_Items->AddLink("L3",h3,"",h4,""); var_Items->AddLink("L4",h4,"",h5,""); var_Items->SchedulePDM(0,""); spG2antt1->GetChart()->PutShowLinks(EXG2ANTTLib::exShowExtendedLinks); spG2antt1->GetColumns()->GetItem("Name")->PutSortOrder(EXG2ANTTLib::SortAscending); spG2antt1->EndUpdate(); |
2233 |
Re-order the cell's caption, icons and images/pictures
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->Images(_bstr_t("gBJJgBAICAADAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEahkZAIAEEbjMjlErlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") + "lVq1XrFZrVbrlTiFdib/sNjr9gs1nldlrlqtFtt0stlguNvulyh91ud1vVVvNuvt7wFHr9/vl3luEwOJouIq+Dw2KyGRyWTymVy2XzGZzUuiw+lmej0gkUaksljaAnmD" + "cD/cEbf7w1+ufD/fEbeB028bYAO3enB6AB++4EoA4A4sb4vHjXJ4nG5vKAHA4ca6XBjTAD/Y2x/eB/jcB"); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"ToLeft"))); var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE); EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"ToRight"))); var_Column1->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE); var_Column1->PutDef(EXG2ANTTLib::exCellDrawPartsOrder,"caption,picture,icons,icon,check"); spG2antt1->PutDefaultItemHeight(32); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exVLines); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Caption"); var_Items->PutCellImage(h,long(0),2); var_Items->PutCellImages(h,long(0),"1,2"); var_Items->PutCellPicture(h,long(0),((ObjectPtr)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C5TYrVsKk2Y3MBRcpBQkgmOUuznY2FqKy0WSymXeX0ASwel0olHI5AwJ1mx0gL1mTXU6XS8Vpdj4hyg8BemDYZHqMFOUyYZT" + "WP1WJ1CN1MTR6gH4cmysjKr2mlCqn3GuR+jDoJHGWlKkU+ajXpgg1yq2FQDFigSEBROwkCKnQwGwjliIU45x2HGyIB4dnM0UmUC+PhaLxefwOdia5zMT3+8wwYCQmEwd" + "i4vQKqHKvigKHoKnc9Rs7GMDUOhhGOnAYjWkzKKRGyxsDUA01QCw0QCOF0uh0OkfRUMMbyRNwTBiCYZwKMIYyZAUkSlBYkxsCYAAHG4qwCBwMQfBYlxsNgsDhLEgwHA8" + "PiPNg1ygP4uywIgMSwK4zSQG46BnFAATDJcL3IHM6DQBsPR3O83j/AsJyGH8w4ZJY5TsN8EAdFojTwJ0AAoA4MgATIMDqAcrQPMEwTDBgVy0LYtiuK8qyrFs6QtCocnL" + "Cs8wAGAChOGM+CZJ0HAaoQHQYocBiaHtJT3LEfgCLYIgQNYgw4IQiSaBcAABBEAB/DAXS4HgPAgLUSCzGkPjkIATyXPQoCeNYfR6Do7QGI8Zj+CAHiyCY2SkIQTSSCIy" + "DQCkpDBJQJinMMuAUPgOxGOcpA/AkoTzJwyiYFMiDwJEsShFAURFCwJRVFceQXKQIS8P8STlBgLggAcrAQCQATjIgZA0JgVSxL0OAmKI6CpEc4SuOkeBeOwMRnLQuQhO" + "ApDJAImYmD44BPIgAzFMYiR3LcQw4JwqhQAknAMFAxwEEwJwUO4ljCHgmxzNwNQ3EU3ScLYEAACocDePwZgCLI+yFN8jg7FEQTtKMcwrAAOhgHw6SQI4OCmJgjDmNAjj" + "5Gw+wbHkkTpEw7gpFgIAA2sABJEUThEK4QhgIJAQ==`)")))); var_Items->PutCellValue(h,long(1),var_Items->GetCellValue(h,long(0))); var_Items->PutCellHAlignment(h,long(1),EXG2ANTTLib::RightAlignment); var_Items->PutCellImage(h,long(1),var_Items->GetCellImage(h,long(0))); var_Items->PutCellImages(h,long(1),"2,1"); var_Items->PutCellPicture(h,long(1),((ObjectPtr)(var_Items->GetCellPicture(h,long(0))))); h = var_Items->AddItem("<b>HTML</b> <off 4>Caption"); var_Items->PutCellValueFormat(h,long(0),EXG2ANTTLib::exHTML); var_Items->PutCellImage(h,long(0),2); var_Items->PutCellImages(h,long(0),"1,2"); var_Items->PutCellPicture(h,long(0),((ObjectPtr)(spG2antt1->ExecuteTemplate(_bstr_t("loadpicture(`gCJKBOI4NBQaBQAhQNJJIIhShQAEEREAIA0ROZ6PT0hQKYZpIZDKBJkIgKByN5mNJsMsKPABVqXBI4KjrD7HL6GWKPJKiCIhMiySidKxbOzZZJWMLs") + "GL2FqyLjZMonNa2CyiZDOUqsQqUEq0ZCNISFXDIFxzZ4hUrbdrefZ/fz3ZgzZ75Tz3XjvHZnZznPieb55AKgAqmRyOOzEhR7XirWaWQQMTa+QIhDbZOZAAoYUCPDAQG7" + "FXI4JRrNCoIRdPyyFr0AYifDUKZ+PCufK4RReALLUbtdBHSrGTCCNKqT4MbRqUxxQx+CAAEQ2VCBbxqGaLYDZNgzFbCbLDarRCrqMYMM6cWqpHKUDqhZjnVijEoLcp0F" + "CjVg2OYhTjN/QWk4bo4iseBsAcABIDoPA5g2HgADIkQfDCNxwkEQYnFmAIAB4OJHGcKAPioGRKFKdh2g6UB8iiZ5QkYQp3gKWhDlsWYmAARBcgCIAUniVpmiSA5AF3A4" + "wG8P41nGWwDDAW4MAAIpSG+bRzBoGx3AeCJhh6C4ljCUJGnSRBUFKAIQA6EgIHMWBoHqYgAngHJDCALBmhCCAfHOARAScUBvAmc5zHYXxoguXQ8DEMIAH8dI8HmP4/Ay" + "QJAEAYAoHqRByEQGJiECBAzAkKIpBYNIcikAp8kcZhDn4EBChmUoMgqHIqhiWoIgaDImgyVQImaRw/F0EZGCcSw3DaM4Kn6GBBhwYYZDGZo3C+RgOAmNQnhYeYqgsTZe" + "nEVgSFYLo2CydhGg4OROF2HJjlydR7i+cJjDGFo8B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8jg7FEQTtKMcwrAAOhgHw6SQI4OCmJgjDmNAjj" + "5Gw+wbHkkTpEw7gpFgIAA2sABJEUThEK4QhgIJAQ==`)")))); var_Items->PutCellValue(h,long(1),var_Items->GetCellValue(h,long(0))); var_Items->PutCellValueFormat(h,long(1),EXG2ANTTLib::exHTML); var_Items->PutCellHAlignment(h,long(1),EXG2ANTTLib::RightAlignment); var_Items->PutCellImage(h,long(1),var_Items->GetCellImage(h,long(0))); var_Items->PutCellImages(h,long(1),"2,1"); var_Items->PutCellPicture(h,long(1),((ObjectPtr)(var_Items->GetCellPicture(h,long(0))))); spG2antt1->EndUpdate(); |
2232 |
ImageSize property on 32 (specifies the size of control' icons/images/check-boxes/radio-buttons)
// AddColumn event - Fired after a new column has been added. void OnAddColumnG2antt1(LPDISPATCH Column) { // Column.Def(48) = 2 // Column.Def(49) = 2 } // AddItem event - Occurs after a new Item has been inserted to Items collection. void OnAddItemG2antt1(long Item) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetItems()->AddBar(Item,"Task",COleDateTime(2022,1,2,0,00,00).operator DATE(),COleDateTime(2022,1,8,0,00,00).operator DATE(),vtMissing,"<img>1</img>"); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutImageSize(32); spG2antt1->PutDefaultItemHeight(36); spG2antt1->PutHeaderHeight(spG2antt1->GetDefaultItemHeight()); spG2antt1->PutSortBarHeight(spG2antt1->GetDefaultItemHeight()); spG2antt1->GetFont()->PutSize(_variant_t(long(16))); spG2antt1->GetFilterBarFont()->PutSize(_variant_t(spG2antt1->GetFont()->GetSize())); spG2antt1->GetToolTipFont()->PutSize(_variant_t(spG2antt1->GetFont()->GetSize())); spG2antt1->PutIndent(26); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2022,1,1,0,00,00).operator DATE()); var_Chart->GetBars()->GetItem("Task")->PutHeight(22); spG2antt1->Images(_bstr_t("gBJJgBAIDAAEg4AEEKAD/hz/EMNh8TIRNGwAjEZAEXjAojKAjMLjABhkaABAk0plUrlktl0vmExmUzmk1m03nE5nU7nk9miAoE+oVDolFo1HpFJpU5h8Sf9OqFNqUOq") + "NUqdPq9VrFWrlbr1QpdhAFAkFis1ntFptVrtkrpszrNvmVxqk3uVtm1kmF3sdBvF/wGBmV+j9BYGHwWJulfxdax2NyFdx2JlV6l9Nw7AAGZymdz2Cy2GxErvWcz9ivlw" + "yV21cuxugwktzGIzmvwtl0+53U5y0a0Wazmmyu/3dCyOMyXHx/J5nIr9q3uyqnBxFN3G46ma4vb7mD2Ng4nZze00fDkHC7t7us2rOX5tguetpHRlmz4HVqnXk1PjHO+C" + "MPo9MBMC+j2vC8j7wS8cFNI4kBo05UIvfCT/NsnsApU+0Fqg/T+oy/kPxC0sEQfErKQK96+w28UWRI8UGvO8sTLS9r2PWmsMJTDTask3CsIbIEQRA3shOXEEAO/GclJ9" + "FEKrrA8FRbKMXRIlb0JxCkjS1LMswhCcvuel0cv26cSMa8Ufx+2sQwhEUoSXOCjSbLcnxjKc7sdKUVyq28NtVI71P9P7JxtQEapjQ6fzfM8zPfNE2PhIsLL63E40slk5" + "y7N89LcyU9SvMb3SdUc6VJLj5VLVLfO/PS9KzNFHUa/0XyBD0dxlS9cxhMlTRSoNXypPErWDPyfNS+MwprRNO0FD8wVVZ1AI08URwVRjtJ1WCn21QkkUrXVLVPQS/XIk" + "FgTxT9iONZ9xVTdq+L1eKg3kkF6Upe68XtfV51/MtrVjBlwYFL1ev8y1/P6/lyzzYl02wntj0RVFmS1Qa+M5as93QxEUW9e993rfmQ2+vy65M/mL1lhl/2bj2ByVduMt" +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CiCaBKBYfdjGoJoKiKaJKDaDojmkChGgmIgpCoV" + "oWiWaJZiSd4mmmSh2h6J5qAqBoiiiaY5iSeIpmqComiqKpqkqNouiuah6hqMIsmsSpWiuGhP1kOoumuSp2j6L5sAsBo54gKwWkaMZsgsJpKjKbJLDaRYxYWRpSjSbIZi" + "Se41m2CxmlqNptksdpejebR5iSfI4m4S4W16boLiaao6m5fJ9jubwLkaco8m8S5WnaPZunuOp4j6b5Lnac4SA0PAGlgP4wEwFwGkGcIMCcCpCnCCxiA8NYAAmMJfkSbh" + "FCcFpFnGDBnBqRpUhuEwTDeZ5lHCfw6HIQxLCaAxygyJwqgGcATE4FA6hWY4tjEAAQBAgIA=="); spG2antt1->PutBackColorHeader(0x4c6c6c6); spG2antt1->PutSelBackColor(0x4000000); spG2antt1->PutSelForeColor(RGB(0,0,1)); spG2antt1->PutCheckImage(EXG2ANTTLib::Unchecked,16777216); spG2antt1->PutCheckImage(EXG2ANTTLib::Checked,33554432); spG2antt1->PutCheckImage(EXG2ANTTLib::PartialChecked,50331648); spG2antt1->PutBackground(EXG2ANTTLib::exSelBackColorFilter,spG2antt1->GetSelBackColor()); spG2antt1->PutBackground(EXG2ANTTLib::exSelForeColorFilter,spG2antt1->GetSelForeColor()); spG2antt1->PutBackground(EXG2ANTTLib::exBackColorFilter,spG2antt1->GetBackColor()); spG2antt1->PutBackground(EXG2ANTTLib::exForeColorFilter,spG2antt1->GetForeColor()); spG2antt1->PutBackground(EXG2ANTTLib::exCursorHoverColumn,-1); spG2antt1->PutBackground(EXG2ANTTLib::exHeaderFilterBarButton,0x4000000); spG2antt1->PutBackground(EXG2ANTTLib::exHeaderFilterBarActive,0x4010101); spG2antt1->PutBackground(EXG2ANTTLib::exFooterFilterBarButton,0x40000ff); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); spG2antt1->PutShowFocusRect(VARIANT_FALSE); spG2antt1->PutSortBarVisible(VARIANT_TRUE); spG2antt1->PutAllowGroupBy(VARIANT_TRUE); spG2antt1->PutBackColorSortBar(spG2antt1->GetBackColor()); spG2antt1->PutBackColorLevelHeader(spG2antt1->GetBackColor()); spG2antt1->PutFilterBarDropDownHeight(1); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Check"))); var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutPartialCheck(VARIANT_TRUE); var_Column->PutWidth(128); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterList(EXG2ANTTLib::exShowCheckBox); EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Pos"))); var_Column1->PutFormatColumn(L"1 pos ``"); var_Column1->PutAllowSort(VARIANT_FALSE); var_Column1->PutWidth(48); var_Column1->PutAllowSizing(VARIANT_FALSE); var_Column1->PutAlignment(EXG2ANTTLib::CenterAlignment); var_Column1->PutHeaderAlignment(EXG2ANTTLib::CenterAlignment); EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Image"))); var_Column2->PutDisplayFilterButton(VARIANT_TRUE); var_Column2->PutFilterList(EXG2ANTTLib::FilterListEnum(EXG2ANTTLib::exShowExclude | EXG2ANTTLib::exShowCheckBox | EXG2ANTTLib::exSortItemsAsc)); var_Column2->PutFilterType(EXG2ANTTLib::exImage); var_Column2->PutDisplayExpandButton(VARIANT_TRUE); var_Column2->PutExpandColumns(L"1,2,3"); var_Column2->PutWidth(128); var_Column2->PutHeaderImage(1); EXG2ANTTLib::IColumnPtr var_Column3 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Images"))); var_Column3->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE); var_Column3->PutWidth(196); var_Column3->PutHTMLCaption(L"<img>1</img><img>2</img><img>3</img> Images"); spG2antt1->GetColumns()->GetItem("Pos")->PutPosition(3); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long hR = var_Items->AddItem("Root"); var_Items->PutItemDivider(hR,0); var_Items->PutItemDividerLine(hR,EXG2ANTTLib::EmptyLine); long h = var_Items->InsertItem(hR,vtMissing,"Child A"); var_Items->PutCellImage(h,long(2),1); var_Items->PutCellImages(h,long(3),"1,2,3"); var_Items->PutCellValue(h,long(3),"123"); h = var_Items->InsertItem(hR,vtMissing,"Child B"); var_Items->PutCellState(h,long(0),1); var_Items->PutCellImage(h,long(2),3); var_Items->PutCellImages(h,long(3),"2,3,1"); var_Items->PutCellValue(h,long(3),"231"); var_Items->PutSelectItem(h,VARIANT_TRUE); h = var_Items->InsertItem(hR,vtMissing,"Child C"); var_Items->PutCellImage(h,long(2),2); var_Items->PutCellState(h,long(3),1); var_Items->PutCellValue(h,long(3),"312"); var_Items->PutCellImages(h,long(3),"3,1,2"); var_Items->PutExpandItem(hR,VARIANT_TRUE); spG2antt1->EndUpdate(); |
2231 |
ImageSize property on 16 (default) (specifies the size of control' icons/images/check-boxes/radio-buttons)
// AddColumn event - Fired after a new column has been added. void OnAddColumnG2antt1(LPDISPATCH Column) { // Column.Def(48) = 2 // Column.Def(49) = 2 } // AddItem event - Occurs after a new Item has been inserted to Items collection. void OnAddItemG2antt1(long Item) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetItems()->AddBar(Item,"Task",COleDateTime(2022,1,2,0,00,00).operator DATE(),COleDateTime(2022,1,8,0,00,00).operator DATE(),vtMissing,"<img>1</img>"); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2022,1,1,0,00,00).operator DATE()); spG2antt1->PutImageSize(16); spG2antt1->Images(_bstr_t("gBJJgBAIDAAEg4ACEKAD/hz/EMNh8TIRNGwAjEZAEXjAojJAjMLjABAAgjUYkUnlUrlktl0vmExmUzmk1m03nE5nU7nkrQCAntBoVDolFo1HoM/ADAplLptImdMYFOq") + "dSqlXq1QrVbrlGpVWsFNrNdnNjsk7pQAtNroFnt0sh8Yr9iulTuNxs1Eu8OiT/vsnsNVutXlk/oGGtVKxGLxWNtsZtN8iUYuNvy0Zvd+xNYwdwvl4p870GCqc8vOeuVt" + "tmp1knyOayWVy+WzN/ze1wOElenm+12WUz/Bv2/3UyyWrzeutux2GSyGP2dQ33C1ur3GD3M4zUNzHdlWjq/E3nGzVpjWv4HA7fRy/Tv2IrN8rPW6nZ3ve7mUlfu20Z8a" + "cvQyb+vY9jasYoDwMm+LytVBDqKG3z8O3Cb8P+mkAuY9cCQ2uL4KaxDKvkp8RNLEjqugnrwQo/UWPzFyeQw5sNLZFENrI4kOqU66pw8uzmOKvTqNqjULJvGL1JO48GtT" + "GsbLdEL3scxLlyiw8dQeoUVxdLTtyKmUjwGlslRPJsnK1HbAKbKCrsQo8uQk/CeP44iaR/ATnTNPLvyxPU+z9P9AUDQVBowiofJXQ6Oo+kKMpIkjztE4TKn4P6JowfgP" + "nwD5/nAjB8AOeAPo0eAA1IAFH07UhAIMpYAVIYFHqBUhwVjV1S1EtQAHxW65V0AZwAeuQAnwB5gAPYViEDVhwAHTQBkCjB4gOhwDmCyhH0sACAg=="); EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance(); var_Appearance->Add(4,_bstr_t("gBFLBCJwBAEHhEJAAEhABUYCg6AADACAxRDgMQBQKAAzQFAYbhkGCGAAGMZxRgmFgAQhFcZQSKUOQTDKMIziYBYfgkMIgSbJUgDGAkRRdDSOYDmGQYDiCIoRShOMIjH") + "LUXxtDaIZwhEAoJb+RgAUY/cTzaAEUwHHiTKInaCQShsFYJUJAdRURQ9EwvCIZBpEWwLChENQwWLCNj2TScBwjCyqbale45ViqdoDU5EUiXJJ8ZxnECfYyrGjaMpCeKB" + "UrGYTVRBIMxLLSia5oeJqMrnBpNVrIUgXCAGFwHK6BcauXIIDp6XoWWRbAAWDpVVzNNC3YzkCIceADHKiXxmVz4JLdGZ1QTGID2XaYaxWK4oZjsVSc4KDHbETbHFi9Fo" + "3NaaxGisew+GYc4HlCR5NAAAIIEkQJSGMOgdE4RhYDwJJsAaAYQgmPpolCWgSCiBJzjcEIAkQXIBm8d5UhOQgCDUIBDDJDhgggJgKgKYJIDSVoDk8KBFF4OohEMZgWDs" + "YYDj4GoGmGSB2B6B5iAiBgYDsYRjGSbIJo4RgqDuIpIAoLoLmMCJGDKDJjJiLA7xqUAAgGTwYnYPoPmQCQGEKEJkEkFg9gGY44BoRoSmSSQ2EKEggHgRhShSZRJFYVoV" + "mWCRmFKFAgGOTheheZgJgYYoYmYSYWGaF4lkMMJ0hqZpJjYbobmcCZGHKHJmjmJh0h2Z4JmYcIaE8WZ2H6H5oAoBoCiCaBKBYfdjGoJoKiKaJKDaDojmkChGgmIgpCoV" + "oWiWaJZiSd4mmmSh2h6J5qAqBoiiiaY5iSeIpmqComiqKpqkqNouiuah6hqMIsmsSpWiuGhP1kOoumuSp2j6L5sAsBo54gKwWkaMZsgsJpKjKbJLDaRYxYWRpSjSbIZi" + "Se41m2CxmlqNptksdpejebR5iSfI4m4S4W16boLiaao6m5fJ9jubwLkaco8m8S5WnaPZunuOp4j6b5Lnac4SA0PAGlgP4wEwFwGkGcIMCcCpCnCCxiA8NYAAmMJfkSbh" + "FCcFpFnGDBnBqRpUhuEwTDeZ5lHCfw6HIQxLCaAxygyJwqgGcATE4FA6hWY4tjEAAQBAgIA=="); spG2antt1->PutBackColorHeader(0x4c6c6c6); spG2antt1->PutSelBackColor(0x4000000); spG2antt1->PutSelForeColor(RGB(0,0,1)); spG2antt1->PutBackground(EXG2ANTTLib::exSelBackColorFilter,spG2antt1->GetSelBackColor()); spG2antt1->PutBackground(EXG2ANTTLib::exSelForeColorFilter,spG2antt1->GetSelForeColor()); spG2antt1->PutBackground(EXG2ANTTLib::exBackColorFilter,spG2antt1->GetBackColor()); spG2antt1->PutBackground(EXG2ANTTLib::exForeColorFilter,spG2antt1->GetForeColor()); spG2antt1->PutBackground(EXG2ANTTLib::exCursorHoverColumn,-1); spG2antt1->PutBackground(EXG2ANTTLib::exHeaderFilterBarButton,0x4000000); spG2antt1->PutBackground(EXG2ANTTLib::exHeaderFilterBarActive,0x4010101); spG2antt1->PutBackground(EXG2ANTTLib::exFooterFilterBarButton,0x40000ff); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); spG2antt1->PutShowFocusRect(VARIANT_FALSE); spG2antt1->PutSortBarVisible(VARIANT_TRUE); spG2antt1->PutAllowGroupBy(VARIANT_TRUE); spG2antt1->PutBackColorSortBar(spG2antt1->GetBackColor()); spG2antt1->PutBackColorLevelHeader(spG2antt1->GetBackColor()); spG2antt1->PutFilterBarDropDownHeight(1); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Check"))); var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE); var_Column->PutPartialCheck(VARIANT_TRUE); var_Column->PutWidth(128); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterList(EXG2ANTTLib::exShowCheckBox); EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Pos"))); var_Column1->PutFormatColumn(L"1 pos ``"); var_Column1->PutAllowSort(VARIANT_FALSE); var_Column1->PutWidth(48); var_Column1->PutAllowSizing(VARIANT_FALSE); var_Column1->PutAlignment(EXG2ANTTLib::CenterAlignment); var_Column1->PutHeaderAlignment(EXG2ANTTLib::CenterAlignment); EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Image"))); var_Column2->PutDisplayFilterButton(VARIANT_TRUE); var_Column2->PutFilterList(EXG2ANTTLib::FilterListEnum(EXG2ANTTLib::exShowExclude | EXG2ANTTLib::exShowCheckBox | EXG2ANTTLib::exSortItemsAsc)); var_Column2->PutFilterType(EXG2ANTTLib::exImage); var_Column2->PutDisplayExpandButton(VARIANT_TRUE); var_Column2->PutExpandColumns(L"1,2,3"); var_Column2->PutWidth(128); var_Column2->PutHeaderImage(1); EXG2ANTTLib::IColumnPtr var_Column3 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Images"))); var_Column3->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE); var_Column3->PutWidth(196); var_Column3->PutHTMLCaption(L"<img>1</img><img>2</img><img>3</img> Images"); spG2antt1->GetColumns()->GetItem("Pos")->PutPosition(3); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long hR = var_Items->AddItem("Root"); var_Items->PutItemDivider(hR,0); var_Items->PutItemDividerLine(hR,EXG2ANTTLib::EmptyLine); long h = var_Items->InsertItem(hR,vtMissing,"Child A"); var_Items->PutCellImage(h,long(2),1); var_Items->PutCellImages(h,long(3),"1,2,3"); var_Items->PutCellValue(h,long(3),"123"); h = var_Items->InsertItem(hR,vtMissing,"Child B"); var_Items->PutCellState(h,long(0),1); var_Items->PutCellImage(h,long(2),3); var_Items->PutCellImages(h,long(3),"2,3,1"); var_Items->PutCellValue(h,long(3),"231"); var_Items->PutSelectItem(h,VARIANT_TRUE); h = var_Items->InsertItem(hR,vtMissing,"Child C"); var_Items->PutCellImage(h,long(2),2); var_Items->PutCellState(h,long(3),1); var_Items->PutCellValue(h,long(3),"312"); var_Items->PutCellImages(h,long(3),"3,1,2"); var_Items->PutExpandItem(hR,VARIANT_TRUE); spG2antt1->EndUpdate(); |
2230 |
How do I clip/hide/align the bar's caption/text based on the bar's size/width/length
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Clip"); spG2antt1->PutScrollBySingleLine(VARIANT_TRUE); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exRowLines); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutAllowResizeChart(EXG2ANTTLib::ResizeChartEnum(EXG2ANTTLib::exAllowResizeChartMiddle | EXG2ANTTLib::exAllowResizeChartHeader)); var_Chart->PutDrawGridLines(EXG2ANTTLib::exRowLines); var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,23,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->PutPaneWidth(VARIANT_FALSE,216); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task"); var_Bar->PutPattern(EXG2ANTTLib::exPatternBox); var_Bar->PutColor(RGB(164,164,164)); var_Bar->PutStartColor(RGB(240,240,240)); var_Bar->PutEndColor(var_Bar->GetStartColor()); var_Bar->PutOverlaidType(EXG2ANTTLib::OverlaidBarsTypeEnum(EXG2ANTTLib::exOverlaidBarsIncludeCaption | EXG2ANTTLib::exOverlaidBarsStackAutoArrange | EXG2ANTTLib::exOverlaidBarsStack)); var_Bar->PutHeight(15); var_Chart->PutMinUnitWidth(var_Chart->GetUnitWidth()); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("no clip, (0-2)"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarExtraCaption,"no clip, right(<b>2</b>)"); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarExtraCaptionHAlign,long(2)); var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K2",vtMissing); var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarExtraCaption,"no clip, center(<b>1</b>)"); var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarExtraCaptionHAlign,long(1)); var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K3",vtMissing); var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarExtraCaption,"no clip, left(<b>0</b>)"); var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarExtraCaptionHAlign,long(0)); h = var_Items->AddItem("clip, inside (3-5)"); var_Items->AddBar(h,"Task",COleDateTime(2000,12,28,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K1",vtMissing); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarExtraCaption,"clip, inside, right(<b>5</b>)"); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarExtraCaptionHAlign,long(5)); var_Items->AddBar(h,"Task",COleDateTime(2000,12,28,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K2",vtMissing); var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarExtraCaption,"clip, inside, center(<b>4</b>)"); var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarExtraCaptionHAlign,long(4)); var_Items->AddBar(h,"Task",COleDateTime(2000,12,28,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K3",vtMissing); var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarExtraCaption,"clip, inside, left(<b>3</b>)"); var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarExtraCaptionHAlign,long(3)); h = var_Items->AddItem("hide on min width, clip if not fit, inside (6-8)"); var_Items->AddBar(h,"Task",COleDateTime(2000,12,26,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"K1",vtMissing); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarExtraCaption,"hide on min width, clip if not fit, inside, right(<b>8</b>)"); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarExtraCaptionHAlign,long(8)); var_Items->AddBar(h,"Task",COleDateTime(2000,12,26,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"K2",vtMissing); var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarExtraCaption,"hide on min width, clip if not fit, inside, center(<b>7</b>)"); var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarExtraCaptionHAlign,long(7)); var_Items->AddBar(h,"Task",COleDateTime(2000,12,26,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"K3",vtMissing); var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarExtraCaption,"hide on min width, clip if not fit, inside, left(<b>6</b>)"); var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarExtraCaptionHAlign,long(6)); h = var_Items->AddItem("hide if not fit, no clip, inside (9-11)"); var_Items->AddBar(h,"Task",COleDateTime(2000,12,28,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K1",vtMissing); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarExtraCaption,"hide if not fit, no clip, inside, right(<b>11</b>)"); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarExtraCaptionHAlign,long(11)); var_Items->AddBar(h,"Task",COleDateTime(2000,12,28,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K2",vtMissing); var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarExtraCaption,"hide if not fit, no clip, center(<b>10</b>)"); var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarExtraCaptionHAlign,long(10)); var_Items->AddBar(h,"Task",COleDateTime(2000,12,28,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K3",vtMissing); var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarExtraCaption,"hide if not fit, no clip, inside, left(<b>9</b>)"); var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarExtraCaptionHAlign,long(9)); h = var_Items->AddItem("no clip, inside, outside (12-14)"); var_Items->AddBar(h,"Task",COleDateTime(2000,12,28,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K1",vtMissing); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarExtraCaption,"no clip, inside, outside, right(<b>14</b>)"); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarExtraCaptionHAlign,long(14)); var_Items->AddBar(h,"Task",COleDateTime(2000,12,28,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K2",vtMissing); var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarExtraCaption,"no clip, inside, outside, center(<b>13</b>)"); var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarExtraCaptionHAlign,long(13)); var_Items->AddBar(h,"Task",COleDateTime(2000,12,28,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"K3",vtMissing); var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarExtraCaption,"no clip, inside, outside, left(<b>12</b>)"); var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarExtraCaptionHAlign,long(12)); h = var_Items->AddItem("no clip, outside (16-18)"); var_Items->AddBar(h,"Task",COleDateTime(2000,12,30,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K1",vtMissing); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarExtraCaption,"no clip, outside, right(<b>18</b>)"); var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarExtraCaptionHAlign,long(18)); var_Items->AddBar(h,"Task",COleDateTime(2000,12,30,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K2",vtMissing); var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarExtraCaption,"no clip, outside, center(<b>17</b>)"); var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarExtraCaptionHAlign,long(17)); var_Items->AddBar(h,"Task",COleDateTime(2000,12,30,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K3",vtMissing); var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarExtraCaption,"no clip, outside, left(<b>16</b>)"); var_Items->PutItemBar(h,"K3",EXG2ANTTLib::exBarExtraCaptionHAlign,long(16)); spG2antt1->EndUpdate(); |
2229 |
The user clicks the drop-down filter, select a value and the control's list filters for the selected item(s). Is there a way for when the user then goes to the next column to add another filter and the drop down arrow is clicked for the list of values they can filter by to be limited to what is being displayed in the list due to the first filter they set
|
2228 |
Does the control display images from database (DAO)
|
2227 |
Does the control display images from database (ADO)
|
2226 |
Is it possible to set from code, a column sort without being inserted in the sortbar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutColumnAutoResize(VARIANT_FALSE); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library' #import <msado15.dll> rename("EOF","REOF") */ ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset"); rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB::adOpenKeyset,ADODB::adLockOptimistic,0); spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs))); spG2antt1->PutSortBarVisible(VARIANT_TRUE); spG2antt1->PutLayout(L"singlesort=\"C1:1\""); spG2antt1->EndUpdate(); |
2225 |
Is it possible to view all events the control fires
// BeforeExpandItem event - Fired before an item is about to be expanded (collapsed). void OnBeforeExpandItemG2antt1(long Item,VARIANT FAR* Cancel) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->Refresh(); } // Event event - Notifies the application once the control fires an event. void OnEventG2antt1(long EventID) { EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); OutputDebugStringW( _bstr_t(spG2antt1->GetEventParam(-2)) ); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutIndent(16); spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot); spG2antt1->PutHasLines(EXG2ANTTLib::exSolidLine); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exHLines); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE()); var_Chart->PutShowCollapsedBars(VARIANT_TRUE); var_Chart->PutLevelCount(2); var_Chart->PutPaneWidth(VARIANT_FALSE,128); var_Chart->PutDrawGridLines(EXG2ANTTLib::exHLines); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task"); var_Bar->PutOverlaidType(EXG2ANTTLib::exOverlaidBarsStack); var_Bar->PutColor(RGB(0,0,0)); var_Bar->PutStartColor(RGB(196,196,196)); var_Bar->PutEndColor(RGB(196,196,196)); var_Bar->PutPattern(EXG2ANTTLib::exPatternBox); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Project 1"); long h1 = var_Items->InsertItem(h,vtMissing,"Resources"); var_Items->AddBar(h1,"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,25,0,00,00).operator DATE(),"A",vtMissing); var_Items->AddBar(h1,"Task",COleDateTime(2006,9,24,0,00,00).operator DATE(),COleDateTime(2006,9,28,0,00,00).operator DATE(),"B",vtMissing); var_Items->AddBar(h1,"Task",COleDateTime(2006,9,27,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"C",vtMissing); h = var_Items->AddItem("Project 2"); h1 = var_Items->InsertItem(h,vtMissing,"Resources"); var_Items->AddBar(h1,"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,25,0,00,00).operator DATE(),"A",vtMissing); var_Items->AddBar(h1,"Task",COleDateTime(2006,9,24,0,00,00).operator DATE(),COleDateTime(2006,9,28,0,00,00).operator DATE(),"B",vtMissing); var_Items->AddBar(h1,"Task",COleDateTime(2006,9,27,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"C",vtMissing); var_Items->PutExpandItem(h,VARIANT_TRUE); spG2antt1->EndUpdate(); |
2224 |
How can I find all occurences of the giving value, within a column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Pos"))); var_Column->PutFormatColumn(L"1 pos 'A-Z'"); var_Column->PutPosition(0); var_Column->PutAllowSizing(VARIANT_FALSE); var_Column->PutWidth(32); var_Column->PutEnabled(VARIANT_FALSE); EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Index"))); var_Column1->PutFormatColumn(L"0 index ''"); var_Column1->PutAllowSizing(VARIANT_FALSE); var_Column1->PutWidth(32); var_Column1->PutEnabled(VARIANT_FALSE); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddItem("A"); var_Items->AddItem("A"); var_Items->AddItem("A"); OutputDebugStringW( var_Items->GetCellCaption(var_Items->GetFindItem("A",long(0),long(0)),long(1)) ); OutputDebugStringW( var_Items->GetCellCaption(var_Items->GetFindItem("A",long(0),long(1)),long(1)) ); OutputDebugStringW( var_Items->GetCellCaption(var_Items->GetFindItem("A",long(0),long(2)),long(1)) ); spG2antt1->EndUpdate(); |
2223 |
How can I specify the bar's legend within the control's histogram (sample 2, expression)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Machines"); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exHLines); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutDrawGridLines(EXG2ANTTLib::exHLines); var_Chart->PutPaneWidth(VARIANT_FALSE,128); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task"); var_Bar->PutPattern(EXG2ANTTLib::exPatternSolid); var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18)); var_Bar->PutOverlaidType(EXG2ANTTLib::exOverlaidBarsCascade); var_Bar->PutHistogramPattern(var_Bar->GetPattern()); var_Bar->PutHistogramType(EXG2ANTTLib::exHistCumulative); var_Bar->PutHistogramCumulativeOriginalColorBars(EXG2ANTTLib::exKeepOriginalColor); var_Bar->PutHistogramItems(-4); var_Bar->PutHistogramRulerLinesColor(RGB(102,102,102)); var_Bar->PutDef(EXG2ANTTLib::exBarToolTip,"<%=%3%> <fgcolor 666666><font ;6><off 4><%=%C0%>"); var_Bar->PutDef(EXG2ANTTLib::exBarHistLegend,"<fgcolor=666666><%=lower(%3)%>"); var_Chart->PutHistogramHeight(64); var_Chart->PutHistogramVisible(VARIANT_TRUE); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Machine 1"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),long(1),"Bill"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),long(2),"Laura"); var_Items->PutItemBar(h,long(2),EXG2ANTTLib::exBarColor,long(16776960)); h = var_Items->AddItem("Machine 2"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,12,0,00,00).operator DATE(),COleDateTime(2001,1,19,0,00,00).operator DATE(),long(3),"Bill"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,10,0,00,00).operator DATE(),COleDateTime(2001,1,13,0,00,00).operator DATE(),long(4),"Laura"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,10,0,00,00).operator DATE(),COleDateTime(2001,1,14,0,00,00).operator DATE(),long(5),"Bill"); var_Items->PutItemBar(h,long(4),EXG2ANTTLib::exBarColor,long(16776960)); var_Items->AddBar(var_Items->AddItem("Machine 3"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),long(6),"Bill"); spG2antt1->EndUpdate(); |
2222 |
How can I specify the bar's legend within the control's histogram (sample 1)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Machines"); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exHLines); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutDrawGridLines(EXG2ANTTLib::exHLines); var_Chart->PutPaneWidth(VARIANT_FALSE,128); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task"); var_Bar->PutPattern(EXG2ANTTLib::exPatternSolid); var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18)); var_Bar->PutOverlaidType(EXG2ANTTLib::exOverlaidBarsCascade); var_Bar->PutHistogramPattern(var_Bar->GetPattern()); var_Bar->PutHistogramType(EXG2ANTTLib::exHistCumulative); var_Bar->PutHistogramCumulativeOriginalColorBars(EXG2ANTTLib::exKeepOriginalColor); var_Bar->PutHistogramItems(-4); var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"Bill"); var_Bar->PutDef(EXG2ANTTLib::exBarHistLegend,"B(ill)"); var_Chart->PutHistogramHeight(64); var_Chart->PutHistogramVisible(VARIANT_TRUE); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Machine 1"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),long(1),vtMissing); var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),long(2),"Laura"); var_Items->PutItemBar(h,long(2),EXG2ANTTLib::exBarColor,long(16776960)); var_Items->PutItemBar(h,long(2),EXG2ANTTLib::exBarHistLegend,"L(aura)"); h = var_Items->AddItem("Machine 2"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,12,0,00,00).operator DATE(),COleDateTime(2001,1,19,0,00,00).operator DATE(),long(3),vtMissing); var_Items->AddBar(h,"Task",COleDateTime(2001,1,10,0,00,00).operator DATE(),COleDateTime(2001,1,13,0,00,00).operator DATE(),long(4),"Laura"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,10,0,00,00).operator DATE(),COleDateTime(2001,1,14,0,00,00).operator DATE(),long(5),vtMissing); var_Items->PutItemBar(h,long(4),EXG2ANTTLib::exBarColor,long(16776960)); var_Items->PutItemBar(h,long(4),EXG2ANTTLib::exBarHistLegend,"L(aura)"); var_Items->AddBar(var_Items->AddItem("Machine 3"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),long(6),vtMissing); spG2antt1->EndUpdate(); |
2221 |
When I drag a bar and I drag it over other items, but just release it on one of the items (last item), the BarParentChange event is triggered for every item. I need it just when I drop it (release left mouse). How can I do this
// BarParentChange event - Occurs just before moving a bar from current item to another item. void OnBarParentChangeG2antt1(long Item,VARIANT Key,long NewItem,BOOL FAR* Cancel) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); OutputDebugStringW( L"Hover Over Item: " ); OutputDebugStringW( spG2antt1->GetItems()->GetCellCaption(NewItem,long(0)) ); Cancel = spG2antt1->GetItems()->GetItemData(NewItem); } // ChartEndChanging event - Occurs after the chart has been changed. void OnChartEndChangingG2antt1(long Operation) { EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); OutputDebugStringW( L"ChartEndChanging " ); OutputDebugStringW( L"Operation" ); } // ChartStartChanging event - Occurs when the chart is about to be changed. void OnChartStartChangingG2antt1(long Operation) { EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); OutputDebugStringW( L"ChartStartChanging " ); OutputDebugStringW( L"Operation" ); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutAllowLinkBars(VARIANT_FALSE); var_Chart->GetBars()->GetItem("Task")->PutOverlaidType(EXG2ANTTLib::OverlaidBarsTypeEnum(EXG2ANTTLib::exOverlaidBarsTransparent | EXG2ANTTLib::exOverlaidBarsOffset)); spG2antt1->GetColumns()->Add(L"Column"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Item 1"); var_Items->PutEnableItem(h,VARIANT_FALSE); var_Items->PutItemData(h,long(-1)); h = var_Items->AddItem("Item 2"); var_Items->PutItemData(h,long(0)); var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"B",vtMissing); var_Items->PutItemBar(h,"B",EXG2ANTTLib::exBarCanMoveToAnother,VARIANT_TRUE); var_Items->PutItemData(var_Items->AddItem("Item 3"),long(0)); var_Items->PutItemData(var_Items->AddItem("Item 4"),long(0)); spG2antt1->EndUpdate(); |
2220 |
Hide non-working days, Hide non-working hours
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2022,7,29,0,00,00).operator DATE()); var_Chart->PutLabel(EXG2ANTTLib::exHour,_bstr_t("<font ;6><%h%><|><font ;6><%hh%><|><%h%> <%AM/PM%><|><%d3%>, <%m3%> <%d%>, '<%yy%> <%h%> <%AM/PM%><|><%dddd%>, <%mmmm%> <%d%>, ") + "<%yyyy%> <%h%> <%AM/PM%><||><||>65536"); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutLevelCount(2); var_Chart->PutUnitWidth(12); var_Chart->PutNonworkingDaysColor(RGB(51,51,51)); var_Chart->PutNonworkingDaysPattern(EXG2ANTTLib::exPatternBDiagonal); var_Chart->PutNonworkingHoursColor(RGB(187,187,187)); var_Chart->PutNonworkingHoursPattern(EXG2ANTTLib::exPatternBDiagonal); var_Chart->PutAllowResizeChart(EXG2ANTTLib::ResizeChartEnum(EXG2ANTTLib::exAllowChangeUnitScale | EXG2ANTTLib::exAllowResizeChartMiddle | EXG2ANTTLib::exAllowResizeChartHeader)); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0); var_Level->PutLabel("<%dddd%>"); var_Level->PutAlignment(EXG2ANTTLib::CenterAlignment); var_Chart->GetLevel(1)->PutLabel(long(65536)); var_Chart->PutUnitScale(EXG2ANTTLib::exHour); var_Chart->PutNonworkingHours(16773375); var_Chart->PutShowNonworkingUnits(VARIANT_FALSE); var_Chart->PutShowNonworkingDates(VARIANT_FALSE); var_Chart->PutShowNonworkingHours(VARIANT_FALSE); spG2antt1->EndUpdate(); |
2219 |
Show non-working days pattern, Hide non-working hours
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2022,7,29,0,00,00).operator DATE()); var_Chart->PutLabel(EXG2ANTTLib::exHour,_bstr_t("<font ;6><%h%><|><font ;6><%hh%><|><%h%> <%AM/PM%><|><%d3%>, <%m3%> <%d%>, '<%yy%> <%h%> <%AM/PM%><|><%dddd%>, <%mmmm%> <%d%>, ") + "<%yyyy%> <%h%> <%AM/PM%><||><||>65536"); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutLevelCount(2); var_Chart->PutUnitWidth(12); var_Chart->PutNonworkingDaysColor(RGB(51,51,51)); var_Chart->PutNonworkingDaysPattern(EXG2ANTTLib::exPatternBDiagonal); var_Chart->PutNonworkingHoursColor(RGB(187,187,187)); var_Chart->PutNonworkingHoursPattern(EXG2ANTTLib::exPatternBDiagonal); var_Chart->PutAllowResizeChart(EXG2ANTTLib::ResizeChartEnum(EXG2ANTTLib::exAllowChangeUnitScale | EXG2ANTTLib::exAllowResizeChartMiddle | EXG2ANTTLib::exAllowResizeChartHeader)); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0); var_Level->PutLabel("<%dddd%>"); var_Level->PutAlignment(EXG2ANTTLib::CenterAlignment); var_Chart->GetLevel(1)->PutLabel(long(65536)); var_Chart->PutUnitScale(EXG2ANTTLib::exHour); var_Chart->PutNonworkingHours(16773375); var_Chart->PutShowNonworkingUnits(VARIANT_FALSE); var_Chart->PutShowNonworkingDates(VARIANT_TRUE); var_Chart->PutShowNonworkingHours(VARIANT_FALSE); spG2antt1->EndUpdate(); |
2218 |
Hide non-working days, Show non-working hours pattern
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2022,7,29,0,00,00).operator DATE()); var_Chart->PutLabel(EXG2ANTTLib::exHour,_bstr_t("<font ;6><%h%><|><font ;6><%hh%><|><%h%> <%AM/PM%><|><%d3%>, <%m3%> <%d%>, '<%yy%> <%h%> <%AM/PM%><|><%dddd%>, <%mmmm%> <%d%>, ") + "<%yyyy%> <%h%> <%AM/PM%><||><||>65536"); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutLevelCount(2); var_Chart->PutUnitWidth(12); var_Chart->PutNonworkingDaysColor(RGB(51,51,51)); var_Chart->PutNonworkingDaysPattern(EXG2ANTTLib::exPatternBDiagonal); var_Chart->PutNonworkingHoursColor(RGB(187,187,187)); var_Chart->PutNonworkingHoursPattern(EXG2ANTTLib::exPatternBDiagonal); var_Chart->PutAllowResizeChart(EXG2ANTTLib::ResizeChartEnum(EXG2ANTTLib::exAllowChangeUnitScale | EXG2ANTTLib::exAllowResizeChartMiddle | EXG2ANTTLib::exAllowResizeChartHeader)); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0); var_Level->PutLabel("<%dddd%>"); var_Level->PutAlignment(EXG2ANTTLib::CenterAlignment); var_Chart->GetLevel(1)->PutLabel(long(65536)); var_Chart->PutUnitScale(EXG2ANTTLib::exHour); var_Chart->PutNonworkingHours(16773375); var_Chart->PutShowNonworkingUnits(VARIANT_FALSE); var_Chart->PutShowNonworkingDates(VARIANT_FALSE); var_Chart->PutShowNonworkingHours(VARIANT_TRUE); spG2antt1->EndUpdate(); |
2217 |
Hide non-working days pattern, Show non-working hours pattern
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2022,7,29,0,00,00).operator DATE()); var_Chart->PutLabel(EXG2ANTTLib::exHour,_bstr_t("<font ;6><%h%><|><font ;6><%hh%><|><%h%> <%AM/PM%><|><%d3%>, <%m3%> <%d%>, '<%yy%> <%h%> <%AM/PM%><|><%dddd%>, <%mmmm%> <%d%>, ") + "<%yyyy%> <%h%> <%AM/PM%><||><||>65536"); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutLevelCount(2); var_Chart->PutUnitWidth(12); var_Chart->PutNonworkingDaysColor(RGB(51,51,51)); var_Chart->PutNonworkingDaysPattern(EXG2ANTTLib::exPatternBDiagonal); var_Chart->PutNonworkingHoursColor(RGB(187,187,187)); var_Chart->PutNonworkingHoursPattern(EXG2ANTTLib::exPatternBDiagonal); var_Chart->PutAllowResizeChart(EXG2ANTTLib::ResizeChartEnum(EXG2ANTTLib::exAllowChangeUnitScale | EXG2ANTTLib::exAllowResizeChartMiddle | EXG2ANTTLib::exAllowResizeChartHeader)); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0); var_Level->PutLabel("<%dddd%>"); var_Level->PutAlignment(EXG2ANTTLib::CenterAlignment); var_Chart->GetLevel(1)->PutLabel(long(65536)); var_Chart->PutUnitScale(EXG2ANTTLib::exHour); var_Chart->PutNonworkingHours(16773375); var_Chart->PutShowNonworkingUnits(VARIANT_TRUE); var_Chart->PutShowNonworkingDates(VARIANT_FALSE); var_Chart->PutShowNonworkingHours(VARIANT_TRUE); spG2antt1->EndUpdate(); |
2216 |
Hide non-working days pattern, Hide non-working hours pattern
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2022,7,29,0,00,00).operator DATE()); var_Chart->PutLabel(EXG2ANTTLib::exHour,_bstr_t("<font ;6><%h%><|><font ;6><%hh%><|><%h%> <%AM/PM%><|><%d3%>, <%m3%> <%d%>, '<%yy%> <%h%> <%AM/PM%><|><%dddd%>, <%mmmm%> <%d%>, ") + "<%yyyy%> <%h%> <%AM/PM%><||><||>65536"); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutLevelCount(2); var_Chart->PutUnitWidth(12); var_Chart->PutNonworkingDaysColor(RGB(51,51,51)); var_Chart->PutNonworkingDaysPattern(EXG2ANTTLib::exPatternBDiagonal); var_Chart->PutNonworkingHoursColor(RGB(187,187,187)); var_Chart->PutNonworkingHoursPattern(EXG2ANTTLib::exPatternBDiagonal); var_Chart->PutAllowResizeChart(EXG2ANTTLib::ResizeChartEnum(EXG2ANTTLib::exAllowChangeUnitScale | EXG2ANTTLib::exAllowResizeChartMiddle | EXG2ANTTLib::exAllowResizeChartHeader)); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0); var_Level->PutLabel("<%dddd%>"); var_Level->PutAlignment(EXG2ANTTLib::CenterAlignment); var_Chart->GetLevel(1)->PutLabel(long(65536)); var_Chart->PutUnitScale(EXG2ANTTLib::exHour); var_Chart->PutNonworkingHours(16773375); var_Chart->PutShowNonworkingUnits(VARIANT_TRUE); var_Chart->PutShowNonworkingDates(VARIANT_FALSE); var_Chart->PutShowNonworkingHours(VARIANT_FALSE); spG2antt1->EndUpdate(); |
2215 |
Show non-working days pattern, Hide non-working hours pattern
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2022,7,29,0,00,00).operator DATE()); var_Chart->PutLabel(EXG2ANTTLib::exHour,_bstr_t("<font ;6><%h%><|><font ;6><%hh%><|><%h%> <%AM/PM%><|><%d3%>, <%m3%> <%d%>, '<%yy%> <%h%> <%AM/PM%><|><%dddd%>, <%mmmm%> <%d%>, ") + "<%yyyy%> <%h%> <%AM/PM%><||><||>65536"); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutLevelCount(2); var_Chart->PutUnitWidth(12); var_Chart->PutNonworkingDaysColor(RGB(51,51,51)); var_Chart->PutNonworkingDaysPattern(EXG2ANTTLib::exPatternBDiagonal); var_Chart->PutNonworkingHoursColor(RGB(187,187,187)); var_Chart->PutNonworkingHoursPattern(EXG2ANTTLib::exPatternBDiagonal); var_Chart->PutAllowResizeChart(EXG2ANTTLib::ResizeChartEnum(EXG2ANTTLib::exAllowChangeUnitScale | EXG2ANTTLib::exAllowResizeChartMiddle | EXG2ANTTLib::exAllowResizeChartHeader)); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0); var_Level->PutLabel("<%dddd%>"); var_Level->PutAlignment(EXG2ANTTLib::CenterAlignment); var_Chart->GetLevel(1)->PutLabel(long(65536)); var_Chart->PutUnitScale(EXG2ANTTLib::exHour); var_Chart->PutNonworkingHours(16773375); var_Chart->PutShowNonworkingUnits(VARIANT_TRUE); var_Chart->PutShowNonworkingDates(VARIANT_TRUE); var_Chart->PutShowNonworkingHours(VARIANT_FALSE); spG2antt1->EndUpdate(); |
2214 |
Show non-working days pattern, Show non-working hours pattern
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutFirstVisibleDate(COleDateTime(2022,7,29,0,00,00).operator DATE()); var_Chart->PutLabel(EXG2ANTTLib::exHour,_bstr_t("<font ;6><%h%><|><font ;6><%hh%><|><%h%> <%AM/PM%><|><%d3%>, <%m3%> <%d%>, '<%yy%> <%h%> <%AM/PM%><|><%dddd%>, <%mmmm%> <%d%>, ") + "<%yyyy%> <%h%> <%AM/PM%><||><||>65536"); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutLevelCount(2); var_Chart->PutUnitWidth(12); var_Chart->PutNonworkingDaysColor(RGB(51,51,51)); var_Chart->PutNonworkingDaysPattern(EXG2ANTTLib::exPatternBDiagonal); var_Chart->PutNonworkingHoursColor(RGB(187,187,187)); var_Chart->PutNonworkingHoursPattern(EXG2ANTTLib::exPatternBDiagonal); var_Chart->PutAllowResizeChart(EXG2ANTTLib::ResizeChartEnum(EXG2ANTTLib::exAllowChangeUnitScale | EXG2ANTTLib::exAllowResizeChartMiddle | EXG2ANTTLib::exAllowResizeChartHeader)); EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0); var_Level->PutLabel("<%dddd%>"); var_Level->PutAlignment(EXG2ANTTLib::CenterAlignment); var_Chart->GetLevel(1)->PutLabel(long(65536)); var_Chart->PutUnitScale(EXG2ANTTLib::exHour); var_Chart->PutNonworkingHours(16773375); var_Chart->PutShowNonworkingUnits(VARIANT_TRUE); var_Chart->PutShowNonworkingDates(VARIANT_TRUE); var_Chart->PutShowNonworkingHours(VARIANT_TRUE); spG2antt1->EndUpdate(); |
2213 |
The chart display no labels (empty header) when the unit's width is too small. What can I do to change this behavior
|
2212 |
How do I get the height of the bar from the cursor
// MouseMove event - Occurs when the user moves the mouse. void OnMouseMoveG2antt1(short Button,short Shift,long X,long Y) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); _variant_t b = spG2antt1->GetChart()->GetBarFromPoint(-1,-1); long i = spG2antt1->GetItemFromPoint(-1,-1,c,hit); _variant_t n = spG2antt1->GetItems()->GetItemBar(i,b,EXG2ANTTLib::exBarName); OutputDebugStringW( L"Height" ); OutputDebugStringW( _bstr_t(spG2antt1->GetChart()->GetBars()->GetItem(n)->GetHeight()) ); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Tasks"); spG2antt1->PutDefaultItemHeight(52); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2017,10,10,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutNonworkingDays(0); var_Chart->PutMarkTodayColor(var_Chart->GetBackColor()); var_Chart->GetBars()->GetItem("Task")->PutPattern(EXG2ANTTLib::exPatternSolid); var_Chart->GetBars()->Copy(L"Task",L"T1")->PutColor(RGB(255,0,0)); var_Chart->GetBars()->Copy(L"Task",L"T2")->PutHeight(25); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Task"); var_Items->AddBar(h1,"T1",COleDateTime(2017,10,15,0,00,00).operator DATE(),COleDateTime(2017,10,25,0,00,00).operator DATE(),"2",vtMissing); var_Items->AddBar(h1,"T2",COleDateTime(2017,10,18,0,00,00).operator DATE(),COleDateTime(2017,10,22,0,00,00).operator DATE(),"1",vtMissing); h1 = var_Items->AddItem("Task"); var_Items->AddBar(h1,"T1",COleDateTime(2017,10,15,0,00,00).operator DATE(),COleDateTime(2017,10,25,0,00,00).operator DATE(),"1",vtMissing); var_Items->AddBar(h1,"T2",COleDateTime(2017,10,18,0,00,00).operator DATE(),COleDateTime(2017,10,22,0,00,00).operator DATE(),"2",vtMissing); spG2antt1->EndUpdate(); |
2211 |
The zone shows truncated if I use BackColorAlternate. Is there anything I can do so it shows as solid instead
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutBackColorAlternate(RGB(240,240,240)); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2010,1,1,0,00,00).operator DATE()); var_Chart->MarkTimeZone("Z1",COleDateTime(2010,1,4,0,00,00).operator DATE(),COleDateTime(2010,1,4,0,00,00).operator DATE(),long(16744544),"1:3;;solid-zone"); var_Chart->MarkTimeZone("Z2",COleDateTime(2010,1,8,0,00,00).operator DATE(),COleDateTime(2010,1,8,0,00,00).operator DATE(),long(16744544),"0:3;;truncated-zone"); spG2antt1->EndUpdate(); |
2210 |
How can I prevent expanding/collapsing the child items
// BeforeExpandItem event - Fired before an item is about to be expanded (collapsed). void OnBeforeExpandItemG2antt1(long Item,VARIANT FAR* Cancel) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); Cancel = spG2antt1->GetItems()->GetItemParent(Item); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutSingleSel(VARIANT_FALSE); spG2antt1->GetColumns()->Add(L"Default"); spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(var_Items->InsertItem(h,vtMissing,"Child 1.1"),vtMissing,"Child"); var_Items->InsertItem(h,vtMissing,"Child 1.2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(var_Items->InsertItem(h,vtMissing,"Child 2.1"),vtMissing,"Child"); var_Items->InsertItem(h,vtMissing,"Child 2.2"); var_Items->PutExpandItem(h,VARIANT_TRUE); spG2antt1->EndUpdate(); |
2209 |
How can I display the EBN bigger or smaller (thumb)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance(); var_Appearance->Add(1,"c:\\exontrol\\images\\normal.ebn"); var_Appearance->Add(10,"CP:1 0 3 0 -3"); var_Appearance->Add(17,"CP:1 3 0 -3 0"); spG2antt1->PutBackground(EXG2ANTTLib::exHSThumb,0xa000000); spG2antt1->PutBackground(EXG2ANTTLib::exVSThumb,0x11000000); spG2antt1->PutScrollBars(EXG2ANTTLib::ScrollBarsEnum(EXG2ANTTLib::exVScrollEmptySpace | EXG2ANTTLib::exHScrollEmptySpace | EXG2ANTTLib::exVScrollOnThumbRelease | EXG2ANTTLib::exHScrollOnThumbRelease | EXG2ANTTLib::exDisableBoth)); spG2antt1->PutScrollBySingleLine(VARIANT_TRUE); spG2antt1->GetColumns()->Add(L"Def"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddItem(long(1)); var_Items->AddItem(long(2)); var_Items->AddItem(long(3)); spG2antt1->EndUpdate(); |
2208 |
I am using GroupBy feature to create a tree, but the top rows are aligned with the children, not indented. What could be wrong
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. void OnAddGroupItemG2antt1(long Item) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); _bstr_t color = 14474460; EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutItemDivider(Item,-1); var_Items->PutCellValue(Item,long(1),var_Items->GetCellCaption(Item,var_Items->GetGroupItem(Item))); var_Items->AddBar(Item,"Progress",COleDateTime(2017,12,2,0,00,00).operator DATE(),COleDateTime(2017,12,2,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->DefineSummaryBars(Item,"",-3,""); var_Items->PutItemBold(Item,VARIANT_TRUE); var_Items->PutItemBackColor(Item,color); spG2antt1->GetChart()->PutItemBackColor(Item,color); } // AddItem event - Occurs after a new Item has been inserted to Items collection. void OnAddItemG2antt1(long Item) { EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(Item,"Task",COleDateTime(2017,12,4,0,00,00).operator DATE(),COleDateTime(2017,12,10,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->PutItemBar(Item,"",EXG2ANTTLib::exBarMove,var_Items->GetItemToIndex(Item)); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2017,12,2,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,128); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); var_Columns->Add(L"C1"); var_Columns->Add(L"C2"); spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot); spG2antt1->PutSortBarVisible(VARIANT_TRUE); spG2antt1->PutSortBarCaption(L"Drag a <b>column</b> header here to group by that column."); spG2antt1->PutAllowGroupBy(VARIANT_TRUE); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Item A"); var_Items->PutCellValue(h,long(1),"SubItem A.1"); h = var_Items->AddItem("Item A"); var_Items->PutCellValue(h,long(1),"SubItem A.1"); h = var_Items->AddItem("Item A"); var_Items->PutCellValue(h,long(1),"SubItem A.1"); h = var_Items->AddItem("Item A"); var_Items->PutCellValue(h,long(1),"SubItem A.1"); h = var_Items->AddItem("Item B"); var_Items->PutCellValue(h,long(1),"SubItem B.1"); h = var_Items->AddItem("Item B"); var_Items->PutCellValue(h,long(1),"SubItem B.1"); spG2antt1->GetColumns()->GetItem(long(0))->PutSortOrder(EXG2ANTTLib::SortAscending); spG2antt1->EndUpdate(); |
2207 |
How can I change the names from English to my locale (localization)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutAllowResizeChart(EXG2ANTTLib::ResizeChartEnum(EXG2ANTTLib::exAllowChangeUnitScale | EXG2ANTTLib::exAllowResizeChartMiddle | EXG2ANTTLib::exAllowResizeChartHeader)); var_Chart->PutMonthNames(var_Chart->GetLocMonthNames()); var_Chart->PutWeekDays(var_Chart->GetLocWeekDays()); var_Chart->PutAMPM(var_Chart->GetLocAMPM()); var_Chart->PutFirstWeekDay(var_Chart->GetLocFirstWeekDay()); var_Chart->PutLabel(EXG2ANTTLib::exMonth,L"<|><%loc_m1%><|><%loc_m2%><|><%loc_m3%><|><%loc_mmmm%><|><%loc_m3%> '<%yy%><|><%loc_mmmm%> <%yyyy%>"); var_Chart->PutLabel(EXG2ANTTLib::exWeek,L"<|>KW<%ww%><|><%d%>. <%loc_m3%>, '<%yy%><r>KW<%ww%><|><%d%>. <%loc_mmmm%>, <%yyyy%><r>KW<%ww%><||><||>256"); var_Chart->PutLabel(EXG2ANTTLib::exDay,_bstr_t("<|><%loc_d1%><|><%loc_d2%><|><%loc_d3%><|><%loc_dddd%><|><%loc_d3%>, <%d%>. <%loc_m3%>, '<%yy%><|><%loc_dddd%>, <%d%>. <%loc_mm") + "mm%>, <%yyyy%><||><||>4096"); var_Chart->PutLabel(EXG2ANTTLib::exHour,_bstr_t("<|><%hh%><|><%hh%><|><%loc_d3%>, <%d%>. <%loc_m3%>, '<%yy%> <%hh%><|><%loc_dddd%>, <%d%>. <%loc_mmmm%>, <%yyyy%> <%hh%><||><||>") + "65536"); var_Chart->PutLabel(EXG2ANTTLib::exMinute,_bstr_t("<|><%nn%><|><%hh%>:<%nn%><|><%loc_d3%>, <%d%>. <%loc_m3%>, '<%yy%> <%hh%>:<%nn%><|><%loc_dddd%>, <%d%>. <%loc_mmmm%>, <%yyyy%> ") + "<%hh%>:<%nn%>"); var_Chart->PutLabel(EXG2ANTTLib::exSecond,_bstr_t("<|><%ss%><|><%nn%>:<%ss%><|><%hh%>:<%nn%>:<%ss%><|><%loc_d3%>, <%d%>. <%loc_m3%>, '<%yy%> <%hh%>:<%nn%>:<%ss%><|><%loc_dddd%>, ") + "<%d%>. <%loc_mmmm%>, <%yyyy%> <%hh%>:<%nn%>:<%ss%>"); var_Chart->PutLabelToolTip(EXG2ANTTLib::exMonth,L"<%loc_mmmm%>/<%yyyy%>"); var_Chart->PutLabelToolTip(EXG2ANTTLib::exWeek,L"<%d%>. <%loc_mmmm%>, <%yyyy%> KW<%ww%>"); var_Chart->PutLabelToolTip(EXG2ANTTLib::exDay,L"<%loc_dddd%>, <%d%>. <%loc_mmmm%> , <%yyyy%>"); var_Chart->PutLabelToolTip(EXG2ANTTLib::exHour,L"<%loc_dddd%>, <%d%>. <%loc_mmmm%>, <%yyyy%> <%hh%>"); var_Chart->PutLabelToolTip(EXG2ANTTLib::exMinute,L"<%loc_dddd%>, <%d%>. <%loc_mmmm%>, <%yyyy%> <%hh%>:<%nn%>"); var_Chart->PutLabelToolTip(EXG2ANTTLib::exSecond,L"<%loc_dddd%>, <%d%>. <%loc_mmmm%> <%yyyy%> <%hh%>:<%nn%>:<%ss%>"); var_Chart->PutToolTip(L"<%ddd%> <%d%>. <%loc_mmmm%> <%yyyy%>"); var_Chart->PutPaneWidth(VARIANT_FALSE,0); var_Chart->PutLevelCount(2); var_Chart->PutUnitScale(EXG2ANTTLib::exDay); var_Chart->PutUnitWidth(24); spG2antt1->EndUpdate(); |
2206 |
Is it possible to change the pattern for selection within the control's overview part (I would prefer a semi-transparent or solid color instead)
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetVisualAppearance()->Add(2,_bstr_t("gBFLBCJwBAEHhEJAAEhABMsGACAADACAxRDgMQBQKAAzQFAYbhkGCGAAGMZxRgmFgAQhFcZQSKUOQTDKMIziYBYJAKCQ5DBJUBjTBcEwKGCQBwASQpUhqHYDTbIMByB") + "IUIxUACUJAgeCRYiAMo8RrSEZARBNGR3GqaJ7oGTpRoaP4iSBTUThBRsPyhHqOBpEWIRSqKEQ1DBYcI2RZUaxBJQAAbrWr5VpKKYnSzBA4TBQkSTpGicZxteoJeiefIE" + "VTHFwRNaFNS1Linb7ia5qCwmOJXUjcYAYfBOIR1SSBbIsawbNACbJnWjENYVdAdNTlAbPNAyPBqSDaMYRDCOND1BhuNATWSNLq2XZ5OzrGIaVjmWbbfwELZFUqydJ0ex" + "eiYNw/kGZBuDCHR/DeEYaCgGhMGcQ4pkiSxDgGXhIESW5MFgbQJBQZx+DScJEGsVZdnufggG+f5fnPFB/ooBZ/EaIAoBYBoBmASAeAqApfjgJgMgOYAoDoEIEl+WBKBS" + "BQhGgXgQgYYYoDIHIHGCKB+CCAYiCiDgREWYhoG4KIKGGaIuCyCBfhiRQJDqXxgAEASAg"); spG2antt1->PutSelBackMode(EXG2ANTTLib::exTransparent); spG2antt1->GetColumns()->Add(L"Tasks"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutOverviewVisible(EXG2ANTTLib::exOverviewShowAll); var_Chart->PutOverviewHeight(64); var_Chart->PutFirstVisibleDate(COleDateTime(2018,7,30,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); var_Chart->PutPaneWidth(VARIANT_FALSE,128); var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor()); var_Chart->PutSelBarColor(RGB(128,128,128)); var_Chart->PutOverviewSelBackColor(0x200ff00); var_Chart->PutOverviewSelTransparent(VARIANT_TRUE,50); spG2antt1->PutSelBackColor(spG2antt1->GetBackColor()); spG2antt1->PutSelForeColor(spG2antt1->GetForeColor()); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2018,8,3,0,00,00).operator DATE(),COleDateTime(2018,8,10,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2019,8,4,0,00,00).operator DATE(),COleDateTime(2019,8,12,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->PutSelectItem(var_Items->GetItemByIndex(1),VARIANT_TRUE); spG2antt1->EndUpdate(); |
2205 |
How can I display an item of picture type
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot); spG2antt1->PutScrollBySingleLine(VARIANT_FALSE); spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched); spG2antt1->PutHeaderHeight(24); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Artikel")))->PutHTMLCaption(L"<u>Artikel"); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Waarde")))->PutHTMLCaption(L"<u>Waarde"); spG2antt1->PutHTMLPicture(L"T22128","c:\\exontrol\\images\\zipdisk.gif"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("T22128-28)2D"); long h1 = var_Items->InsertItem(h,vtMissing,"<img>T22128:128</img>"); var_Items->PutCellValueFormat(h1,long(0),EXG2ANTTLib::exHTML); var_Items->PutItemHeight(h1,128); h1 = var_Items->InsertItem(h,vtMissing,"werkvoorbereiding"); var_Items->PutCellValue(h1,long(1),"5.80"); var_Items->PutCellBold(h1,long(1),VARIANT_TRUE); var_Items->PutCellValue(var_Items->InsertItem(h1,vtMissing,"Type"),long(1),"Eenvoudig"); var_Items->PutCellValue(var_Items->InsertItem(h1,vtMissing,"Prijs p/uur"),long(1),"60,00"); var_Items->PutCellValue(var_Items->InsertItem(h1,vtMissing,"Marhe"),long(1),"15,00%"); var_Items->PutCellValue(var_Items->InsertItem(h1,vtMissing,"Insteltijd min."),long(1),"5,00"); var_Items->PutCellValue(var_Items->InsertItem(h1,vtMissing,"Aantal"),long(1),long(1)); var_Items->PutCellValue(var_Items->InsertItem(h1,vtMissing,"Kostprije"),long(1),"5,00"); var_Items->PutExpandItem(h1,VARIANT_TRUE); h1 = var_Items->InsertItem(h,vtMissing,"materiall"); var_Items->PutCellValue(h1,long(1),"14.82"); var_Items->PutCellBold(h1,long(1),VARIANT_TRUE); var_Items->PutItemHasChildren(h1,VARIANT_TRUE); h1 = var_Items->InsertItem(h,vtMissing,"snijden"); var_Items->PutCellValue(h1,long(1),"3.13"); var_Items->PutCellBold(h1,long(1),VARIANT_TRUE); var_Items->PutItemHasChildren(h1,VARIANT_TRUE); var_Items->PutExpandItem(h,VARIANT_TRUE); spG2antt1->EndUpdate(); |
2204 |
How can I bold the root group-items
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. void OnAddGroupItemG2antt1(long Item) { /* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddBar(Item,"Progress",COleDateTime(2017,12,2,0,00,00).operator DATE(),COleDateTime(2017,12,2,0,00,00).operator DATE(),vtMissing,vtMissing); var_Items->DefineSummaryBars(Item,"",-3,""); var_Items->PutItemBold(Item,VARIANT_TRUE); } // AddItem event - Occurs after a new Item has been inserted to Items collection. void OnAddItemG2antt1(long Item) { EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetItems()->AddBar(Item,"Task",COleDateTime(2017,12,4,0,00,00).operator DATE(),COleDateTime(2017,12,10,0,00,00).operator DATE(),vtMissing,vtMissing); } EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutLevelCount(2); var_Chart->PutFirstVisibleDate(COleDateTime(2017,12,2,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,342); EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns(); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"C1"))); var_Column->PutGroupByFormatCell(L"'<caption> (' + value + ')'"); var_Columns->Add(L"C2"); var_Columns->Add(L"C3"); EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Pos"))); var_Column1->PutFormatColumn(L"1 pos ``"); var_Column1->PutAllowGroupBy(VARIANT_FALSE); var_Column1->PutPosition(0); var_Column1->PutWidth(48); var_Column1->PutAllowSizing(VARIANT_FALSE); spG2antt1->PutSortBarVisible(VARIANT_TRUE); spG2antt1->PutSortBarCaption(L"Drag a <b>column</b> header here to group by that column."); spG2antt1->PutAllowGroupBy(VARIANT_TRUE); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Item A"); var_Items->PutCellValue(h,long(1),"SubItem A.1"); var_Items->PutCellValue(h,long(2),"SubItem A.2"); h = var_Items->AddItem("Item A"); var_Items->PutCellValue(h,long(1),"SubItem A.1"); var_Items->PutCellValue(h,long(2),"SubItem A.2"); h = var_Items->AddItem("Item A"); var_Items->PutCellValue(h,long(1),"SubItem A.1"); var_Items->PutCellValue(h,long(2),"SubItem A.2"); h = var_Items->AddItem("Item A"); var_Items->PutCellValue(h,long(1),"SubItem A.1"); var_Items->PutCellValue(h,long(2),"SubItem A.2"); h = var_Items->AddItem("Item B"); var_Items->PutCellValue(h,long(1),"SubItem B.1"); var_Items->PutCellValue(h,long(2),"SubItem B.2"); h = var_Items->AddItem("Item B"); var_Items->PutCellValue(h,long(1),"SubItem B.1"); var_Items->PutCellValue(h,long(2),"SubItem B.2"); spG2antt1->GetColumns()->GetItem(long(0))->PutSortOrder(EXG2ANTTLib::SortAscending); spG2antt1->EndUpdate(); |
2203 |
The exBarTransparent does not work for overlaid-bars
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->PutBackColorAlternate(RGB(240,240,240)); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto); var_Chart->PutAllowLinkBars(VARIANT_FALSE); var_Chart->PutPaneWidth(VARIANT_FALSE,48); var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE()); var_Chart->PutLevelCount(2); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task"); var_Bar->PutOverlaidType(EXG2ANTTLib::OverlaidBarsTypeEnum(EXG2ANTTLib::exOverlaidBarsStackAutoArrange | EXG2ANTTLib::exOverlaidBarsStack)); var_Bar->PutPattern(EXG2ANTTLib::exPatternSolid); var_Bar->PutOverlaid(EXG2ANTTLib::exOverlaidBarsTransparent,long(0)); var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<%=%9%>"); var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18)); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Task 1"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A1",vtMissing); var_Items->AddBar(h,"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"A2",vtMissing); h = var_Items->AddItem("Task 2"); var_Items->AddBar(h,"Task",COleDateTime(2001,1,7,0,00,00).operator DATE(),COleDateTime(2001,1,11,0,00,00).operator DATE(),"B1",vtMissing); var_Items->AddBar(h,"Task",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"B2",vtMissing); var_Items->PutItemBar(0,"<*>",EXG2ANTTLib::exBarTransparent,long(75)); spG2antt1->EndUpdate(); |
2202 |
We’re adding tasks on the chart which have a caption that is not clipped (and left aligned). When we add another task right after the first one, then the caption from that first bar is “stuck” behind the second bar. The bar's z-order is determined by the bar's key.
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Tasks"); spG2antt1->PutDefaultItemHeight(24); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutNonworkingDays(0); var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,17,0,00,00).operator DATE()); var_Chart->PutPaneWidth(VARIANT_FALSE,96); var_Chart->PutLevelCount(2); EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->Add(L"Green"); var_Bar->PutColor(RGB(0,255,0)); var_Bar->PutDef(EXG2ANTTLib::exBarOffset,long(-2)); var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<%=%9%>"); var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18)); EXG2ANTTLib::IBarPtr var_Bar1 = var_Chart->GetBars()->Add(L"Red"); var_Bar1->PutColor(RGB(255,0,0)); var_Bar1->PutDef(EXG2ANTTLib::exBarOffset,long(2)); var_Bar1->PutDef(EXG2ANTTLib::exBarCaption,"<%=%9%>"); var_Bar1->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18)); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h1 = var_Items->AddItem("Red / Green"); var_Items->AddBar(h1,"Green",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,27,0,00,00).operator DATE(),"K1",vtMissing); var_Items->AddBar(h1,"Red",COleDateTime(2006,9,23,0,00,00).operator DATE(),COleDateTime(2006,9,25,0,00,00).operator DATE(),"K2",vtMissing); h1 = var_Items->AddItem("Green / Red"); var_Items->AddBar(h1,"Green",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,27,0,00,00).operator DATE(),"K2",vtMissing); var_Items->AddBar(h1,"Red",COleDateTime(2006,9,23,0,00,00).operator DATE(),COleDateTime(2006,9,25,0,00,00).operator DATE(),"K1",vtMissing); spG2antt1->EndUpdate(); |
2201 |
The caption/text of the link is overwritten by its line. What can be done
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->BeginUpdate(); spG2antt1->GetColumns()->Add(L"Task"); EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart(); var_Chart->PutPaneWidth(VARIANT_FALSE,64); var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,21,0,00,00).operator DATE()); var_Chart->PutResizeUnitScale(EXG2ANTTLib::exHour); var_Chart->PutUnitWidth(48); var_Chart->GetLevel(0)->PutLabel("<b><%mmm%></b> <%dd%>"); var_Chart->PutLinksWidth(3); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->AddBar(h,"Task",COleDateTime(2005,6,22,0,00,00).operator DATE(),COleDateTime(2005,6,23,0,00,00).operator DATE(),vtMissing,vtMissing); long h1 = var_Items->InsertItem(h,vtMissing,"Child"); var_Items->AddBar(h1,"Task",COleDateTime(2005,6,24,8,00,00).operator DATE(),COleDateTime(2005,6,24,16,00,00).operator DATE(),vtMissing,vtMissing); var_Items->AddLink("Link1",h,"",h1,""); var_Items->PutLink("Link1",EXG2ANTTLib::exLinkText,"<bgcolor=FFFFFF> link </bgcolor>"); var_Items->PutExpandItem(h,VARIANT_TRUE); spG2antt1->EndUpdate(); |