Advanced C++ Listcontrol
In this article, I describe an owner draw CConfigListCtrl that derives from CListCtrl. This control does not have another CWnd-derived control inserted in a particular cell. Instead, all user input messages are always handled by CConfigListCtrl. When want to insert another 'control' in a cell, you insert a CCellCtrl-derived control. When draw a particular cell, a call is made to CCellCtrl::DrawCtrl from the parent. All message handling is passed from CConfigListCtrl to the CCellCtrl-derived controls and CConfigListCtrl has no knowledge of the implementation details of the CCellCtrl-derived controls. The drawback with this approach is the CCellCtrl-derived controls need to stick to the look and behaviour of controls from later versions of MFC. The frames are painted differently for instance, but this is not a big issue as can easily be done without much effort.
- 1
- 粉丝: 0
- 资源: 12
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助