Tooltips Won't Display
-
The application (CFrameWndEx) creates a dialog box (CDialogEx) with future ambitions of adding CMFCTooltipCtrl etc. I am trying to just get CTooltipCtrl to work first. In the dialog class I have: .h - CToolTipCtrl* p_TTCtrl; .ccp -
p_TTCtrl = new CToolTipCtrl;
ASSERT(p_TTCtrl->Create(this));CWnd* p_Wnd = this->GetDlgItem(IDCTL_Pref_CB_Exit);
VERIFY(p_TTCtrl->AddTool(p_Wnd, IDCTL_Pref_CB_Exit, NULL, 0));
p_TTCtrl->Activate(TRUE);When I run the debugger, there are no ASSERT or Verify errors. If I hover over IDCtrl_Pref_CB which is a checkbox created from the .rc file, nothing happens. Can someone please point out what I am missing or have wrong. Thanks, Barry
-
The application (CFrameWndEx) creates a dialog box (CDialogEx) with future ambitions of adding CMFCTooltipCtrl etc. I am trying to just get CTooltipCtrl to work first. In the dialog class I have: .h - CToolTipCtrl* p_TTCtrl; .ccp -
p_TTCtrl = new CToolTipCtrl;
ASSERT(p_TTCtrl->Create(this));CWnd* p_Wnd = this->GetDlgItem(IDCTL_Pref_CB_Exit);
VERIFY(p_TTCtrl->AddTool(p_Wnd, IDCTL_Pref_CB_Exit, NULL, 0));
p_TTCtrl->Activate(TRUE);When I run the debugger, there are no ASSERT or Verify errors. If I hover over IDCtrl_Pref_CB which is a checkbox created from the .rc file, nothing happens. Can someone please point out what I am missing or have wrong. Thanks, Barry
Did you add the text for the tooltip? UpdateTipText()[^] EDIT: Nevermind, I didn't notice that the AddTool function already specifies the text.
The difficult we do right away... ...the impossible takes slightly longer.
-
The application (CFrameWndEx) creates a dialog box (CDialogEx) with future ambitions of adding CMFCTooltipCtrl etc. I am trying to just get CTooltipCtrl to work first. In the dialog class I have: .h - CToolTipCtrl* p_TTCtrl; .ccp -
p_TTCtrl = new CToolTipCtrl;
ASSERT(p_TTCtrl->Create(this));CWnd* p_Wnd = this->GetDlgItem(IDCTL_Pref_CB_Exit);
VERIFY(p_TTCtrl->AddTool(p_Wnd, IDCTL_Pref_CB_Exit, NULL, 0));
p_TTCtrl->Activate(TRUE);When I run the debugger, there are no ASSERT or Verify errors. If I hover over IDCtrl_Pref_CB which is a checkbox created from the .rc file, nothing happens. Can someone please point out what I am missing or have wrong. Thanks, Barry
-
In an ancient VC6.0 there is a "add C++ components " option which does the grunt work of adding tooltip for you. I would guess that the latest VS has a similar tool.
I found it. I was creating the CMFCTooltipCtrl class improperly. Thanks for the effort, Barry