BCGControlBar Pro for MFC
CBCGPGanttItem

Detailed Description

The CBCGPGanttItem represents a single chart item (a single task). There are three types of items:

  • regular
  • grouping
  • milestone

The following code illustrates how to add 7 items:

Copy
COleDateTime t = COleDateTime::GetCurrentTime ();
t.SetDate (t.GetYear (), t.GetMonth (), t.GetDay ()); // reset time
for (int i = 0; i < 7; ++i)
{
pItem->SetInterval(t, t + COleDateTimeSpan(3, 0, 0, 0));
pItem->SetProgress(1.0 - i * 0.21);
CString sName;
sName.Format(_T("Task #%d"), i+1);
pItem->SetName (sName);
pChart->AddItem(pItem);
t += COleDateTimeSpan(1, 0, 0, 0);
}

Inherits CObject.

Public Member Functions

 EnableEnables or disables an item
 
 GetCompleteColorReturns a color that indicates the completeness of a task item.
 
 GetDataReturns user-defined data.
 
 GetFinishTimeReturns the finish time of a task item.
 
 GetHierarchyLevelReturns the item's hierarchy level.
 
 GetNameReturns an item name.
 
 GetPrimaryColorReturns a primary color of a task item.
 
 GetPriorityReturns a priority of an item.
 
 GetProgressReturns the current progress.
 
 GetStartTimeReturns the start time of a task item.
 
 IsCompletedTells whether an item is completed.
 
 IsEnabledTells whether an item is enabled or disabled.
 
 IsGroupItemIndicates whether an item is a group item, or not.
 
 IsMileStoneDetermines whether the task is a milestone.
 
 IsSelectedTells whether an item is selected, or not.
 
 IsVisibleTells whether an item is visible, or not.
 
 RedrawRedraws an item.
 
 SelectSets or removes an item selection.
 
 SetCompleteColorSpecifies the "complete" color of an item.
 
 SetCompletedSets the current progress to 1.0 (100 %).
 
 SetDataAssigns a user-defined data to an item.
 
 SetGroupItemSets an item to be a group item.
 
 SetHierarchyLevelSets the hierarchy level of grouped item
 
 SetIntervalDefines a time interval for a Gantt item.
 
 SetNameSets an item name.
 
 SetPrimaryColorSets the "primary" color of a task item.
 
 SetPrioritySets a user-defined priority value for an item.
 
 SetProgressSets a progress of a task item.
 
 ShowShows or hides an item.
 
 UpdateUpdates an item in the storage.