您好,欢迎光临本网站![请登录][注册会员]  
文件名称: CPPToolTip VC汽泡提示控件
  所属分类: C++
  开发工具:
  文件大小: 136kb
  下载次数: 0
  上传时间: 2009-06-19
  提 供 者: son***
 详细说明: CPPToolTip控件 链接:http://www.codeproject.com/KB/miscctrl/pptooltip.aspx 截图: 1 CPPToolTip控件介绍 Files Description PPTooltip.h PPTooltip.cpp CPPTooltip class PPHtmlDrawer.h PPHtmlDrawer.cpp CPPHtmlDrawer class. It's need to drawing HTML string in tooltip body PPDrawManager.h PPDrawManager.cpp CPPDrawManager class is a set of methods to work with graphics. CeXDib.h CeXDib.cpp CCeXDib class thanks to Davide Pizzolato and Davide Calabro. This class use for extend background's effect. Extend background effects by Davide Pizzolato and Davide Calabro become available if defined USE_SHADE: in PPDrawManager.h #define USE_SHADE 2 在普通窗体控件中使用 2.1 创建CPPToolTip对象 CPPToolTip m_tooltip; 2.2 在窗口初始化函数OnInitDialog中: // Create the CPPToolTip object m_tooltip.Create(this); 2.3 添加提示控件 m_tooltip.AddTool(GetDlgItem(IDC_BUTTON1), _T("Tooltip to the control IDC_BUTTON1")); 或者: m_tooltip.AddTool(this, _T("Tooltip for rectangle area"),CRect (100, 100, 200, 200)); 2.4 拦截处理鼠标消息 BOOL ... ::PreTranslateMessage(MSG* pMsg) { m_tooltip.RelayEvent(pMsg); } 3 在工具栏中使用 3.1 在CMainFrame中定义CPPToolTip对象 CPPToolTip m_tooltip; 3.2 在CMainFrame的OnCreate函数中创建CPPToolTip对象,添加工具栏提示 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { ... m_tooltip.Create(this); //Adds tooltip for toolbar m_tooltip.AddToolBar(&m_wndToolBar); return 0; } 3.3 截取和处理鼠标消息 BOOL CMainFrame::PreTranslateMessage(MSG* pMsg) { m_tooltip.RelayEvent(pMsg); } 4 在菜单中使用 4.1 在CMainFrame中定义CPPToolTip变量 CPPToolTip m_tooltip; 4.2 在CMainFrame的OnCreate()函数中创建CPPToolTip对象 m_tooltip.Create(this); 4.3 Uncomments a line to enable a work with menus. in PPTooltip.h #define PPTOOLTIP_USE_MENU 4.4 为CMainFrame添加两个事件处理对象 //选中菜单事件 void CMainFrame::OnMenuSelect(UINT nItemID, UINT nFlags, HMENU hSubMenu) { m_tooltip.OnMenuSelect(nItemID, nFlags, hSubMenu); CFrameWnd::OnMenuSelect(nItemID, nFlags, hSubMenu); } //闲置状态事件 void CMainFrame::OnEnterIdle(UINT nWhy, CWnd* pWho) { m_tooltip.OnEnterIdle(nWhy, pWho); } 4.5 截取和处理鼠标消息 BOOL CMainFrame::PreTranslateMessage(MSG* pMsg) { m_tooltip.RelayEvent(pMsg); } ...展开收缩
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 输入关键字,在本站1000多万海量源码库中尽情搜索: