diff options
author | Piotr Piastucki <leech.miranda@gmail.com> | 2015-05-18 12:58:17 +0000 |
---|---|---|
committer | Piotr Piastucki <leech.miranda@gmail.com> | 2015-05-18 12:58:17 +0000 |
commit | 5e8cbb029ccd2865f93e2b4d25f94d2d35a9af36 (patch) | |
tree | e2b72c40fecbb83ba100a2b65d442e5626190082 /src/modules | |
parent | c8a1178505fe181733b68762b661adc76d07aa54 (diff) |
After selecting an object into a DC, it has to be set back to the original value again before releasing the DC
git-svn-id: http://svn.miranda-ng.org/main/trunk@13679 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/clist/cluiservices.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/clist/cluiservices.cpp b/src/modules/clist/cluiservices.cpp index a16d5b83b6..b9bf086843 100644 --- a/src/modules/clist/cluiservices.cpp +++ b/src/modules/clist/cluiservices.cpp @@ -165,11 +165,12 @@ void fnCluiProtocolStatusChanged(int, const char*) }
else {
HDC hdc;
+ HFONT hFont;
SIZE textSize;
BYTE showOpts = db_get_b(NULL, "CLUI", "SBarShow", 1);
hdc = GetDC(NULL);
- SelectObject(hdc, (HFONT) SendMessage(cli.hwndStatus, WM_GETFONT, 0, 0));
+ hFont = (HFONT)SelectObject(hdc, (HFONT) SendMessage(cli.hwndStatus, WM_GETFONT, 0, 0));
for (i=0; i < cli.menuProtoCount; i++) { //count down since built in ones tend to go at the end
int x = 2;
if (showOpts & 1)
@@ -196,6 +197,7 @@ void fnCluiProtocolStatusChanged(int, const char*) }
partWidths[ i ] = (i ? partWidths[ i-1] : 0) + x + 2;
}
+ SelectObject(hdc, hFont);
ReleaseDC(NULL, hdc);
}
|