-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathITableDoc.h
34 lines (30 loc) · 1.14 KB
/
ITableDoc.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// ITableDoc.h: interface for the CITableDoc class.
#if !defined(AFX_ITABLEDOC_H__A3D358A2_7A7C_11D8_9FCD_D6268C95B908__INCLUDED_)
#define AFX_ITABLEDOC_H__A3D358A2_7A7C_11D8_9FCD_D6268C95B908__INCLUDED_
#include "icfgdoc.h"
class CITableDoc : public CCfgDocDerived<ITableDoc ,TableDoc>
{
public:
// Ïóñòûøêè ìàêðîñîâ, ÷òîáû VC++ óíóòðå ñåáÿ ñâÿçàë èíòåðôåéñ ñ êëàññîì ðåàëèçàöèè
BEGIN_COM_MAP(Empty)
COM_INTERFACE_ENTRY(ITableDoc)
END_COM_MAP()
CITableDoc(CDocument* pDoc);
virtual ~CITableDoc();
STDMETHOD(SaveToFile)(BSTR FileName,VARIANT_BOOL *bSucces);
STDMETHOD(LoadFromFile)(BSTR FileName,VARIANT_BOOL *bSuccess);
STDMETHOD(SaveToFileAs)(BSTR FileName,TableSaveTypes type,VARIANT_BOOL *bSucces);
CSheetDoc* GetDoc(){return (CSheetDoc*)m_doc.GetDocument();}
CSheetView* GetView(CSheetDoc* pDoc)
{
if(pDoc)
{
POSITION pos=pDoc->GetFirstViewPosition();
if(pos)
return (CSheetView*)pDoc->GetNextView(pos);
}
SetError(E_FAIL,"Äàííàÿ îïåðàöèÿ äîïóñòèìà òîëüêî ïðè îòêðûòîì äîêóìåíòå");
return NULL;
}
};
#endif // !defined(AFX_ITABLEDOC_H__A3D358A2_7A7C_11D8_9FCD_D6268C95B908__INCLUDED_)