• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 214
  • Last Modified:

How to Show ToolTips

I have devloped an MDI application using
AppWizard. I am using CfromView class
Now i want to display the Yellow color Tooltip whenever the user moves the mouse over some certain button. How to do that.
0
kakamna
Asked:
kakamna
1 Solution
 
Vinayak KumbarSr Program ManagerCommented:
Hi,

say ur view is CMyView. then open MyView.h and add
CToolTipCtrl m_tool;

Then in the OnInitialUpdate
BOOL CMyDlg::OnInitialUpdate()
{
      .....
                .....
      
      // Create tooltip object
      m_tool.Create(this);

      // Add tooltip to the control
      m_tool.AddTool(GetDlgItem(IDC_VIN),"Vin");

      // TRUE to show tooltips,FALSE to disable tooltips
      m_tool.Activate(TRUE);       
                ......
                .....
}

where IDC_VIN is the ID of button control.

The in PreTranslateMessage
BOOL CMyDlg::PreTranslateMessage(MSG* pMsg)
{
      m_tool.RelayEvent(pMsg);      
      .......
                .......
}

Thats it. Hope this helps.
VinExpert
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now