Files
envi-code/SourceCode/Code2026/tg_shs/shs_geLib/TSendCommandEdit.cpp
T
gjm 164968b62e chore
把非utf8-bom编码的cpp/h文件改为 utf8 bom 编码, msvc识别utf8编码时,如果不是bom格式的,会使用当前cp_oem来解码.
2026-10-04 00:04:20 +08:00

52 lines
1.2 KiB
C++

//-------------------------------------------------------------------------------------------------------+
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
// = FileName : TSendCommandEdit 类
// = Version : ver2.0
// = Author : wlw
// = CreateDate : 2002-09-09
// = Description: TSendCommandEdit 定义
// = Maintainers:
//
//-------------------------------------------------------------------------------------------------------+
#include "StdAfx.h"
#include "TSendCommandEdit.h"
TSendCommandEdit::~TSendCommandEdit()
{
}
void TSendCommandEdit::Create(const TCHAR *s)
{
if(GetSafeHwnd() != NULL)
{
DestroyWindow();
}
m_sCommand = s;
if(m_sCommand != _T(""))
{
if(CEdit::Create(0,CRect(0,0,100,100),AfxGetMainWnd(),0))
{
SetTimer(1,0,NULL);
}
}
}
BEGIN_MESSAGE_MAP(TSendCommandEdit,CEdit)
ON_WM_TIMER()
END_MESSAGE_MAP()
void TSendCommandEdit::OnTimer(UINT_PTR nIDEvent)
{
CEdit::OnTimer(nIDEvent);
DestroyWindow();
CString temp(_T("0"));
temp.SetAt(0,8);//退格键
acedPostCommand(temp + m_sCommand + CString(_T("\n")));
CWnd* pWnd = acedGetAcadDwgView();
if(pWnd != NULL)
{
pWnd->SetFocus();
}
}