diff options
author | George Hazan <ghazan@miranda.im> | 2017-04-30 22:29:53 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-04-30 22:29:53 +0300 |
commit | d75d5e8706b06457b799831448f282818233abe9 (patch) | |
tree | f8683af05bb204ae815524046297acef5192543e /plugins/SmileyAdd | |
parent | 64123ae6bc9543980ab5c561bd0e78b629ab627b (diff) |
fix for unset structure field
Diffstat (limited to 'plugins/SmileyAdd')
-rw-r--r-- | plugins/SmileyAdd/src/richcall.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/SmileyAdd/src/richcall.cpp b/plugins/SmileyAdd/src/richcall.cpp index d19d0dbf59..631c70ee96 100644 --- a/plugins/SmileyAdd/src/richcall.cpp +++ b/plugins/SmileyAdd/src/richcall.cpp @@ -67,7 +67,7 @@ static void SetPosition(HWND hwnd) reObj.poleobj->QueryInterface(IID_ISmileyAddSmiley, (void**)&igsc);
reObj.poleobj->Release();
- if (igsc == NULL)
+ if (igsc == nullptr)
continue;
TextRange->SetRange(reObj.cp, reObj.cp);
@@ -75,13 +75,13 @@ static void SetPosition(HWND hwnd) BOOL res;
POINT pt;
RECT rect;
- hr = TextRange->GetPoint(tomStart | TA_BOTTOM | TA_LEFT, &pt.x, &pt.y);
+ hr = TextRange->GetPoint(tomStart | TA_BOTTOM | TA_RIGHT, &pt.x, &pt.y);
if (hr == S_OK) {
res = ScreenToClient(hwnd, &pt);
rect.bottom = pt.y;
- rect.left = pt.x;
+ rect.right = pt.x;
}
- else rect.bottom = -1;
+ else rect.right = rect.bottom = -1;
hr = TextRange->GetPoint(tomStart | TA_TOP | TA_LEFT, &pt.x, &pt.y);
if (hr == S_OK) {
@@ -89,7 +89,7 @@ static void SetPosition(HWND hwnd) rect.top = pt.y;
rect.left = pt.x;
}
- else rect.top = -1;
+ else rect.left = rect.top = -1;
igsc->SetPosition(hwnd, &rect);
}
|