2009-12-02 44 views

答えて

2

あなたはMFCクラスを使用しない場合はここでAbout Tooltip Controls

CToolTipCtrlクラスを使用した例であることがわかり、

// Init a tooltip window  
m_ToolTipCtrl = new CToolTipCtrl; 
m_ToolTipCtrl->Create(this); // 'this', usually a CDialog window 

m_ToolTipCtrl->SetMaxTipWidth(300); // if you need multiline messages 
m_ToolTipCtrl->SetTipBkColor(0x000000); 
m_ToolTipCtrl->SetTipTextColor(0xe0e0d0); 

// Attach a CListBox control (we can attach many controls) 
m_ToolTipCtrl->AddTool(plstBox, "Hey, i am a tooltip message!"); 


// ... 
// (*) We must use the following in order to use tooltips (MFC 4.0 and later versions) 
BOOL MyDialog::PreTranslateMessage(MSG* pMsg) 
{ 
    if (NULL != m_ToolTipCtrl) 
     m_ToolTipCtrl->RelayEvent(pMsg); // <- listen mouse messages! 


    return CDialog::PreTranslateMessage(pMsg); 
} 
+0

私はMFCを使用していませんが、あなたは私の問題を返信してくれました。 –

関連する問題