diff options
author | George Hazan <george.hazan@gmail.com> | 2014-12-02 22:20:16 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-12-02 22:20:16 +0000 |
commit | 4b01e299223c3fdb05d82ecde0117f88f8caa726 (patch) | |
tree | 50f6bb91de44e402d933374ecd3766a59e382589 /plugins/Alarms | |
parent | 0ca0de7698b523effaaf6cc9c608e936fa5aaf86 (diff) |
less warnings
git-svn-id: http://svn.miranda-ng.org/main/trunk@11224 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Alarms')
-rw-r--r-- | plugins/Alarms/src/frame.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/Alarms/src/frame.cpp b/plugins/Alarms/src/frame.cpp index 9a8d48b224..3d56c05855 100644 --- a/plugins/Alarms/src/frame.cpp +++ b/plugins/Alarms/src/frame.cpp @@ -137,7 +137,7 @@ 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,mir_tstrlen(alarm.szTitle),&textSize);
+ GetTextExtentPoint32(dis->hDC,alarm.szTitle,(int)mir_tstrlen(alarm.szTitle),&textSize);
TCHAR buff[100];
if (min >= 60)
@@ -145,26 +145,26 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar else
mir_sntprintf(buff, 100, TranslateT("%dm"), min);
- GetTextExtentPoint32(dis->hDC,buff,mir_tstrlen(buff),&timeSize);
+ GetTextExtentPoint32(dis->hDC,buff,(int)mir_tstrlen(buff),&timeSize);
if (textSize.cx > (dis->rcItem.right - dis->rcItem.left) - (GetSystemMetrics(SM_CXSMICON) + 4) - timeSize.cx - 2 - 4) {
// need elipsis
TCHAR titlebuff[512];
- int len = mir_tstrlen(alarm.szTitle);
+ size_t len = mir_tstrlen(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--;
_tcsncpy(titlebuff, alarm.szTitle, len);
titlebuff[len] = 0;
_tcscat(titlebuff, _T("..."));
- GetTextExtentPoint32(dis->hDC,titlebuff,mir_tstrlen(titlebuff),&textSize);
+ GetTextExtentPoint32(dis->hDC,titlebuff,(int)mir_tstrlen(titlebuff),&textSize);
}
- TextOut(dis->hDC,dis->rcItem.left + 16 + 4,(dis->rcItem.top + dis->rcItem.bottom - textSize.cy)>>1,titlebuff,mir_tstrlen(titlebuff));
- TextOut(dis->hDC,dis->rcItem.right - timeSize.cx - 2,(dis->rcItem.top + dis->rcItem.bottom - timeSize.cy)>>1, buff,mir_tstrlen(buff));
+ 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));
}
else {
- TextOut(dis->hDC,dis->rcItem.left + 16 + 4,(dis->rcItem.top + dis->rcItem.bottom - textSize.cy)>>1,alarm.szTitle,mir_tstrlen(alarm.szTitle));
- TextOut(dis->hDC,dis->rcItem.right - timeSize.cx - 2,(dis->rcItem.top + dis->rcItem.bottom - timeSize.cy)>>1, buff,mir_tstrlen(buff));
+ 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));
}
SetBkMode(dis->hDC, OPAQUE);
|