⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 returnedit.cpp

📁 以前给一个印刷厂开发的业务管理软件
💻 CPP
字号:
// ReturnEdit.cpp : implementation file
//

#include "stdafx.h"
//#include "ewbillsys.h"
#include "ReturnEdit.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CReturnEdit

CReturnEdit::CReturnEdit()
{
	m_focus = 0;

}

CReturnEdit::~CReturnEdit()
{
}


BEGIN_MESSAGE_MAP(CReturnEdit, CEdit)
	//{{AFX_MSG_MAP(CReturnEdit)
	ON_WM_CHAR()
	ON_WM_KILLFOCUS()
	ON_WM_SETFOCUS()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CReturnEdit message handlers

void CReturnEdit::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) 
{
	// TODO: Add your message handler code here and/or call default

	if( nChar == VK_RETURN)
	{
		GetParent()->GetNextDlgTabItem(this)->SetFocus();
		return;
	}
	if( nChar < '0' || nChar > '9')
	{
		if(nChar != 45 && nChar != 46 && nChar != 8)// - 45 . 46 
			return;
	}
	
	CEdit::OnChar(nChar, nRepCnt, nFlags);
}

 void CReturnEdit::OnKillFocus(CWnd* pNewWnd) 
 {
 	CEdit::OnKillFocus(pNewWnd);
 	
 	m_focus = 0;
	RedrawWindow();
	// TODO: Add your message handler code here
 	
 }

 void CReturnEdit::OnSetFocus(CWnd* pOldWnd) 
 {
 	CEdit::OnSetFocus(pOldWnd);
 	
 	// TODO: Add your message handler code here
 	m_focus = 1;
//	UpdateWindow();
	RedrawWindow();

 }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -