Click to See Complete Forum and Search --> : Re: Cool Menus, tooltips


Ramon Saenz-Badillos
March 28th, 1999, 05:27 PM
To your first question, im not sure that Microsoft is using MFC to program

the Office programs (anybody knows for sure?) too much legacy code id imagine.

Adding tooltips to a dialog:

add a member variable to your dialog class for each control in your dialog

i.e if you have an OK button add a CButton m_cmdOKl; etc

add a CToolTipCTRl m_ToolTip; control

override the PreTranslateMessage() function with

m_toolTip.RealEvent(pMsg);

return CDialog::PreTranslateMessage(pMsg);

create the tooltip control when you initialize the dialog

m_Tooltip.Create(this) //you must check to see if this works

add the controls to the tooltip

m_ToolTip.AddTool(&m_cmdOK,IDS_TT_OK);


finally activate the tooltip

m_ToolTip.Activate(TRUE);


good luck