蝈蝈葫芦制作图解:A nice multiline ToolTipCtrl example. - CodeProject

来源:百度文库 编辑:九乡新闻网 时间:2024/04/29 14:23:21

A nice multiline ToolTipCtrl example.

By TomKat |9 Feb 2004VC7Win2KWinXPWin2003MFCDevIntermediateA nice multiline ToolTipCtrl example looking like the one available in Delphi. See Also
  • More like this
  • More by this author
Print Article Twitter Digg Facebook Del.icio.us Reddit Stumbleupon Newsvine Technorati Mr. Wong Yahoo! Google Windows Live Send as Email Add to your CodeProject bookmarksDiscuss this article35 Article Browse Code Stats Revisions   4.09 (23 votes)
1
2
3
4
5 Sponsored LinksIs your email address OK?You are signed up for our newsletters but your email address is either unconfirmed, or has notbeen reconfirmed in a long time. Please clickhere to have aconfirmation email sent so we can confirm your email address and start sending you newslettersagain. Alternatively, you canupdate your subscriptions.
  • Download source files - 2.29 Kb
  • Download demo project - 38.4 Kb

Introduction

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

Collapse
#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;//=#ffffff;        COLORREF m_leftColor;//=#ffd253;        COLORREF m_frameColor;//=#9b6e35;        COLORREF m_textColor;//=#000000;        COLORREF m_arrowColor;//=#000000;        };

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