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 /src/modules | |
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 'src/modules')
-rw-r--r-- | src/modules/clist/genmenuopt.cpp | 2 | ||||
-rw-r--r-- | src/modules/fonts/FontOptions.cpp | 2 | ||||
-rw-r--r-- | src/modules/skin/hotkey_opts.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/clist/genmenuopt.cpp b/src/modules/clist/genmenuopt.cpp index f5ab36b727..b3ef89cb63 100644 --- a/src/modules/clist/genmenuopt.cpp +++ b/src/modules/clist/genmenuopt.cpp @@ -467,7 +467,7 @@ static int handleCustomDraw(HWND hWndTreeView, LPNMTVCUSTOMDRAW pNMTVCD) SetBkColor(pNMTVCD->nmcd.hdc, pNMTVCD->clrTextBk); FillRect(pNMTVCD->nmcd.hdc, &rc, br); DeleteObject(br); - DrawText(pNMTVCD->nmcd.hdc, tvi.pszText, (int)mir_tstrlen(tvi.pszText), &pNMTVCD->nmcd.rc, DT_LEFT | DT_VCENTER | DT_NOPREFIX); + DrawText(pNMTVCD->nmcd.hdc, tvi.pszText, -1, &pNMTVCD->nmcd.rc, DT_LEFT | DT_VCENTER | DT_NOPREFIX); retVal |= CDRF_SKIPDEFAULT; } diff --git a/src/modules/fonts/FontOptions.cpp b/src/modules/fonts/FontOptions.cpp index 3091965994..59b59e30af 100644 --- a/src/modules/fonts/FontOptions.cpp +++ b/src/modules/fonts/FontOptions.cpp @@ -1319,7 +1319,7 @@ static INT_PTR CALLBACK DlgProcModernOptions(HWND hwndDlg, UINT msg, WPARAM wPar SetBkMode(dis->hDC, TRANSPARENT);
SetTextColor(dis->hDC, GetSysColor(COLOR_BTNTEXT));
FillRect(dis->hDC, &dis->rcItem, GetSysColorBrush(COLOR_BTNFACE));
- DrawText(dis->hDC, TranslateT("Sample text"), (int)_tcslen(TranslateT("Sample text")), &dis->rcItem, DT_LEFT|DT_NOPREFIX|DT_SINGLELINE|DT_VCENTER|DT_WORD_ELLIPSIS|DT_CENTER);
+ DrawText(dis->hDC, TranslateT("Sample text"), -1, &dis->rcItem, DT_LEFT|DT_NOPREFIX|DT_SINGLELINE|DT_VCENTER|DT_WORD_ELLIPSIS|DT_CENTER);
if (hoFont)
SelectObject(dis->hDC, hoFont);
return TRUE;
diff --git a/src/modules/skin/hotkey_opts.cpp b/src/modules/skin/hotkey_opts.cpp index baea80298e..7ade1f27d7 100644 --- a/src/modules/skin/hotkey_opts.cpp +++ b/src/modules/skin/hotkey_opts.cpp @@ -414,7 +414,7 @@ static void sttOptionsStartEdit(HWND hwndDlg, HWND hwndHotkey) static void sttOptionsDrawTextChunk(HDC hdc, TCHAR *text, RECT *rc) { int len = (int)mir_tstrlen(text); - DrawText(hdc, text, len, rc, DT_LEFT | DT_NOPREFIX | DT_SINGLELINE | DT_VCENTER | DT_WORD_ELLIPSIS); + DrawText(hdc, text, -1, rc, DT_LEFT | DT_NOPREFIX | DT_SINGLELINE | DT_VCENTER | DT_WORD_ELLIPSIS); SIZE sz; GetTextExtentPoint32(hdc, text, len, &sz); |