Click here to Skip to main content
11,412,833 members (74,345 online)
Click here to Skip to main content

A nice multiline ToolTipCtrl example.

, 8 Feb 2004
Rate this:
Please Sign up or sign in to vote.
A nice multiline ToolTipCtrl example looking like the one available in Delphi.

Sample Image - ToolTipEx.jpg

Introduction

Well there is nothing much to say about this. This is a simple better looking multi-line tooltip control.

#pragma once
class CToolTipCtrlEx : public CToolTipCtrl
{
 DECLARE_DYNAMIC(CToolTipCtrlEx)
 enum Orientations
 {
  NW=1,
  NE,
  SW,
  SE,
 };
public:
 CToolTipCtrlEx();
 virtual ~CToolTipCtrlEx();
protected:
 DECLARE_MESSAGE_MAP()
 virtual void PreSubclassWindow();
private:
 afx_msg void OnPaint();
 afx_msg BOOL OnEraseBkgnd(CDC* pDC);
 afx_msg void OnNcPaint();
public:
 COLORREF m_bkColor;//=RGB(255,255,255);
 COLORREF m_leftColor;//=RGB(255, 210, 83);
 COLORREF m_frameColor;//=RGB(155, 110, 53);
 COLORREF m_textColor;//=RGB(0,0,0);
 COLORREF m_arrowColor;//=RGB(0,0,0);
};

Just use it like a normal ToolTipCtrl control.

In the end

This is a tooltip inspired by the Delphi Flat Hint and the arrows are using the port of the Delphi drawing algorithm. This is free to use, modify it but you can't claim it. Any feedback and rating is most welcome.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

TomKat
Web Developer
Romania Romania
I have been programming for the past 6 years in VBasic, Delphi, C, C++ .
I also have extended knowledge of webdesign (HTML, CSS, JavaScript, VBScript), webprogramming (PHP, ASP, ASP.NET (C#)) and database integration (mySql, MSSQL Server).
And when I`m not programming I`m working out or working on some personal projects .
Last but not least I`m looking for a project-based job in programming or webdesign .

Comments and Discussions

 
GeneralMulti Monitor support [modified] Pin
renaudgillet at 13-Nov-08 7:59
memberrenaudgillet13-Nov-08 7:59 
GeneralUsing ToolTipCtrlEx for toolbar Pin
Hemant K Jangid at 2-Oct-05 21:52
memberHemant K Jangid2-Oct-05 21:52 
GeneralTooltip for MSFlexGrid Cells Pin
ana4raj at 26-Oct-04 0:56
sussana4raj26-Oct-04 0:56 
GeneralTooltip for MSFlexGrid Cells Pin
Anonymous at 26-Oct-04 0:55
sussAnonymous26-Oct-04 0:55 
GeneralRe: Tooltip for MSFlexGrid Cells Pin
rajroy_24 at 19-Jul-07 4:21
memberrajroy_2419-Jul-07 4:21 
Generaluncompleted removed border with removed return CToolTipCtrl::OnNcPaint(); Pin
tony_w2000 at 16-Aug-04 2:18
membertony_w200016-Aug-04 2:18 
GeneralRe: uncompleted removed border with removed return CToolTipCtrl::OnNcPaint(); Pin
TomKat at 16-Aug-04 3:31
memberTomKat16-Aug-04 3:31 
GeneralFix for XP / 2000 Pin
VoidIndigo at 6-Aug-04 4:39
memberVoidIndigo6-Aug-04 4:39 
GeneralRe: Fix for XP / 2000 Pin
VoidIndigo at 6-Aug-04 4:52
memberVoidIndigo6-Aug-04 4:52 
GeneralRe: Fix for XP / 2000 Pin
TomKat at 7-Aug-04 3:32
memberTomKat7-Aug-04 3:32 
Thanks for the fix . I`m currently in vacation but as soon as I get back I`ll test it .
Thank you also for you feedback and interest .


I am the MIGHTY KEEPER of the BOOK OF KNOWLEDGE . Contact me to get your copy .
GeneralRe: Fix for XP / 2000 Pin
VoidIndigo at 11-Aug-04 4:44
memberVoidIndigo11-Aug-04 4:44 
GeneralRe: Fix for XP / 2000 Pin
rspeng at 14-Mar-05 21:11
memberrspeng14-Mar-05 21:11 
GeneralHelp Pin
alexwinx at 17-Feb-04 22:42
sussalexwinx17-Feb-04 22:42 
GeneralRe: Help Pin
TomKat at 18-Feb-04 8:04
memberTomKat18-Feb-04 8:04 
GeneralRe: Help Pin
VoidIndigo at 6-Aug-04 4:41
memberVoidIndigo6-Aug-04 4:41 
General!!!Bug Fix Pin
TomKat at 16-Feb-04 22:08
memberTomKat16-Feb-04 22:08 
GeneralNice but .. Pin
gri at 14-Feb-04 2:31
membergri14-Feb-04 2:31 
GeneralRe: Nice but .. Pin
TomKat at 14-Feb-04 2:59
memberTomKat14-Feb-04 2:59 
GeneralRe: Nice but .. Pin
gri at 14-Feb-04 4:01
membergri14-Feb-04 4:01 
GeneralRe: Nice but .. Pin
mrsilver at 14-Feb-04 4:20
membermrsilver14-Feb-04 4:20 
GeneralRe: Nice but .. Pin
Member 2228136 at 25-Aug-08 19:46
memberMember 222813625-Aug-08 19:46 
GeneralRe: Nice but .. Pin
TomKat at 15-Feb-04 22:40
memberTomKat15-Feb-04 22:40 
GeneralRe: Nice but .. Pin
Fahad Ahmed at 29-Jul-04 11:20
memberFahad Ahmed29-Jul-04 11:20 
GeneralRe: Nice but .. Pin
swqswqswqswq at 31-Oct-05 9:25
memberswqswqswqswq31-Oct-05 9:25 
GeneralRe: Nice but .. Pin
Vtt at 13-Aug-09 0:38
memberVtt13-Aug-09 0:38 
GeneralThe Book of Knowledge Pin
Antonio Barros at 10-Feb-04 0:19
memberAntonio Barros10-Feb-04 0:19 
GeneralRe: The Book of Knowledge Pin
TomKat at 10-Feb-04 0:40
memberTomKat10-Feb-04 0:40 
GeneralRe: The Book of Knowledge Pin
Gary Wheeler at 10-Feb-04 11:50
memberGary Wheeler10-Feb-04 11:50 
GeneralRe: The Book of Knowledge Pin
TomKat at 11-Feb-04 2:32
memberTomKat11-Feb-04 2:32 
GeneralRe: The Book of Knowledge Pin
Hockey at 2-May-04 23:27
memberHockey2-May-04 23:27 
GeneralRe: The Book of Knowledge Pin
TomKat at 3-May-04 1:18
memberTomKat3-May-04 1:18 
GeneralGood job. Pin
tony_w2000 at 9-Feb-04 14:00
membertony_w20009-Feb-04 14:00 
GeneralRe: Good job. Pin
TomKat at 9-Feb-04 20:53
memberTomKat9-Feb-04 20:53 
GeneralAnd in C# Pin
Antonio Barros at 9-Feb-04 9:10
memberAntonio Barros9-Feb-04 9:10 
GeneralRe: And in C# Pin
TomKat at 9-Feb-04 10:36
sussTomKat9-Feb-04 10:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150427.1 | Last Updated 9 Feb 2004
Article Copyright 2004 by TomKat
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid