-
Notifications
You must be signed in to change notification settings - Fork 0
/
DescView.cpp
executable file
·85 lines (68 loc) · 1.82 KB
/
DescView.cpp
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
76
77
78
79
80
81
82
83
84
85
// DescView.cpp : implementation file
//
#include "stdafx.h"
#include "Ghost Xpress.h"
#include "DescView.h"
#include "Ghost XpressDoc.h"
#include "leftview.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDescView
IMPLEMENT_DYNCREATE(CDescView, CEditView)
CDescView::CDescView()
{
}
CDescView::~CDescView()
{
}
BEGIN_MESSAGE_MAP(CDescView, CEditView)
//{{AFX_MSG_MAP(CDescView)
ON_COMMAND(ID_VIEW_REFRESH, OnViewRefresh)
ON_COMMAND(ID_EDIT_FIND, OnEditFind)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDescView drawing
void CDescView::OnDraw(CDC* pDC)
{
CDocument* pDoc = GetDocument();
// TODO: add draw code here
}
/////////////////////////////////////////////////////////////////////////////
// CDescView diagnostics
#ifdef _DEBUG
void CDescView::AssertValid() const
{
CEditView::AssertValid();
}
void CDescView::Dump(CDumpContext& dc) const
{
CEditView::Dump(dc);
}
#endif //_DEBUG
CGhostXpressDoc* CDescView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CGhostXpressDoc)));
return(CGhostXpressDoc*)m_pDocument;
}
/////////////////////////////////////////////////////////////////////////////
// CDescView message handlers
void CDescView::OnInitialUpdate()
{
CEditView::OnInitialUpdate();
GetEditCtrl().SetReadOnly();
CGhostXpressDoc* pDoc = GetDocument();
pDoc->m_DescView = this;
}
void CDescView::OnViewRefresh()
{
GetDocument()->m_LeftView->SendMessage(WM_COMMAND,ID_VIEW_REFRESH);
}
void CDescView::OnEditFind()
{
GetDocument()->m_LeftView->SendMessage(WM_COMMAND,ID_EDIT_FIND);
}