Fix history combobox show twice item
[TortoiseGit.git] / src / Utils / MiscUI / XPImageButton.h
blobd49f18995e49093f39386f4e8be23caeb0cbfee8
1 #pragma once
3 #include "XPTheme.h"
4 #include "OddButton.h"
6 /**
7 * \ingroup TortoiseProc
8 * A CButton which can show icons and images with
9 * the XP style. Normal CButtons only show the icons/images
10 * themselves, without the XP style background.
12 class CXPImageButton : public CButton
14 DECLARE_DYNAMIC(CXPImageButton)
16 public:
17 CXPImageButton();
18 virtual ~CXPImageButton();
20 protected:
21 DECLARE_MESSAGE_MAP()
23 afx_msg void OnNotifyCustomDraw ( NMHDR * pNotifyStruct, LRESULT* result );
25 void DrawBitmap (HDC hDC, const CRect& Rect, DWORD style);
26 void DrawIcon (HDC hDC, const CRect& Rect, DWORD style);
27 int ImageLeft(int cx, const CRect& Rect, DWORD style) const;
28 int ImageTop(int cy, const CRect& Rect, DWORD style) const;
29 CXPTheme m_xpButton;