我是用的是vs2005环境,在界面上设计一个按钮,按钮visible属性是false,即是运行程序时是不可见的,当鼠标移动到不可见的按钮上时,就会出现提示信息,请问该如何填写代码呢?我写了一个代码,但是只有当visible属性是true即可见时才行,哪里错了呢?
1、OnInitDialog()中填写
    pSub[0] = GetDlgItem(IDOK);
pSub[1] = GetDlgItem(IDCANCEL); m_tip[0].Create(pSub[0],TTS_ALWAYSTIP);
m_tip[0].AddTool(pSub[0]);
m_tip[0].SetTipTextColor(RGB(0,0,255));
        m_tip[0].SetDelayTime(150);
2、void CMy1Dlg::OnMouseMove(UINT nFlags, CPoint point) 
{
// TODO: Add your message handler code here and/or call default
m_tip[0].UpdateTipText("你好!",pSub[0]);
m_tip[1].UpdateTipText("www",pSub[1]);
CDialog::OnMouseMove(nFlags, point);
}
3、
BOOL CMy1Dlg::PreTranslateMessage(MSG* pMsg) 
{
if(m_tip[0].m_hWnd!=NULL)
                  m_tip[0].RelayEvent(pMsg);
if(m_tip[1].m_hWnd!=NULL)
                  m_tip[1].RelayEvent(pMsg);
return CDialog::PreTranslateMessage(pMsg);
}
谢谢大家了!