listedit.cpp
来自「功能主要是串口通信和网络通信方面的」· C++ 代码 · 共 61 行
CPP
61 行
// ListEdit.cpp : implementation file
//
#include "stdafx.h"
//#include "TextInList.h"
#include "ListEdit.h"
//#include "GridList.h"
#include "ComboListCtrl.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CListEdit
CListEdit::CListEdit()
{
}
CListEdit::~CListEdit()
{
}
BEGIN_MESSAGE_MAP(CListEdit, CEdit)
//{{AFX_MSG_MAP(CListEdit)
ON_WM_KILLFOCUS()
ON_WM_CHAR()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CListEdit message handlers
void CListEdit::OnKillFocus(CWnd* pNewWnd)
{
// CGridList * temp = (CGridList *)GetParent();
CComboListCtrl * temp = (CComboListCtrl *)GetParent();
if(temp)
{
temp->DisposeEdit();
}
}
void CListEdit::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
{
// TODO: Add your message handler code here and/or call default
//CEdit::OnChar(nChar, nRepCnt, nFlags);
if (48 <= nChar && 57 >= nChar || nChar == 0x08)
{
CEdit::OnChar(nChar, nRepCnt, nFlags);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?