本文整理汇总了C++中Task::GetTitle方法的典型用法代码示例。如果您正苦于以下问题:C++ Task::GetTitle方法的具体用法?C++ Task::GetTitle怎么用?C++ Task::GetTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Task
的用法示例。
在下文中一共展示了Task::GetTitle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RealizeTask
void RecurrenceManager::RealizeTask(MSXML2::IXMLDOMNode *pNode, unsigned __int64 templateId, unsigned __int64 parentId, unsigned __int64 start, int duration)
{
if(!FindTaskInstance(templateId, start))
{
TaskManager *pTaskManager = m_pDataManager->GetTaskManagerInstance();
BSTR title = 0;
HRESULT hr = XMLHelper::GetChildText(pNode, CTaskModel::TITLE, &title);
if(hr == S_OK && title)
{
BSTR desc = 0;
hr = XMLHelper::GetChildText(pNode, CTaskModel::DESCRIPTION, &desc);
//TODO: set task templateId
Task *pTask = pTaskManager->createTask(desc, title, 3, false, start, 0, parentId);
StringBuffer conv(32);
pTask->SetCustomAttribute(_T("recurrenceid"), ModelUtils::toHexString(templateId, conv));
TimeEntryManager *pTimeEntryManager = m_pDataManager->GetDayManagerInstance()->GetSpeculativeEntryManager();
pTimeEntryManager->CreateTimeEntry(pTask->GetID(), start, start + (duration * ModelUtils::UNITS_PER_MINUTE), pTask->GetTitle());
if(hr == S_OK && desc)SysFreeString(desc);
SysFreeString(title);
}
}
}
示例2: OnInitDialog
void CEditTaskDlg::OnInitDialog()
{
using namespace loadngo::data;
SetWindowText(m_hwnd, _T("Edit Task"));
/**
The combo drop down should be tree-d
mapping here translates the dialog locations to window coordinates
*/
RECT r = { 43, 24, 43+195, 24+12 };
MapDialogRect(m_hwnd, &r);
m_pTaskCombo->Create(m_hwnd, r, WS_VISIBLE | WS_CHILD, WS_EX_CLIENTEDGE);
if(m_pTask)
{
Task *pParentTask = m_pTask->GetParentTask();
if(pParentTask)
m_pTaskCombo->SetText(loadngo::gui::NativeString(pParentTask->GetTitle()));
//m_pTaskCombo->Invalidate();
}
HWND hwndTemp = GetDlgItem(m_hwnd, IDC_CREATE_TASK_COMBO_PRIORITY);
TCHAR buffer[256] = {};
for(int i = 0; i < 5; ++i)
{
_stprintf_s(buffer, _T("%d"), i + 1);
::SendMessage(hwndTemp, CB_ADDSTRING, 0, reinterpret_cast<LPARAM>(buffer));
}
::SendMessage(hwndTemp, CB_SETCURSEL, m_pTask->GetPriority() - 1, 0);
hwndTemp = GetDlgItem(m_hwnd, IDC_STATIC_STATE);
ShowWindow(hwndTemp, SW_SHOW);
hwndTemp = GetDlgItem(m_hwnd, IDC_COMBO_TASK_STATE);
//TODO: get these literals out of the code and into the resource dll.
::SendMessage(hwndTemp, CB_ADDSTRING, 0, reinterpret_cast<LPARAM>(_T("Open")));
::SendMessage(hwndTemp, CB_ADDSTRING, 0, reinterpret_cast<LPARAM>(_T("Complete")));
::SendMessage(hwndTemp, CB_ADDSTRING, 0, reinterpret_cast<LPARAM>(_T("Closed")));
Task::State state = m_pTask->GetState();
int convState = static_cast<int>(state) - 1;
SendMessage(hwndTemp, CB_SETCURSEL, convState, 0);
ShowWindow(hwndTemp, SW_SHOW);
hwndTemp = GetDlgItem(m_hwnd, IDC_CREATE_TASK_EDIT_TITLE);
SetWindowText(hwndTemp, loadngo::gui::NativeString(m_pTask->GetTitle()));
hwndTemp = GetDlgItem(m_hwnd, IDC_CREATE_TASK_EDIT_DESCRIPTION);
SetWindowText(hwndTemp, loadngo::gui::NativeString(m_pTask->GetDescription()));
SYSTEMTIME date;
FILETIME ft;
hwndTemp = GetDlgItem(m_hwnd, IDC_CREATE_TASK_DATETIMEPICKER_START);
unsigned __int64 dateValue = m_pTask->GetScheduledStart();
if(dateValue)
{
//dateValue = ModelUtils::UTCToLocalTime(dateValue);
ft.dwHighDateTime = static_cast<unsigned long>(dateValue >> 32);
ft.dwLowDateTime = static_cast<unsigned long>(dateValue);
FileTimeToSystemTime(&ft, &date);
::SendMessage(hwndTemp, DTM_SETSYSTEMTIME, GDT_VALID, reinterpret_cast<LPARAM>(&date));
}
else
{