Files
envi-code/SourceCode/Code2026/tg_shs/shs_geLib/TSendCommandEdit.cpp
T
2026-09-28 15:28:50 +08:00

52 lines
1.1 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();
}
}