📄 message.cpp
字号:
// Message.cpp : implementation file
//
#include "stdafx.h"
#include "测试程序.h"
#include "Message.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMessage dialog
CMessage::CMessage(CWnd* pParent /*=NULL*/)
: CDialog(CMessage::IDD, pParent)
{
//{{AFX_DATA_INIT(CMessage)
m_Length = _T("0字节");
m_Message = _T("");
WindowCaption = "短消息";
//}}AFX_DATA_INIT
}
void CMessage::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CMessage)
DDX_Text(pDX, IDC_LENGTH, m_Length);
DDX_Text(pDX, IDC_MESSAGE, m_Message);
DDV_MaxChars(pDX, m_Message, 100);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CMessage, CDialog)
//{{AFX_MSG_MAP(CMessage)
ON_EN_CHANGE(IDC_MESSAGE, OnChangeMessage)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMessage message handlers
void CMessage::OnChangeMessage()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
UpdateData(TRUE);
m_Length.Format("%d字节",m_Message.GetLength());
UpdateData(FALSE);
}
BOOL CMessage::OnInitDialog()
{
CDialog::OnInitDialog();
SetWindowText(WindowCaption);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -