From 2f261839b60692e33d0e160344d0d636d49c90ba Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 27 Jul 2016 14:23:31 +0000 Subject: less TCHARs git-svn-id: http://svn.miranda-ng.org/main/trunk@17138 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/core/stdclist/src/clcpaint.cpp | 14 +++++++------- src/core/stdclist/src/contact.cpp | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/core/stdclist') diff --git a/src/core/stdclist/src/clcpaint.cpp b/src/core/stdclist/src/clcpaint.cpp index cb679abd0e..c5f4539e17 100644 --- a/src/core/stdclist/src/clcpaint.cpp +++ b/src/core/stdclist/src/clcpaint.cpp @@ -313,7 +313,7 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint) ChangeToFont(hdcMem, dat, FONTID_OFFLINE, &fontHeight); else ChangeToFont(hdcMem, dat, FONTID_CONTACTS, &fontHeight); - GetTextExtentPoint32(hdcMem, cc->szText, (int)mir_tstrlen(cc->szText), &textSize); + GetTextExtentPoint32(hdcMem, cc->szText, (int)mir_wstrlen(cc->szText), &textSize); width = textSize.cx; wchar_t *ptszGroupCount = NULL; @@ -322,7 +322,7 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint) if (*ptszGroupCount) { GetTextExtentPoint32(hdcMem, L" ", 1, &spaceSize); ChangeToFont(hdcMem, dat, FONTID_GROUPCOUNTS, &fontHeight); - GetTextExtentPoint32(hdcMem, ptszGroupCount, (int)mir_tstrlen(ptszGroupCount), &countsSize); + GetTextExtentPoint32(hdcMem, ptszGroupCount, (int)mir_wstrlen(ptszGroupCount), &countsSize); width += spaceSize.cx + countsSize.cx; } } @@ -409,7 +409,7 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint) rc.left = dat->leftMargin + indent * dat->groupIndent; rc.right = rc.left + ((clRect.right - rc.left - textSize.cx) >> 1) - 3; DrawEdge(hdcMem, &rc, BDR_SUNKENOUTER, BF_RECT); - TextOut(hdcMem, rc.right + 3, y + ((dat->rowHeight - fontHeight) >> 1), cc->szText, (int)mir_tstrlen(cc->szText)); + TextOut(hdcMem, rc.right + 3, y + ((dat->rowHeight - fontHeight) >> 1), cc->szText, (int)mir_wstrlen(cc->szText)); rc.left = rc.right + 6 + textSize.cx; rc.right = clRect.right; DrawEdge(hdcMem, &rc, BDR_SUNKENOUTER, BF_RECT); @@ -425,16 +425,16 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint) if (rc.right < rc.left + 4) rc.right = clRect.right + 1; else - TextOut(hdcMem, rc.right, rc.top + groupCountsFontTopShift, ptszGroupCount, (int)mir_tstrlen(ptszGroupCount)); + TextOut(hdcMem, rc.right, rc.top + groupCountsFontTopShift, ptszGroupCount, (int)mir_wstrlen(ptszGroupCount)); ChangeToFont(hdcMem, dat, FONTID_GROUPS, &fontHeight); if (selected) SetTextColor(hdcMem, dat->selTextColour); else if (hottrack) SetHotTrackColour(hdcMem, dat); rc.right--; - ExtTextOut(hdcMem, rc.left, rc.top, ETO_CLIPPED, &rc, cc->szText, (int)mir_tstrlen(cc->szText), NULL); + ExtTextOut(hdcMem, rc.left, rc.top, ETO_CLIPPED, &rc, cc->szText, (int)mir_wstrlen(cc->szText), NULL); } - else TextOut(hdcMem, dat->leftMargin + indent * dat->groupIndent + checkboxWidth + dat->iconXSpace, y + ((dat->rowHeight - fontHeight) >> 1), cc->szText, (int)mir_tstrlen(cc->szText)); + else TextOut(hdcMem, dat->leftMargin + indent * dat->groupIndent + checkboxWidth + dat->iconXSpace, y + ((dat->rowHeight - fontHeight) >> 1), cc->szText, (int)mir_wstrlen(cc->szText)); if (dat->exStyle & CLS_EX_LINEWITHGROUPS) { rc.top = y + (dat->rowHeight >> 1); @@ -456,7 +456,7 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint) if (selected) { if (cc->type != CLCIT_DIVIDER) { - size_t qlen = mir_tstrlen(dat->szQuickSearch); + size_t qlen = mir_wstrlen(dat->szQuickSearch); SetTextColor(hdcMem, dat->quickSearchColour); RECT rc; diff --git a/src/core/stdclist/src/contact.cpp b/src/core/stdclist/src/contact.cpp index 359419faa3..23163d83fc 100644 --- a/src/core/stdclist/src/contact.cpp +++ b/src/core/stdclist/src/contact.cpp @@ -93,5 +93,5 @@ int CompareContacts(const ClcContact* c1, const ClcContact* c2) nameb = pcli->pfnGetContactDisplayName(b, 0); //otherwise just compare names - return mir_tstrcmpi(namea, nameb); + return mir_wstrcmpi(namea, nameb); } -- cgit v1.2.3