Click here to Skip to main content
Licence 
First Posted 8 Feb 2004
Views 91,589
Bookmarked 44 times

A nice multiline ToolTipCtrl example.

By | 8 Feb 2004 | Article
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

About the Author

TomKat

Web Developer

Romania Romania

Member

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 .

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralMulti Monitor support [modified] Pinmemberrenaudgillet6:59 13 Nov '08  
GeneralUsing ToolTipCtrlEx for toolbar PinmemberHemant K Jangid20:52 2 Oct '05  
GeneralTooltip for MSFlexGrid Cells Pinsussana4raj23:56 25 Oct '04  
GeneralTooltip for MSFlexGrid Cells PinsussAnonymous23:55 25 Oct '04  
GeneralRe: Tooltip for MSFlexGrid Cells Pinmemberrajroy_243:21 19 Jul '07  
Generaluncompleted removed border with removed return CToolTipCtrl::OnNcPaint(); Pinmembertony_w20001:18 16 Aug '04  
GeneralRe: uncompleted removed border with removed return CToolTipCtrl::OnNcPaint(); PinmemberTomKat2:31 16 Aug '04  
GeneralFix for XP / 2000 PinmemberVoidIndigo3:39 6 Aug '04  
GeneralRe: Fix for XP / 2000 PinmemberVoidIndigo3:52 6 Aug '04  
GeneralRe: Fix for XP / 2000 PinmemberTomKat2:32 7 Aug '04  
GeneralRe: Fix for XP / 2000 PinmemberVoidIndigo3:44 11 Aug '04  
GeneralRe: Fix for XP / 2000 Pinmemberrspeng20:11 14 Mar '05  
GeneralHelp Pinsussalexwinx21:42 17 Feb '04  
GeneralRe: Help PinmemberTomKat7:04 18 Feb '04  
GeneralRe: Help PinmemberVoidIndigo3:41 6 Aug '04  
General!!!Bug Fix PinmemberTomKat21:08 16 Feb '04  
GeneralNice but .. Pinmembergri1:31 14 Feb '04  
GeneralRe: Nice but .. PinmemberTomKat1:59 14 Feb '04  
GeneralRe: Nice but .. Pinmembergri3:01 14 Feb '04  
GeneralRe: Nice but .. Pinmembermrsilver3:20 14 Feb '04  
GeneralRe: Nice but .. PinmemberMember 222813618:46 25 Aug '08  
GeneralRe: Nice but .. PinmemberTomKat21:40 15 Feb '04  
GeneralRe: Nice but .. PinmemberFahad Ahmed10:20 29 Jul '04  
GeneralRe: Nice but .. Pinmemberswqswqswqswq8:25 31 Oct '05  
GeneralRe: Nice but .. PinmemberVtt23:38 12 Aug '09  

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.

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120517.1 | Last Updated 9 Feb 2004
Article Copyright 2004 by TomKat
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid