CRect oRect;
this->GetClientRect(oRect);
int nWidth=oRect.Width();
int nHeigth=oRect.Height();
m_cRTemp1.SetRect(0,nHeigth*3/4,nWidth/2,nHeigth);
m_cRTemp2.SetRect(nWidth/2,nHeigth*3/4,nWidth,nHeigth);
if (m_edit1)
{
delete m_edit1;
}
if (m_edit2)
{
delete m_edit2;
}
CEdit m_edit1,m_edit2;
m_edit1=new CEdit();
m_edit2=new CEdit();
m_edit1->Create(WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON | 1, m_cRTemp1, this, IDS_STRINGCURVE1 );
m_edit2->Create(WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON | 1, m_cRTemp2, this, IDS_STRINGCURVE2 );
//设为只读文本框
m_edit1->SetReadOnly();
m_edit2->SetReadOnly();
【C++】创建动态的文本编辑框
最新推荐文章于 2020-03-17 14:40:44 发布