在WTL中实现Spin control控件(使用SetBuddy)
来源:互联网 发布:淘宝新店如何刷信誉 编辑:程序博客网 时间:2024/04/27 21:48
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控件的使用
- gdb调试程序
- IE7下favicon.ico图标不能显示的问题
- C#预处理指令
- 一个端口可以有多少个TCP的连接?
- 有关“字节序”的描述
- 在WTL中实现Spin control控件(使用SetBuddy)
- wxPython使用系统顔色
- Spring AOP 和 IOC 容器入门
- 约定
- JS事件列表
- postgresql编码问题
- 期待.....
- input type="submit' 加上onclick的好用处
- Problem 17 - How many letters would be needed to write all the numbers in words from 1 to 1000?