在WTL中实现Spin control控件(使用SetBuddy)
来源:互联网 发布:做淘宝售后客服怎么样 编辑:程序博客网 时间:2024/04/28 02:10
ref : http://blog.csdn.net/kesalin/archive/2008/07/17/2668434.aspx
MFC中的Spin control控件对应WTL中的CUpDownCtrl控件,CUpDownCtrl控件通过SetBuddy()方法绑定需要上下选择控件的窗口,典型的就是Edit控件。下面来看代码:
WTL::CRichEditCtrl m_recCount;
WTL::CUpDownCtrl m_upcCount;
WTL::CRect m_rcCount;
// 初始化
m_rcCount = WTL::CRect(0, 0, width, 20);
//
void SetupEdit()
{
// Count rich edit
m_recCount.Create(
*this,
m_rcCount,
L"",
WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_NUMBER | ES_LEFT,
0);
m_upcCount.Create(
*this,
m_rcCount,
L"",
WS_CHILD | WS_VISIBLE | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_SETBUDDYINT,
0);
m_upcCount.SetBuddy(m_recCount);
m_upcCount.SetRange(1, m_maxCount);
m_upcCount.SetPos(1);
}
WTL::CUpDownCtrl m_upcCount;
WTL::CRect m_rcCount;
// 初始化
m_rcCount = WTL::CRect(0, 0, width, 20);
//
void SetupEdit()
{
// Count rich edit
m_recCount.Create(
*this,
m_rcCount,
L"",
WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_NUMBER | ES_LEFT,
0);
m_upcCount.Create(
*this,
m_rcCount,
L"",
WS_CHILD | WS_VISIBLE | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_SETBUDDYINT,
0);
m_upcCount.SetBuddy(m_recCount);
m_upcCount.SetRange(1, m_maxCount);
m_upcCount.SetPos(1);
}
- 在WTL中实现Spin control控件(使用SetBuddy)
- 在WTL中实现Spin control控件(使用SetBuddy)
- MFC中Spin Control控件使用,同时数据在Edit Control中显示
- MFC中Spin Control控件使用,同时数据在Edit Control中显示
- MFC中Spin Control控件使用,同时数据在Edit Control中显示
- MFC中Spin Control,Slider Control,Edit Control控件结合使用示例
- MFC中spin control控件的使用方法
- Spin Control (上下控件)
- Spin Control (上下控件)
- MFC中Spin control的使用
- MFC中Spin control的使用
- MFC中Spin control的使用
- MFC控件之spin control
- mfc 对话框 toolBox 中的控件 edit control和slider control 或 spin control 使用并绑定
- VC中Spin控件的使用
- VC中Spin控件的使用 [转]
- VC中Spin控件的使用
- VC中 spin控件的使用
- 手算Dynamic Programming
- Exception starting filter struts2 java.lang.NullPointerException个人感慨
- 你的软件被锁了吗?
- 十分钟让你读懂中国经济
- public,private,protected 区别
- 在WTL中实现Spin control控件(使用SetBuddy)
- oracle 数据库模式对象,索引,序列,同义词,查看用户拥有的表,聚簇,数据库链接
- IT项目风险管控,稳扎稳打
- Excel writing and reading with pure c API
- 营养百科之通便
- 编程-清洁工
- J2EE程序的性能优化技巧
- 分支限界法分配任务
- 加入威客!!