summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/container.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-01-25 21:39:23 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-01-25 21:39:23 +0000
commitb6b84ffaf51673a3b9b2851602428ac815b680c4 (patch)
tree51733a10acfde433c5f3a15b573bfc865ee42d5a /plugins/TabSRMM/src/container.cpp
parent619f8bc3cf5e9f4aac984b8f855b74293fbb787d (diff)
TabSRMM:
- Fixed memory issues - Fixed translation issue (fixes #869) git-svn-id: http://svn.miranda-ng.org/main/trunk@11909 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/container.cpp')
-rw-r--r--plugins/TabSRMM/src/container.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp
index b4908bfca2..7cdeb10e5d 100644
--- a/plugins/TabSRMM/src/container.cpp
+++ b/plugins/TabSRMM/src/container.cpp
@@ -130,17 +130,14 @@ static LRESULT CALLBACK ContainerWndProc(HWND hwndDlg, UINT msg, WPARAM wParam,
break;
if (CSkin::m_frameSkins) {
- RECT rcWindow, rcClient;
HDC dcFrame = GetDCEx(hwndDlg, 0, DCX_WINDOW|/*DCX_INTERSECTRGN|*/0x10000); // GetWindowDC(hwndDlg);
- POINT pt, pt1;
LONG clip_top, clip_left;
- CSkinItem *item;
- TCHAR szWindowText[512];
RECT rcText;
HDC dcMem = CreateCompatibleDC(pContainer->cachedDC ? pContainer->cachedDC : dcFrame);
- HBITMAP hbmMem, hbmOld;
int i;
+ RECT rcWindow, rcClient;
+ POINT pt, pt1;
GetWindowRect(hwndDlg, &rcWindow);
GetClientRect(hwndDlg, &rcClient);
pt.y = 0;
@@ -156,15 +153,16 @@ static LRESULT CALLBACK ContainerWndProc(HWND hwndDlg, UINT msg, WPARAM wParam,
rcWindow.bottom = rcWindow.bottom - rcWindow.top;
rcWindow.left = rcWindow.top = 0;
- hbmMem = CreateCompatibleBitmap(dcFrame, rcWindow.right, rcWindow.bottom);
- hbmOld = (HBITMAP)SelectObject(dcMem, hbmMem);
+ HBITMAP hbmMem = CreateCompatibleBitmap(dcFrame, rcWindow.right, rcWindow.bottom);
+ HBITMAP hbmOld = (HBITMAP)SelectObject(dcMem, hbmMem);
ExcludeClipRect(dcFrame, clip_left, clip_top, clip_left + (pt1.x - pt.x), clip_top + (pt1.y - pt.y));
ExcludeClipRect(dcMem, clip_left, clip_top, clip_left + (pt1.x - pt.x), clip_top + (pt1.y - pt.y));
- item = pContainer->ncActive ? &SkinItems[ID_EXTBKFRAME] : &SkinItems[ID_EXTBKFRAMEINACTIVE];
+ CSkinItem *item = pContainer->ncActive ? &SkinItems[ID_EXTBKFRAME] : &SkinItems[ID_EXTBKFRAMEINACTIVE];
CSkin::DrawItem(dcMem, &rcWindow, item);
-
+
+ TCHAR szWindowText[512];
GetWindowText(hwndDlg, szWindowText, SIZEOF(szWindowText));
szWindowText[511] = 0;
hOldFont = (HFONT)SelectObject(dcMem, PluginConfig.hFontCaption);