//-----------------------------------------------------------------------// // This is a part of the GuiLib MFC Extention. // // Autor : Francisco Campos // // (C) 2002 Francisco Campos <www.beyondata.com> All rights reserved // // This code is provided "as is", with absolutely no warranty expressed // // or implied. Any use is at your own risk. // // You must obtain the author's consent before you can include this code // // in a software library. // // If the source code in this file is used in any application // // then acknowledgement must be made to the author of this program // // fco_campos@tutopia.com // //-----------------------------------------------------------------------// #pragma once // CGuiToolButton #include "bcgcontrolbar.h" class BCGCONTROLBARDLLEXPORT _CGuiToolButton : public CButton { DECLARE_DYNAMIC(_CGuiToolButton) public: _CGuiToolButton(); virtual ~_CGuiToolButton(); public: void SetToolTip(LPCTSTR szToolTip); void SetCaption(CString szCaption); void SethIcon(HICON hIcon); void SetColor(COLORREF clColor); void RecalSize(); void ShowDark(BOOL bShow); CSize GetSizeButton(); void ShowMenu(); void SetScrollButton(BOOL bScroll=TRUE); void SetFontColor(COLORREF clrFont); protected: CToolTipCtrl m_toolTip; HICON m_Icon; CSize m_SizeImage; CSize m_SizeText; CString m_szText; COLORREF m_clColor; BOOL m_bMouserOver; BOOL m_ReposWindow; CSize m_szButton; BOOL m_bShowDark; BOOL m_ScrollButton; COLORREF m_clrFont; public: HMENU m_hMenu; protected: DECLARE_MESSAGE_MAP() public: virtual void DrawItem(LPDRAWITEMSTRUCT /*lpDrawItemStruct*/); afx_msg BOOL OnEraseBkgnd(CDC* pDC); afx_msg void OnLButtonUp(UINT nFlags, CPoint point); afx_msg void OnLButtonDown(UINT nFlags, CPoint point); afx_msg void OnMouseMove(UINT nFlags, CPoint point); afx_msg void OnTimer(UINT nIDEvent); virtual BOOL PreTranslateMessage(MSG* pMsg); virtual void PreSubclassWindow(); afx_msg void OnSysColorChange( ); };
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)