diff options
author | George Hazan <ghazan@miranda.im> | 2017-10-31 17:03:12 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-10-31 17:03:12 +0300 |
commit | e667e034f103a17e8cf37689ea2de762f49704c2 (patch) | |
tree | b39eba4e89914f2a451a37652db6a4637f4ea9bb /plugins/SmileyAdd/src/richcall.cpp | |
parent | 4d9bf8032dd659e091394d688b6a2c59bf222240 (diff) |
fix for drawing half-visible smileys
Diffstat (limited to 'plugins/SmileyAdd/src/richcall.cpp')
-rw-r--r-- | plugins/SmileyAdd/src/richcall.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/plugins/SmileyAdd/src/richcall.cpp b/plugins/SmileyAdd/src/richcall.cpp index 631c70ee96..fcfcdac239 100644 --- a/plugins/SmileyAdd/src/richcall.cpp +++ b/plugins/SmileyAdd/src/richcall.cpp @@ -72,24 +72,21 @@ static void SetPosition(HWND hwnd) TextRange->SetRange(reObj.cp, reObj.cp);
- BOOL res;
- POINT pt;
RECT rect;
- hr = TextRange->GetPoint(tomStart | TA_BOTTOM | TA_RIGHT, &pt.x, &pt.y);
- if (hr == S_OK) {
- res = ScreenToClient(hwnd, &pt);
+ POINT pt;
+ if (S_OK == TextRange->GetPoint(tomStart | TA_BOTTOM | TA_RIGHT, &pt.x, &pt.y)) {
+ ScreenToClient(hwnd, &pt);
rect.bottom = pt.y;
rect.right = pt.x;
}
- else rect.right = rect.bottom = -1;
+ else rect.bottom = -1;
- hr = TextRange->GetPoint(tomStart | TA_TOP | TA_LEFT, &pt.x, &pt.y);
- if (hr == S_OK) {
- res = ScreenToClient(hwnd, &pt);
+ if (S_OK == TextRange->GetPoint(tomStart | TA_TOP | TA_LEFT, &pt.x, &pt.y)) {
+ ScreenToClient(hwnd, &pt);
rect.top = pt.y;
rect.left = pt.x;
}
- else rect.left = rect.top = -1;
+ else rect.top = -1;
igsc->SetPosition(hwnd, &rect);
}
|