diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-27 14:23:31 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-27 14:23:31 +0000 |
commit | 2f261839b60692e33d0e160344d0d636d49c90ba (patch) | |
tree | 187921722698b681d29df3f6e60fb18394a5e9d5 /plugins/Alarms/src/frame.cpp | |
parent | 2e931a0b2780587d85f3902468c935f5adba70c8 (diff) |
less TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17138 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Alarms/src/frame.cpp')
-rw-r--r-- | plugins/Alarms/src/frame.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/plugins/Alarms/src/frame.cpp b/plugins/Alarms/src/frame.cpp index 15f0fd185f..7ad231858c 100644 --- a/plugins/Alarms/src/frame.cpp +++ b/plugins/Alarms/src/frame.cpp @@ -136,34 +136,34 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar HICON hIcon = (min <= 5 ? hIconList2 : hIconList1);
DrawIconEx(dis->hDC,dis->rcItem.left,(dis->rcItem.top + dis->rcItem.bottom - 16)>>1,hIcon,0, 0, 0, NULL, DI_NORMAL);
- GetTextExtentPoint32(dis->hDC,alarm.szTitle,(int)mir_tstrlen(alarm.szTitle),&textSize);
+ GetTextExtentPoint32(dis->hDC,alarm.szTitle,(int)mir_wstrlen(alarm.szTitle),&textSize);
wchar_t buff[100];
if (min >= 60)
- mir_sntprintf(buff, TranslateT("%dh %dm"), min / 60, min % 60);
+ mir_snwprintf(buff, TranslateT("%dh %dm"), min / 60, min % 60);
else
- mir_sntprintf(buff, TranslateT("%dm"), min);
+ mir_snwprintf(buff, TranslateT("%dm"), min);
- GetTextExtentPoint32(dis->hDC,buff,(int)mir_tstrlen(buff),&timeSize);
+ GetTextExtentPoint32(dis->hDC,buff,(int)mir_wstrlen(buff),&timeSize);
if (textSize.cx > (dis->rcItem.right - dis->rcItem.left) - (GetSystemMetrics(SM_CXSMICON) + 4) - timeSize.cx - 2 - 4) {
// need elipsis
wchar_t titlebuff[512];
- size_t len = mir_tstrlen(alarm.szTitle);
+ size_t len = mir_wstrlen(alarm.szTitle);
if (len > 511) len = 511;
while(len > 0 && textSize.cx > (dis->rcItem.right - dis->rcItem.left) - (GetSystemMetrics(SM_CXSMICON) + 4) - timeSize.cx - 2 - 4) {
len--;
wcsncpy(titlebuff, alarm.szTitle, len);
titlebuff[len] = 0;
- mir_tstrcat(titlebuff, L"...");
- GetTextExtentPoint32(dis->hDC,titlebuff,(int)mir_tstrlen(titlebuff),&textSize);
+ mir_wstrcat(titlebuff, L"...");
+ GetTextExtentPoint32(dis->hDC,titlebuff,(int)mir_wstrlen(titlebuff),&textSize);
}
- TextOut(dis->hDC,dis->rcItem.left + 16 + 4,(dis->rcItem.top + dis->rcItem.bottom - textSize.cy)>>1,titlebuff,(int)mir_tstrlen(titlebuff));
- TextOut(dis->hDC,dis->rcItem.right - timeSize.cx - 2,(dis->rcItem.top + dis->rcItem.bottom - timeSize.cy)>>1, buff,(int)mir_tstrlen(buff));
+ TextOut(dis->hDC,dis->rcItem.left + 16 + 4,(dis->rcItem.top + dis->rcItem.bottom - textSize.cy)>>1,titlebuff,(int)mir_wstrlen(titlebuff));
+ TextOut(dis->hDC,dis->rcItem.right - timeSize.cx - 2,(dis->rcItem.top + dis->rcItem.bottom - timeSize.cy)>>1, buff,(int)mir_wstrlen(buff));
}
else {
- TextOut(dis->hDC,dis->rcItem.left + 16 + 4,(dis->rcItem.top + dis->rcItem.bottom - textSize.cy)>>1,alarm.szTitle,(int)mir_tstrlen(alarm.szTitle));
- TextOut(dis->hDC,dis->rcItem.right - timeSize.cx - 2,(dis->rcItem.top + dis->rcItem.bottom - timeSize.cy)>>1, buff,(int)mir_tstrlen(buff));
+ TextOut(dis->hDC,dis->rcItem.left + 16 + 4,(dis->rcItem.top + dis->rcItem.bottom - textSize.cy)>>1,alarm.szTitle,(int)mir_wstrlen(alarm.szTitle));
+ TextOut(dis->hDC,dis->rcItem.right - timeSize.cx - 2,(dis->rcItem.top + dis->rcItem.bottom - timeSize.cy)>>1, buff,(int)mir_wstrlen(buff));
}
SetBkMode(dis->hDC, OPAQUE);
|