2011年3月21日 星期一

CToolTipCtrl

CToolTipCtrl *m_pOSDToolTip;

OnCreate()
{
    if(!m_pOSDToolTip)
        {
            m_pOSDToolTip= new CToolTipCtrl();
            m_pOSDToolTip->Create(this);
            m_pOSDToolTip->AddTool(m_pFixRatio,_T("Fix Ratio")); // CBitmapButton * m_pFixRatio
            m_pOSDToolTip->AddTool(m_pSnapShot,_T("Snapshot"));
            m_pOSDToolTip->Activate(TRUE);
        }
}

PreTranslateMessage(MSG* pMsg)
{
  
    if(m_bDisplayOSD)
    m_pOSDToolTip->RelayEvent(pMsg);

    return CStatic::PreTranslateMessage(pMsg);
}

沒有留言:

張貼留言