-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMyEditView.cpp
More file actions
62 lines (41 loc) · 1018 Bytes
/
Copy pathCMyEditView.cpp
File metadata and controls
62 lines (41 loc) · 1018 Bytes
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
// CMyEditView.cpp : implementation file
//
#include "pch.h"
#include "soroMfcExSplit.h"
#include "CMyEditView.h"
// CMyEditView
IMPLEMENT_DYNCREATE(CMyEditView, CEditView)
CMyEditView::CMyEditView()
{
}
CMyEditView::~CMyEditView()
{
}
BEGIN_MESSAGE_MAP(CMyEditView, CEditView)
END_MESSAGE_MAP()
// CMyEditView diagnostics
#ifdef _DEBUG
void CMyEditView::AssertValid() const
{
CEditView::AssertValid();
}
#ifndef _WIN32_WCE
void CMyEditView::Dump(CDumpContext& dc) const
{
CEditView::Dump(dc);
}
#endif
#endif //_DEBUG
// CMyEditView message handlers
void CMyEditView::OnInitialUpdate()
{
CEditView::OnInitialUpdate();
// TODO: Add your specialized code here and/or call the base class
// Get the edit control and set some initial properties for it
CEdit& theEdit = GetEditCtrl();
// adjust the left margin without changing the right margin
DWORD dwMargins = theEdit.GetMargins();
theEdit.SetMargins(20, HIWORD(dwMargins));
// only accept 10k of text
theEdit.SetLimitText(10 * 1024);
}