这个问题很简单,你只要编一个MM_MOUSEMOVE,并判断鼠标是否进入botton区域,是的话就显示提示语句。

解决方案 »

  1.   

    CPoint point;
    CRect rec;
    GetCursorPos(point);//得到鼠标所在位置
    m_Button.GetClientRec(rec);//得到按钮区域
    if(rec.PosInRect(point)//判断point是否在按钮区域内{
    CStatic s;
    s.Create()//或messageBox();
    }
      

  2.   

    CToolTips类 这个类怎么用阿?
    不过谢谢你的帮助阿!
      

  3.   

    To create and manipulate a CToolTipCtrl Construct the CToolTipCtrl object.
    CallCreate to create the Windows tool tip common control and attach it to the CToolTipCtrl object.
    CallAddTool to register a tool with the tool tip control, so that the information stored in the tool tip is displayed when the cursor is on the tool.
    CallSetToolInfo to set the information that a tool tip maintains for a tool. 
    CallSetToolRect to set a new bounding rectangle for a tool. 
    CallHitTest to test a point to determine whether it is within the bounding rectangle of the given tool and, if so, retrieve information about the tool. 
    CallGetToolCount to retrieve a count of the tools registered with the tool tip control. 
      

  4.   

    wangao:
        你的方法还是不行呀!怎么搞得?
        还有用CToolTips类到底怎么实现?
      

  5.   

    kingtsui:
         到底怎么实现?
         请写出源代码。可以吗?
      

  6.   

    这个一个Tab control的ToolTip例子,差不多
    Example// Create and associate a tooltip control to the tab control of 
    // CMyPropertySheet.  CMyPropertySheet is a CPropertySheet-derived
    // class.
    BOOL CMyPropertySheet::OnInitDialog() 
    {
       BOOL bResult = CPropertySheet::OnInitDialog();
       
       // Create a tooltip control.  m_ToolTipCtrl is a member variable
       // of type CToolTipCtrl* in CMyPropertySheet class.  It is 
       // initialized to NULL in the constructor, and destroyed in the 
       // destructor of CMyPropertySheet class.
       m_ToolTipCtrl = new CToolTipCtrl;
       if (!m_ToolTipCtrl->Create(this))
       {
          TRACE("Unable To create ToolTip\n");           
          return bResult;
       }   // Associate the tooltip control to the tab control
       // of CMyPropertySheet.
       CTabCtrl* tab = GetTabControl();
       tab->SetToolTips(m_ToolTipCtrl);   // Get the bounding rectangle of each tab in the tab control of the
       // property sheet. Use this rectangle when registering a tool with 
       // the tool tip control.  IDS_FIRST_TOOLTIP is the first ID string 
       // resource that contains the text for the tool.
       int count = tab->GetItemCount();
       int id = IDS_FIRST_TOOLTIP;
       for (int i = 0; i < count; i++)
       {
          id += i;
          CRect r;
          tab->GetItemRect(i, &r);
          VERIFY(m_ToolTipCtrl->AddTool(tab, id, &r, id));
       }   // Activate the tooltip control.
       m_ToolTipCtrl->Activate(TRUE);   return bResult;
    }// Override PreTranslateMessage() so RelayEvent() can be 
    // called to pass a mouse message to CMyPropertySheet's 
    // tooltip control for processing.
    BOOL CMyPropertySheet::PreTranslateMessage(MSG* pMsg) 
    {
       if (NULL != m_ToolTipCtrl)            
          m_ToolTipCtrl->RelayEvent(pMsg);
       
       return CPropertySheet::PreTranslateMessage(pMsg);
    }
      

  7.   

    kingtsui(老农民):
         你能不能弄个简单一点的,大家都还是新手,好多看不懂!
         ok?拜托!
      

  8.   

    在BUTTON的父窗口中头文件中声明: CToolTipCtrl m_tip;
    在BUTTON的父窗口中实现文件中的窗口创建完成后位置(OninitXXXX)
    m_tip.Create(this);
    CWnd* pWnd = GetDlgItem(IDC_BUTTON1);
    m_tip.AddTool(pWnd, _T("提示"));重载BOOL CSH_GSView::PreTranslateMessage(MSG* pMsg) 
    {
    m_tip.Activate(TRUE);
    m_tip.RelayEvent(pMsg);
    .....
    ...
    }OK了。
      

  9.   

    http://www.csdn.net/expert/topic/411/411075.shtm
    代码有13000行的超cool表格程序,如何开发成activeX控件,有兴趣的人留下email,我把源程序发给你们
    分数为150分
    十万火级,如能给出答案,再送300分
    有兴趣的人留下email
    我把程序发给你们。 
    一个很cool的表格程序,请问如何改为activeX控件,有兴趣的我把源代码发给你们,感兴趣的人留下email,
    是vc写的非常cool   
      

  10.   

    在Create函数中:    m_pctrlToolTips = new  CToolTipCtrl; 
        m_pctrlToolTips->Create(this,1);
        EnableToolTips(TRUE);
        m_pctrlToolTips->Activate(TRUE);button 创建完后:   CString oString;
       CToolTipCtrl  *MyToolTip;
       MyToolTip = m_pctrlToolTips;
       oString.LoadString("MyButton");
       m_btnMyButton.SetToolTips(MyToolTip,oString); 记得在析构函数中Delete m_pctrlToolTips 
      

  11.   

    wangao88(呆子)的方法看上去没有错,至少这些API函数是没有错的,其他的不就很简单了吗?