示例#1
0
int CApplication::SaveNote(CNoteWnd* pWnd, UINT nMask)
{
	CNote note;
	note.SetId(pWnd->GetId());
	note.SetText(pWnd->GetText());
	note.SetPos(pWnd->GetRealNoteRect() /*CWindowRect(pWnd->m_hWnd)*/);
	note.SetCreatedDate(pWnd->GetCreatedDate());
	if (nMask & NM_MODIFIED)
	{
		note.SetModifiedDate(dateutils::GetCurrentDateTime());
	}
	note.SetDeletedDate(pWnd->GetDeletedDate());
	note.SetLabel(pWnd->GetLabel().c_str());
	return m_datafile->SaveNote(note, nMask);
}