// /// Sets the value of the property, given index, the index value of the property, /// and src, the data type (either binary or text) to which the property must be /// set. // bool TDocument::SetProperty(int prop, const void * src) { switch (prop) { case DocTitle: SetTitle((LPCTSTR)src); break; case StoragePath: return SetDocPath((LPCTSTR)src); default: TRACEX(OwlDocView, 0, _T("SetProperty(): invalid prop [") << prop <<\ _T("] specified!")); return false; } return true; }
BOOL TDrawDocument::Open(int /*mode*/, const char far* path) { // if(ecg) // delete ecg; ecg = new Tecg(); if (path) SetDocPath(path); if (GetDocPath()) { TInStream* is = InStream(ofRead); if (!is) return FALSE; *is >> *ecg; delete is; } SetDirty(FALSE); return TRUE; }