myeditfull.cpp
来自「机械手IPC控制器伺服运动程序」· C++ 代码 · 共 62 行
CPP
62 行
// MyEditFull.cpp : implementation file
//
#include "stdafx.h"
#include "alfa.h"
#include "MyEditFull.h"
#include "KeyNumberFull.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMyEditFull
CMyEditFull::CMyEditFull()
{
m_clrBack=RGB(255, 255, 0); // yellow background
m_brush.CreateSolidBrush(m_clrBack);
}
CMyEditFull::~CMyEditFull()
{
}
BEGIN_MESSAGE_MAP(CMyEditFull, CEdit)
//{{AFX_MSG_MAP(CMyEditFull)
ON_WM_LBUTTONDOWN()
ON_WM_CTLCOLOR_REFLECT()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMyEditFull message handlers
void CMyEditFull::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CEdit::OnLButtonDown(nFlags, point);
DataChanged=2;
KeyNumberFull dlg;
CString str;
GetWindowText(str);
dlg.num=str;
dlg.edt=this;
dlg.DoModal();
}
HBRUSH CMyEditFull::CtlColor(CDC* pDC, UINT nCtlColor)
{
// TODO: Change any attributes of the DC here
pDC->SetBkColor(m_clrBack);
return (HBRUSH)m_brush.GetSafeHandle();
// TODO: Return a non-NULL brush if the parent's handler should not be called
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?