diff options
author | George Hazan <george.hazan@gmail.com> | 2014-12-02 21:55:57 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-12-02 21:55:57 +0000 |
commit | 0ca0de7698b523effaaf6cc9c608e936fa5aaf86 (patch) | |
tree | 1e6ce038dc27a1ccddb5e3f863607c83eece2e98 /plugins/SpellChecker | |
parent | aeae01dc50a5adea8fe003c8195540b1f2b2169f (diff) |
useless calls of mir_*strlen in DrawText replaced with -1
git-svn-id: http://svn.miranda-ng.org/main/trunk@11223 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SpellChecker')
-rw-r--r-- | plugins/SpellChecker/src/options.cpp | 2 | ||||
-rw-r--r-- | plugins/SpellChecker/src/utils.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/SpellChecker/src/options.cpp b/plugins/SpellChecker/src/options.cpp index 38621eee1f..d1f765edff 100644 --- a/plugins/SpellChecker/src/options.cpp +++ b/plugins/SpellChecker/src/options.cpp @@ -152,7 +152,7 @@ static void DrawItem(HWND hwndDlg, LPDRAWITEMSTRUCT lpdis, Dictionary *dict) rc.right = lpdis->rcItem.right - 2;
rc.top = (lpdis->rcItem.bottom + lpdis->rcItem.top - tm.tmHeight) / 2;
rc.bottom = rc.top + tm.tmHeight;
- DrawText(lpdis->hDC, dict->full_name, mir_tstrlen(dict->full_name), &rc, DT_END_ELLIPSIS | DT_NOPREFIX | DT_SINGLELINE);
+ DrawText(lpdis->hDC, dict->full_name, -1, &rc, DT_END_ELLIPSIS | DT_NOPREFIX | DT_SINGLELINE);
// Restore old colors
SetTextColor(lpdis->hDC, clrfore);
diff --git a/plugins/SpellChecker/src/utils.cpp b/plugins/SpellChecker/src/utils.cpp index 86ea80d46e..060f05804a 100644 --- a/plugins/SpellChecker/src/utils.cpp +++ b/plugins/SpellChecker/src/utils.cpp @@ -1513,12 +1513,12 @@ LRESULT CALLBACK MenuWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) // Draw text
RECT rc_text = { 0, 0, 0xFFFF, 0xFFFF };
- DrawText(lpdis->hDC, dict->full_name, mir_tstrlen(dict->full_name), &rc_text, DT_END_ELLIPSIS | DT_NOPREFIX | DT_SINGLELINE | DT_LEFT | DT_TOP | DT_CALCRECT);
+ DrawText(lpdis->hDC, dict->full_name, -1, &rc_text, DT_END_ELLIPSIS | DT_NOPREFIX | DT_SINGLELINE | DT_LEFT | DT_TOP | DT_CALCRECT);
rc.right = lpdis->rcItem.right - 2;
rc.top = (lpdis->rcItem.bottom + lpdis->rcItem.top - (rc_text.bottom - rc_text.top)) / 2;
rc.bottom = rc.top + rc_text.bottom - rc_text.top;
- DrawText(lpdis->hDC, dict->full_name, mir_tstrlen(dict->full_name), &rc, DT_END_ELLIPSIS | DT_NOPREFIX | DT_LEFT | DT_TOP | DT_SINGLELINE);
+ DrawText(lpdis->hDC, dict->full_name, -1, &rc, DT_END_ELLIPSIS | DT_NOPREFIX | DT_LEFT | DT_TOP | DT_SINGLELINE);
// Restore old colors
SetTextColor(lpdis->hDC, clrfore);
@@ -1546,7 +1546,7 @@ LRESULT CALLBACK MenuWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) RECT rc = { 0, 0, 0xFFFF, 0xFFFF };
- DrawText(hdc, dict->full_name, mir_tstrlen(dict->full_name), &rc, DT_NOPREFIX | DT_SINGLELINE | DT_LEFT | DT_TOP | DT_CALCRECT);
+ DrawText(hdc, dict->full_name, -1, &rc, DT_NOPREFIX | DT_SINGLELINE | DT_LEFT | DT_TOP | DT_CALCRECT);
lpmis->itemHeight = max(ICON_SIZE, max(bmpChecked.bmHeight, rc.bottom));
lpmis->itemWidth = 2 + bmpChecked.bmWidth + 2 + ICON_SIZE + 4 + rc.right + 2;
|