修订版 | 29022 (tree) |
---|---|
时间 | 2020-11-14 21:38:51 |
作者 | stefankueng |
move the "using namespace" from header to cpp.
@@ -27,6 +27,7 @@ | ||
27 | 27 | #define _WIN32_WINNT_WINTHRESHOLD 0x0A00 |
28 | 28 | #define IsWindows10OrGreater() (IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WIN10), LOBYTE(_WIN32_WINNT_WIN10), 0)) |
29 | 29 | #endif |
30 | +using namespace Gdiplus; | |
30 | 31 | |
31 | 32 | |
32 | 33 | enum ControlType |
@@ -1,6 +1,6 @@ | ||
1 | -// TortoiseSVN - a Windows shell extension for easy version control | |
1 | +// TortoiseSVN - a Windows shell extension for easy version control | |
2 | 2 | |
3 | -// Copyright (C) 2009-2010, 2014-2016 - TortoiseSVN | |
3 | +// Copyright (C) 2009-2010, 2014-2016, 2020 - TortoiseSVN | |
4 | 4 | |
5 | 5 | // This program is free software; you can redistribute it and/or |
6 | 6 | // modify it under the terms of the GNU General Public License |
@@ -21,10 +21,9 @@ | ||
21 | 21 | #include "registry.h" |
22 | 22 | #include <map> |
23 | 23 | #pragma warning(push) |
24 | -#pragma warning(disable: 4458) // declaration of 'xxx' hides class member | |
24 | +#pragma warning(disable : 4458) // declaration of 'xxx' hides class member | |
25 | 25 | #include <gdiplus.h> |
26 | 26 | #pragma warning(pop) |
27 | -using namespace Gdiplus; | |
28 | 27 | |
29 | 28 | class AeroControlBase |
30 | 29 | { |
@@ -41,23 +40,23 @@ | ||
41 | 40 | |
42 | 41 | private: |
43 | 42 | static LRESULT CALLBACK SubclassProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uidSubclass, DWORD_PTR dwRefData); |
44 | - LRESULT StaticWindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); | |
45 | - LRESULT ButtonWindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); | |
46 | - LRESULT ProgressbarWindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); | |
43 | + LRESULT StaticWindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); | |
44 | + LRESULT ButtonWindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); | |
45 | + LRESULT ProgressbarWindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); | |
47 | 46 | |
48 | - BOOL DetermineGlowSize(int *piSize, LPCWSTR pszClassIdList = NULL); | |
47 | + BOOL DetermineGlowSize(int* piSize, LPCWSTR pszClassIdList = NULL); | |
49 | 48 | void DrawFocusRect(LPRECT prcFocus, HDC hdcPaint); |
50 | - void DrawRect(LPRECT prc, HDC hdcPaint, DashStyle dashStyle, Color clr, REAL width) const; | |
51 | - void FillRect(LPRECT prc, HDC hdcPaint, Color clr) const; | |
52 | - int GetStateFromBtnState(LONG_PTR dwStyle, BOOL bHot, BOOL bFocus, LRESULT dwCheckState, int iPartId, BOOL bHasMouseCapture) const; | |
49 | + void DrawRect(LPRECT prc, HDC hdcPaint, Gdiplus::DashStyle dashStyle, Gdiplus::Color clr, Gdiplus::REAL width) const; | |
50 | + void FillRect(LPRECT prc, HDC hdcPaint, Gdiplus::Color clr) const; | |
51 | + int GetStateFromBtnState(LONG_PTR dwStyle, BOOL bHot, BOOL bFocus, LRESULT dwCheckState, int iPartId, BOOL bHasMouseCapture) const; | |
53 | 52 | void PaintControl(HWND hWnd, HDC hdc, RECT* prc, bool bDrawBorder); |
54 | 53 | void ScreenToClient(HWND hWnd, LPRECT lprc); |
55 | - void DrawSolidWndRectOnParent(HWND hWnd, Color clr); | |
54 | + void DrawSolidWndRectOnParent(HWND hWnd, Gdiplus::Color clr); | |
56 | 55 | void DrawEditBorder(HWND hWnd); |
57 | - BOOL GetEditBorderColor(HWND hWnd, COLORREF *pClr); | |
58 | - void GetRoundRectPath(GraphicsPath *pPath, const Rect& r, int dia) const; | |
56 | + BOOL GetEditBorderColor(HWND hWnd, COLORREF* pClr); | |
57 | + void GetRoundRectPath(Gdiplus::GraphicsPath* pPath, const Gdiplus::Rect& r, int dia) const; | |
59 | 58 | |
60 | - CRegDWORD m_regEnableDWMFrame; | |
61 | - std::map<HWND, UINT_PTR> subclassedControls; | |
62 | - ULONG_PTR gdiplusToken; | |
59 | + CRegDWORD m_regEnableDWMFrame; | |
60 | + std::map<HWND, UINT_PTR> subclassedControls; | |
61 | + ULONG_PTR gdiplusToken; | |
63 | 62 | }; |