-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathActivDoc.h
More file actions
75 lines (56 loc) · 1.87 KB
/
ActivDoc.h
File metadata and controls
75 lines (56 loc) · 1.87 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#pragma once
// ActivDoc.h : Declaration of the CActiveXDocTemplate CActiveXDocControl class.
//
class CMainDialog;
class CActiveXDocTemplate : public CSingleDocTemplate
{
enum { IDR_NOTUSED = 0x7FFF };
CWnd* m_pParentWnd;
CFrameWnd* m_pFrameWnd;
CString m_docFile;
CView* m_pView;
CMainDialog* m_pMainDlg;
public:
CActiveXDocTemplate(CRuntimeClass* pDocClass,
CRuntimeClass* pFrameClass, CRuntimeClass* pViewClass);
CFrameWnd* CreateDocViewFrame(CWnd* pParentWnd);
void SaveDocumentFile();
virtual CFrameWnd* CreateNewFrame(CDocument* pDoc,
CFrameWnd* pOther);
virtual CDocument* OpenDocumentFile(
LPCTSTR lpszPathName, BOOL bVerifyExists = TRUE);
CMainDialog* GetMainDlg(){return m_pMainDlg;}
};
/////////////////////////////////////////////////////////////////////////////
class CActiveXDocControl : public COleControl
{
// enum { WM_IDLEUPDATECMDUI = 0x0363 };
static BOOL m_bDocInitialized;
CActiveXDocTemplate* m_pDocTemplate;
CFrameWnd* m_pFrameWnd;
DECLARE_DYNAMIC(CActiveXDocControl)
protected:
void AddDocTemplate(CActiveXDocTemplate* pDocTemplate);
CDocTemplate* GetDocTemplate() { return m_pDocTemplate; }
//{{AFX_MSG(CActiveXDocControl)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnDestroy();
//}}AFX_MSG
//{{AFX_DISPATCH(CActiveXDocControl)
//}}AFX_DISPATCH
//{{AFX_EVENT(CActiveXDocControl)
//}}AFX_EVENT
DECLARE_MESSAGE_MAP()
DECLARE_DISPATCH_MAP()
DECLARE_EVENT_MAP()
public:
CFrameWnd* GetFrameWnd();
CActiveXDocControl();
virtual ~CActiveXDocControl();
enum {
//{{AFX_DISP_ID(CActiveXDocControl)
//}}AFX_DISP_ID
};
};