【C++】创建动态的文本编辑框
2016-02-25 10:19
281 查看
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++vector用法详解
- 【C++】map容器的使用方法
- 【C++】c++写Excel文件
- C++矩阵库 Eigen 快速入门
- 【C++】C++中常用的数据类型转换
- 解决 unresolved external symbol 无法解析 _send@16
- Eclipse开发C/C++之使用技巧小结,写给新手
- 30分钟了解C++11新特性
- C++ 中使用json
- C++ STL
- C语言(数组的地址)
- C++入门教程(结合小游戏实战)
- 1042. Shuffling Machine (20)
- C/C++刁钻问题各个击破之细说sizeof
- Java练笔:一个类作为另一个类的参数调用。顺带训练数据在栈和堆的走向。思考若用C++写,delete应该怎么写
- c++基础回顾
- C++笔试题 String类的实现 三大复制控制函数
- C语言中的那些库函数(持续更新中)
- C++模板实现printf
- C++学习笔记48——继承中的构造函数