初步修复
This commit is contained in:
parent
8fc4357cc6
commit
e4714f3f0e
46705 changed files with 12004901 additions and 0 deletions
43
Client/NetTest/SingleLineEdit.cpp
Normal file
43
Client/NetTest/SingleLineEdit.cpp
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
// SingleLineEdit.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "NetTest.h"
|
||||
#include "SingleLineEdit.h"
|
||||
|
||||
|
||||
// CSingleLineEdit
|
||||
|
||||
IMPLEMENT_DYNAMIC(CSingleLineEdit, CEdit)
|
||||
|
||||
CSingleLineEdit::CSingleLineEdit()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CSingleLineEdit::~CSingleLineEdit()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CSingleLineEdit, CEdit)
|
||||
ON_WM_KEYDOWN()
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
|
||||
// CSingleLineEdit message handlers
|
||||
|
||||
void CSingleLineEdit::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
|
||||
{
|
||||
if( nChar == VK_RETURN )
|
||||
{
|
||||
CString szText;
|
||||
GetWindowText( szText );
|
||||
szText += _T( "\r\n" );
|
||||
SetWindowText( _T( "" ) );
|
||||
GetParent()->SendMessage( EN_EDIT_CHANGE, ( LPARAM )szText.GetBuffer() );
|
||||
}
|
||||
|
||||
CEdit::OnKeyDown(nChar, nRepCnt, nFlags);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue