xiexie
解决方案 »
- CSDN 穷疯了, 到处是广告,一个技术论坛,广告怎么做学习 codeproject
- 下面代码有逻辑上的问题吗?怎么检验 explorer.exe的socket是否被勾住
- 数组int s[] = {1, 2, 3, 4},怎样删除第二个元素?
- 窗口切换问题????
- 求大家帮我写个函数(关于字符串拆分的)
- 控件"EDIT"中的数据是怎样组织的?
- re:聘资深辅导老师----南京的
- 怎么办啊?
- 为什么c++超过java?
- visual c++管理信息系统完整项目实例剖析程序中为什么订货、销售、退货管理里面的登记不行呢?
- Win2000的安全模式下用户添加的服务能否启动?
- 新手之VC第一个问题(关于添加变量到视图类的问题)
BOOL CMyDlg::OnInitDialog()
{
CDialog::OnInitDialog();
m_ToolTipCtrl = new CToolTipCtrl;
m_ToolTipCtrl->Create(this);
m_Slider.SetToolTips(m_ToolTipCtrl);
CWnd* pWnd = (CWnd*)GetDlgItem(IDC_SLIDER1);
m_ToolTipCtrl->AddTool(pWnd,"SlideCtrl");
m_ToolTipCtrl->SetTipBkColor(RGB(100,100,100));//设置tooltip的背景色
m_ToolTipCtrl->SetTipTextColor(RGB(0,255,255));//设置tip文本的颜色
m_ToolTipCtrl->Activate(TRUE);
}然后再重载虚函数PreTranslateMessage:
BOOL CMyDlg::PreTranslateMessage(MSG* pMsg)
{
if (NULL != m_ToolTipCtrl)
m_ToolTipCtrl->RelayEvent(pMsg); return CDialog::PreTranslateMessage(pMsg);
}
By Harold Bamford
http://www.codeproject.com/useritems/csliderctrlex.asp?target=slider
By Ashok Jaiswal
http://www.codeproject.com/miscctrl/skinnedslidercontrol.asp?target=slider