예제 #1
0
LRESULT CToDoCtrlReminders::SendParentReminder(const TDCREMINDER& rem)
{
	if (m_bUseStickies && InitStickiesAPI(m_sStickiesPath))
	{
		CString sContent(rem.GetTaskTitle()), 
				sWhen(rem.FormatWhenString()), 
				sComments(rem.GetTaskComments()), 
				sDummy;

		if (!sComments.IsEmpty())
		{
			sContent += _T("\n\n");
			sContent += sComments;
		}

		if (!sWhen.IsEmpty())
		{
			sContent += _T("\n\n");
			sContent += sWhen;
		}
		
		if (CreateSticky(CEnString(IDS_STICKIES_TITLE), sDummy, sContent))
		{
			return 1L; // delete reminder as Stickies takes over
		}
	}
		
	// all else (fallback)
	ASSERT (m_pWndNotify);
	return m_pWndNotify->SendMessage(WM_TD_REMINDER, 0, (LPARAM)&rem);
}
예제 #2
0
int CTDLShowReminderDlg::DoModal(const TDCREMINDER& rem)
{
	m_sWhen = rem.FormatWhenString();
	m_sTaskTitle = rem.GetTaskTitle();
	m_sSoundFile = rem.sSoundFile;

	return CDialog::DoModal();
}