![]() |
Desktop Development »
Miscellaneous »
Tooltips
Intermediate
VB style tool tip control similar to IntelliSense ToolTipBy Alex HazanovTool tip control similar to Visual Basic IntelliSense tool tip |
VC6Win2K, WinXP, Win2003, MFC, Dev
|
|
Advanced Search Add to IE Search |
|
|
|
||||||||||||||||

This is a CDialog derived window, which resembles the tool tip that pop-ups with function parameters in Visual Studio IDE. The control allows to display a function definition with it's parameters and mark the current parameter in bold font.
Style = popup.
Border = None.
No TitleBar
create for the dialog while passing pointer to the window that the tool tip belongs to: m_intelliToolTip.Create(pParentWnd).
BOOL CIntelliTipDemoDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here
m_tip.Create(this);
CStringArray params;
params.Add("Param 1");
params.Add("Param 2");
params.Add("Param 3");
params.Add("Param 4");
params.Add("Param 5");
m_tip.SetFunction("SomeFunction",params);
m_tip.SetCurParam(3);
return TRUE; // return TRUE unless you set the focus to a control
}When you need to show the tool tip, call CIntelliTip::Show() or CIntelliTip::Hide() to hide it. To set the position, call CIntelliTip::SetCursorPoint(cursorPoint). Example:
void CIntelliTipDemoDlg::OnButton1() { // TODO: Add your control notification handler code here CPoint pt; GetCursorPos(&pt); ScreenToClient(&pt); m_tip.SetCursorPoint(pt); m_tip.Show(); }
| You must Sign In to use this message board. | |||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
General
News
Question
Answer
Joke
Rant
Admin
|
PermaLink |
Privacy |
Terms of Use
Last Updated: 16 Jul 2003 Editor: Smitha Vijayan |
Copyright 2003 by Alex Hazanov Everything else Copyright © CodeProject, 1999-2009 Web19 | Advertise on the Code Project |