例如静态文本、按钮控件等,如何实现
如果不行,有什么方法可以实现该功能呢
Ths

解决方案 »

  1.   

    当然可以的
    AddToolTip()
    Active()
    Relay
      

  2.   

    可以的,就像楼上说的
    AddToolTip的时候设置对了就行
    TOOLINFO
    .uFlag = TTF_IDISHWND
    .uid = (INT_PTR)GetDlgItem(...)->m_hWnd
      

  3.   

    给对话框添加一个CToolTipCtrl类型的变量tip,然后在做下面修改:
    BOOL CAboutDlg::OnInitDialog() 
    {
    CDialog::OnInitDialog();
      tip.Create(this);
    tip.AddTool(GetDlgItem(IDC_xxx),"tip_text"); //IDC_xxx是你想加tip的控件ID
    tip.AddTool(GetDlgItem(IDC_yyy),"tip_text");
    return TRUE;   
    }BOOL CAboutDlg::PreTranslateMessage(MSG* pMsg) 
    {
    // TODO: Add your specialized code here and/or call the base class
    tip.RelayEvent(pMsg);
    return CDialog::PreTranslateMessage(pMsg);
    }
    如果要给静态文本加tip,要在编辑的时候选中static控件的notify属性,并修改它的默认ID。
      

  4.   

    定义一个全局变量 CToolTipCtrl m_tooltip;
    在程序初始化中加入:
    m_tooltip.Create(this);
    m_tooltip.AddTool((CButton *)GetDlgItem(IDC_BUTTON2),"this is a tooltip");响应BOOL CYourDlg::PreTranslateMessage(MSG* pMsg) 
    {
    // TODO: Add your specialized code here and/or call the base class

    switch(pMsg->message)
    {
    case WM_MOUSEMOVE:
    m_tooltip.RelayEvent(pMsg); }
    return CDialog::PreTranslateMessage(pMsg);
    }
    这样就可以了
      

  5.   

    终于可以了,不过给静态文本选中notify属性之后好像就不能够当按钮用了