555555555555555555555,
竟然告诉我说pWnd是无效的。
我查了,哪个是有效的。
但是tTip没有正确获得,竟然得到的是0。 CToolTipCtrl *tTip = (CToolTipCtrl*)ctrlCBDeskBar.GetToolTips();
tTip->AddTool((CWnd*)&m_wndCBDeskBar, _T("KeyWOrd"), NULL, IDC_CBKEYWORD);
tTip->AddTool((CWnd*)&m_wndCBDeskBar, _T("Exec"), NULL, IDC_CBEXEC);
竟然告诉我说pWnd是无效的。
我查了,哪个是有效的。
但是tTip没有正确获得,竟然得到的是0。 CToolTipCtrl *tTip = (CToolTipCtrl*)ctrlCBDeskBar.GetToolTips();
tTip->AddTool((CWnd*)&m_wndCBDeskBar, _T("KeyWOrd"), NULL, IDC_CBKEYWORD);
tTip->AddTool((CWnd*)&m_wndCBDeskBar, _T("Exec"), NULL, IDC_CBEXEC);
解决方案 »
- 跨窗口的OLE拖放问题。。。
- 怎么在程序中还原MSSQL备份文件??(因为数据库正在使用,所以未能获得对数据库的排它访问权。)
- 用户DLL和系统DLL是怎么区分的?
- CArray的派生类(元素为对象)在序列化时,是不是各元素需要单独序列化?析构怎么处理?
- 关于sendmessage的
- 一个问题,不同的CPP出现相同的函数名要如何办?
- 菜鸟问题:如何在显示窗口时,使最大化按钮变灰?
- ADO的_ConnectionPtrm对象调用Execute()方法执行“update ...”语句后怎样判断执行是否成功呀
- SQLite中查询时如何使用left函数
- 如何检查程序运行中的内存泄漏?
- 一开始就错!!!!
- 如果把本进程设置成为系统进程?
但是还是出现那个错误。我自己写一个tooltipctrl倒是不出错了,就是现实不出来。 CToolTipCtrl tTipCBDeskBar;
tTipCBDeskBar.Create((CWnd *)&m_wndCBDeskBar);
tTipCBDeskBar.AddTool((CWnd*)&m_wndCBDeskBar, ID_CBKEYWORD, CRect(0, 0, 100, 30), IDC_CBKEYWORD);
CRect rc;
m_wndCBDeskBar.GetItemRect(8, &rc);
int nHeight = 30;
rc.bottom = rc.top + nHeight;
tTipCBDeskBar.AddTool((CWnd*)&m_wndCBDeskBar, ID_CBEXEC, rc, IDC_CBEXEC);
CToolTipCtrl* GetToolTips( ) const;Return ValueA pointer to the CToolTipCtrl object associated with this toolbar or NULL if the toolbar has no associated tool tip control.ResCall this function to retrieve the handle of the tool tip control, if any, associated with the toolbar control. Since the toolbar control normally creates and maintains its own tool tip control, most programs don’t need to call this function.