From 4b01e299223c3fdb05d82ecde0117f88f8caa726 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 2 Dec 2014 22:20:16 +0000 Subject: less warnings git-svn-id: http://svn.miranda-ng.org/main/trunk@11224 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/AddContactPlus/src/addcontact.cpp | 2 +- plugins/Alarms/src/frame.cpp | 16 ++++++++-------- plugins/AutoShutdown/src/frame.cpp | 2 +- plugins/Clist_blind/src/clcpaint.cpp | 16 ++++++++-------- plugins/Clist_modern/src/modern_clui.cpp | 2 +- plugins/Clist_modern/src/modern_statusbar.cpp | 24 ++++++++++++------------ plugins/Clist_nicer/src/CLCButton.cpp | 2 +- plugins/Clist_nicer/src/clcpaint.cpp | 16 ++++++++-------- plugins/Clist_nicer/src/clcutils.cpp | 8 ++++---- plugins/Clist_nicer/src/clui.cpp | 8 ++++---- plugins/Clist_nicer/src/cluiservices.cpp | 4 ++-- plugins/FavContacts/src/menu.cpp | 12 ++++++------ plugins/FloatingContacts/src/bitmap_funcs.cpp | 2 +- plugins/FloatingContacts/src/thumbs.cpp | 4 ++-- plugins/NewAwaySysMod/src/GroupCheckbox.cpp | 4 ++-- plugins/Ping/src/pingthread.cpp | 12 ++++++------ plugins/SendScreenshotPlus/src/dlg_msgbox.cpp | 2 +- plugins/SplashScreen/src/bitmap_funcs.cpp | 2 +- plugins/TooltipNotify/src/Tooltip.cpp | 2 +- plugins/UserInfoEx/src/dlg_msgbox.cpp | 2 +- plugins/UserInfoEx/src/psp_profile.cpp | 2 +- plugins/WhenWasIt/src/dlg_handlers.cpp | 2 +- 22 files changed, 73 insertions(+), 73 deletions(-) (limited to 'plugins') diff --git a/plugins/AddContactPlus/src/addcontact.cpp b/plugins/AddContactPlus/src/addcontact.cpp index caa45fcaca..370e1373f7 100644 --- a/plugins/AddContactPlus/src/addcontact.cpp +++ b/plugins/AddContactPlus/src/addcontact.cpp @@ -126,7 +126,7 @@ bool AddContactDlgAccounts(HWND hdlg, AddDialogParam *acs) continue; cbei.pszText = pAccounts[i]->tszAccountName; - GetTextExtentPoint32(hdc, cbei.pszText, mir_tstrlen(cbei.pszText), &textSize); + GetTextExtentPoint32(hdc, cbei.pszText, (int)mir_tstrlen(cbei.pszText), &textSize); if (textSize.cx > cbWidth) cbWidth = textSize.cx; HICON hIcon = (HICON)CallProtoService(pAccounts[i]->szModuleName, PS_LOADICON, PLI_PROTOCOL | PLIF_SMALL, 0); cbei.iImage = cbei.iSelectedImage = ImageList_AddIcon(hIml, hIcon); 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); diff --git a/plugins/AutoShutdown/src/frame.cpp b/plugins/AutoShutdown/src/frame.cpp index d53134bc50..3b1ae22bfe 100644 --- a/plugins/AutoShutdown/src/frame.cpp +++ b/plugins/AutoShutdown/src/frame.cpp @@ -455,7 +455,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwndFrame,UINT msg,WPARAM wParam,LPARA if (hdc != NULL) { if (dat->hFont != NULL) hFontPrev = (HFONT)SelectObject(hdc,dat->hFont); - if (GetTextExtentPoint32(hdc,szOutput,mir_tstrlen(szOutput),&size)) + if (GetTextExtentPoint32(hdc, szOutput, (int)mir_tstrlen(szOutput), &size)) if (size.cx>=(rc.right-rc.left)) dat->flags&=FWPDF_TIMEISCLIPPED; if (dat->hFont != NULL) diff --git a/plugins/Clist_blind/src/clcpaint.cpp b/plugins/Clist_blind/src/clcpaint.cpp index 1026d5d94d..7dbf3b8d05 100644 --- a/plugins/Clist_blind/src/clcpaint.cpp +++ b/plugins/Clist_blind/src/clcpaint.cpp @@ -307,14 +307,14 @@ 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, group->cl.items[group->scanIndex]->szText, mir_tstrlen(group->cl.items[group->scanIndex]->szText), &textSize); + GetTextExtentPoint32(hdcMem, group->cl.items[group->scanIndex]->szText, (int)mir_tstrlen(group->cl.items[group->scanIndex]->szText), &textSize); width = textSize.cx; if (group->cl.items[group->scanIndex]->type == CLCIT_GROUP) { szCounts = pcli->pfnGetGroupCountsText(dat, group->cl.items[group->scanIndex]); if (szCounts[0]) { GetTextExtentPoint32A(hdcMem, " ", 1, &spaceSize); ChangeToFont(hdcMem, dat, FONTID_GROUPCOUNTS, &fontHeight); - GetTextExtentPoint32A(hdcMem, szCounts, mir_strlen(szCounts), &countsSize); + GetTextExtentPoint32A(hdcMem, szCounts, (int)mir_strlen(szCounts), &countsSize); width += spaceSize.cx + countsSize.cx; } } @@ -388,7 +388,7 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint) 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), group->cl.items[group->scanIndex]->szText, - mir_tstrlen(group->cl.items[group->scanIndex]->szText)); + (int)mir_tstrlen(group->cl.items[group->scanIndex]->szText)); rc.left = rc.right + 6 + textSize.cx; rc.right = clRect.right; DrawEdge(hdcMem, &rc, BDR_SUNKENOUTER, BF_RECT); @@ -404,7 +404,7 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint) if (rc.right < rc.left + 4) rc.right = clRect.right + 1; else - TextOutA(hdcMem, rc.right, rc.top + groupCountsFontTopShift, szCounts, mir_strlen(szCounts)); + TextOutA(hdcMem, rc.right, rc.top + groupCountsFontTopShift, szCounts, (int)mir_strlen(szCounts)); ChangeToFont(hdcMem, dat, FONTID_GROUPS, &fontHeight); if (selected) SetTextColor(hdcMem, dat->selTextColour); @@ -412,12 +412,12 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint) SetHotTrackColour(hdcMem, dat); rc.right--; ExtTextOut(hdcMem, rc.left, rc.top, ETO_CLIPPED, &rc, group->cl.items[group->scanIndex]->szText, - mir_tstrlen(group->cl.items[group->scanIndex]->szText), NULL); + (int)mir_tstrlen(group->cl.items[group->scanIndex]->szText), NULL); } else TextOut(hdcMem, dat->leftMargin + indent * dat->groupIndent + checkboxWidth + dat->iconXSpace, - y + ((dat->rowHeight - fontHeight) >> 1), group->cl.items[group->scanIndex]->szText, - mir_tstrlen(group->cl.items[group->scanIndex]->szText)); + y + ((dat->rowHeight - fontHeight) >> 1), group->cl.items[group->scanIndex]->szText, + (int)mir_tstrlen(group->cl.items[group->scanIndex]->szText)); if (dat->exStyle & CLS_EX_LINEWITHGROUPS) { rc.top = y + (dat->rowHeight >> 1); rc.bottom = rc.top + 2; @@ -440,7 +440,7 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint) if (group->cl.items[group->scanIndex]->type != CLCIT_DIVIDER) { TCHAR *szText = group->cl.items[group->scanIndex]->szText; RECT rc; - int qlen = mir_tstrlen(dat->szQuickSearch); + int qlen = (int)mir_tstrlen(dat->szQuickSearch); SetTextColor(hdcMem, dat->quickSearchColour); rc.left = dat->leftMargin + indent * dat->groupIndent + checkboxWidth + dat->iconXSpace; rc.top = y + ((dat->rowHeight - fontHeight) >> 1); diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index 635dd4c997..e82c8e053b 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -2511,7 +2511,7 @@ LRESULT CLUI::OnMeasureItem(UINT msg, WPARAM wParam, LPARAM lParam) HDC hdc = GetDC(m_hWnd); TCHAR *ptszStr = TranslateT("Status"); SIZE textSize; - GetTextExtentPoint32(hdc, ptszStr, mir_tstrlen(ptszStr), &textSize); + GetTextExtentPoint32(hdc, ptszStr, (int)mir_tstrlen(ptszStr), &textSize); pmis->itemWidth = textSize.cx; pmis->itemHeight = 0; ReleaseDC(m_hWnd, hdc); diff --git a/plugins/Clist_modern/src/modern_statusbar.cpp b/plugins/Clist_modern/src/modern_statusbar.cpp index e381ec59e7..bf6a41ba6f 100644 --- a/plugins/Clist_modern/src/modern_statusbar.cpp +++ b/plugins/Clist_modern/src/modern_statusbar.cpp @@ -374,22 +374,22 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) SIZE textSize; if (p.bShowProtoName) { - GetTextExtentPoint32(hDC, p.tszProtoHumanName, mir_tstrlen(p.tszProtoHumanName), &textSize); + GetTextExtentPoint32(hDC, p.tszProtoHumanName, (int)mir_tstrlen(p.tszProtoHumanName), &textSize); w += textSize.cx + 3 + spaceWidth; } if (p.bShowProtoEmails && p.szProtoEMailCount) { - GetTextExtentPoint32A(hDC, p.szProtoEMailCount, mir_strlen(p.szProtoEMailCount), &textSize); + GetTextExtentPoint32A(hDC, p.szProtoEMailCount, (int)mir_strlen(p.szProtoEMailCount), &textSize); w += textSize.cx + 3 + spaceWidth; } if (p.bShowStatusName) { - GetTextExtentPoint32(hDC, p.tszProtoStatusText, mir_tstrlen(p.tszProtoStatusText), &textSize); + GetTextExtentPoint32(hDC, p.tszProtoStatusText, (int)mir_tstrlen(p.tszProtoStatusText), &textSize); w += textSize.cx + 3 + spaceWidth; } if ((p.xStatusMode & 8) && p.tszProtoXStatus) { - GetTextExtentPoint32(hDC, p.tszProtoXStatus, mir_tstrlen(p.tszProtoXStatus), &textSize); + GetTextExtentPoint32(hDC, p.tszProtoXStatus, (int)mir_tstrlen(p.tszProtoXStatus), &textSize); w += textSize.cx + 3 + spaceWidth; } @@ -530,10 +530,10 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) RECT rt = r; rt.left = x + (spaceWidth >> 1); rt.top = textY; - ske_DrawText(hDC, p.tszProtoHumanName, mir_tstrlen(p.tszProtoHumanName), &rt, 0); + ske_DrawText(hDC, p.tszProtoHumanName, (int)mir_tstrlen(p.tszProtoHumanName), &rt, 0); if ((p.bShowProtoEmails && p.szProtoEMailCount != NULL) || p.bShowStatusName || ((p.xStatusMode & 8) && p.tszProtoXStatus)) { - GetTextExtentPoint32(hDC, p.tszProtoHumanName, mir_tstrlen(p.tszProtoHumanName), &textSize); + GetTextExtentPoint32(hDC, p.tszProtoHumanName, (int)mir_tstrlen(p.tszProtoHumanName), &textSize); x += textSize.cx + 3; } } @@ -543,9 +543,9 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) RECT rt = r; rt.left = x + (spaceWidth >> 1); rt.top = textY; - ske_DrawTextA(hDC, p.szProtoEMailCount, mir_strlen(p.szProtoEMailCount), &rt, 0); + ske_DrawTextA(hDC, p.szProtoEMailCount, (int)mir_strlen(p.szProtoEMailCount), &rt, 0); if (p.bShowStatusName || ((p.xStatusMode & 8) && p.tszProtoXStatus)) { - GetTextExtentPoint32A(hDC, p.szProtoEMailCount, mir_strlen(p.szProtoEMailCount), &textSize); + GetTextExtentPoint32A(hDC, p.szProtoEMailCount, (int)mir_strlen(p.szProtoEMailCount), &textSize); x += textSize.cx + 3; } } @@ -555,9 +555,9 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) RECT rt = r; rt.left = x + (spaceWidth >> 1); rt.top = textY; - ske_DrawText(hDC, p.tszProtoStatusText, mir_tstrlen(p.tszProtoStatusText), &rt, 0); + ske_DrawText(hDC, p.tszProtoStatusText, (int)mir_tstrlen(p.tszProtoStatusText), &rt, 0); if (((p.xStatusMode & 8) && p.tszProtoXStatus)) { - GetTextExtentPoint32(hDC, p.tszProtoStatusText, mir_tstrlen(p.tszProtoStatusText), &textSize); + GetTextExtentPoint32(hDC, p.tszProtoStatusText, (int)mir_tstrlen(p.tszProtoStatusText), &textSize); x += textSize.cx + 3; } } @@ -566,7 +566,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) RECT rt = r; rt.left = x + (spaceWidth >> 1); rt.top = textY; - ske_DrawText(hDC, p.tszProtoXStatus, mir_tstrlen(p.tszProtoXStatus), &rt, 0); + ske_DrawText(hDC, p.tszProtoXStatus, (int)mir_tstrlen(p.tszProtoXStatus), &rt, 0); } p.protoRect = r; @@ -828,7 +828,7 @@ LRESULT CALLBACK ModernStatusProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa char *pos = strstri(g_CluiData.protoFilter, p.szAccountName); if (pos) { // remove filter - int len = strlen(protoF); + size_t len = strlen(protoF); memmove(pos, pos + len, strlen(pos + len) + 1); if (strlen(g_CluiData.protoFilter) == 0) diff --git a/plugins/Clist_nicer/src/CLCButton.cpp b/plugins/Clist_nicer/src/CLCButton.cpp index 79cf53b26a..3bf670e9de 100644 --- a/plugins/Clist_nicer/src/CLCButton.cpp +++ b/plugins/Clist_nicer/src/CLCButton.cpp @@ -328,7 +328,7 @@ static void PaintWorker(MButtonExtension *ctl, HDC hdcPaint) ctl->sLabel.cx = ctl->sLabel.cy = 0; } else { - GetTextExtentPoint32(hdcMem, ctl->szText, mir_tstrlen(ctl->szText), &ctl->sLabel); + GetTextExtentPoint32(hdcMem, ctl->szText, (int)mir_tstrlen(ctl->szText), &ctl->sLabel); if (g_cxsmIcon + ctl->sLabel.cx + 8 > rcClient.right - rcClient.left) ctl->sLabel.cx = (rcClient.right - rcClient.left) - g_cxsmIcon - 8; diff --git a/plugins/Clist_nicer/src/clcpaint.cpp b/plugins/Clist_nicer/src/clcpaint.cpp index 866827d377..0c2ec8590b 100644 --- a/plugins/Clist_nicer/src/clcpaint.cpp +++ b/plugins/Clist_nicer/src/clcpaint.cpp @@ -494,7 +494,7 @@ set_bg_l: } else if (type == CLCIT_DIVIDER) { ChangeToFont(hdcMem, dat, FONTID_DIVIDERS, &fontHeight); - GetTextExtentPoint32(hdcMem, contact->szText, mir_tstrlen(contact->szText), &textSize); + GetTextExtentPoint32(hdcMem, contact->szText, (int)mir_tstrlen(contact->szText), &textSize); } else if (type == CLCIT_CONTACT && flags & CONTACTF_NOTONLIST) ChangeToFont(hdcMem, dat, FONTID_NOTONLIST, &fontHeight); @@ -509,13 +509,13 @@ set_bg_l: ChangeToFont(hdcMem, dat, FONTID_CONTACTS, &fontHeight); if (type == CLCIT_GROUP) { - GetTextExtentPoint32(hdcMem, contact->szText, mir_tstrlen(contact->szText), &textSize); + GetTextExtentPoint32(hdcMem, contact->szText, (int)mir_tstrlen(contact->szText), &textSize); width = textSize.cx; szCounts = pcli->pfnGetGroupCountsText(dat, contact); if (szCounts[0]) { GetTextExtentPoint32(hdcMem, _T(" "), 1, &spaceSize); ChangeToFont(hdcMem, dat, FONTID_GROUPCOUNTS, &fontHeight); - GetTextExtentPoint32A(hdcMem, szCounts, mir_strlen(szCounts), &countsSize); + GetTextExtentPoint32A(hdcMem, szCounts, (int)mir_strlen(szCounts), &countsSize); width += spaceSize.cx + countsSize.cx; } } @@ -977,7 +977,7 @@ bgskipped: rc.left = rcContent.left; rc.right = rc.left - dat->rightMargin + ((clRect->right - rc.left - textSize.cx) >> 1) - 3; DrawEdge(hdcMem, &rc, BDR_SUNKENOUTER, BF_RECT); - TextOut(hdcMem, rc.right + 3, y + ((rowHeight - fontHeight) >> 1), contact->szText, mir_tstrlen(contact->szText)); + TextOut(hdcMem, rc.right + 3, y + ((rowHeight - fontHeight) >> 1), contact->szText, (int)mir_tstrlen(contact->szText)); rc.left = rc.right + 6 + textSize.cx; rc.right = clRect->right - dat->rightMargin; DrawEdge(hdcMem, &rc, BDR_SUNKENOUTER, BF_RECT); @@ -1012,7 +1012,7 @@ bgskipped: if (g_center) offset = ((rc.right - rc.left) - labelWidth) / 2; - TextOutA(hdcMem, rc.left + offset + textSize.cx + spaceSize.cx, rc.top + groupCountsFontTopShift, szCounts, mir_strlen(szCounts)); + TextOutA(hdcMem, rc.left + offset + textSize.cx + spaceSize.cx, rc.top + groupCountsFontTopShift, szCounts, (int)mir_strlen(szCounts)); rightLineStart = rc.left + offset + textSize.cx + spaceSize.cx + countsSize.cx + 2; if (selected && !g_ignoreselforgroups) @@ -1121,7 +1121,7 @@ bgskipped: COLORREF oldColor = GetTextColor(hdcMem); int idOldFont = dat->currentFontID; ChangeToFont(hdcMem, dat, FONTID_TIMESTAMP, &fHeight); - GetTextExtentPoint32(hdcMem, szResult, mir_tstrlen(szResult), &szTime); + GetTextExtentPoint32(hdcMem, szResult, (int)mir_tstrlen(szResult), &szTime); verticalfit = (rowHeight - fHeight >= g_cysmIcon+1); if (av_right) { @@ -1203,7 +1203,7 @@ nodisplay: LONG rightIconsTop = rcContent.bottom - g_cysmIcon; LONG old_right = rcContent.right; ULONG textCounter = 0; - ULONG ulLen = mir_tstrlen(szText); + size_t ulLen = mir_tstrlen(szText); LONG old_bottom = rcContent.bottom; DWORD i_dtFlags = DT_WORDBREAK | DT_NOPREFIX | dt_2ndrowflags; dtp.cbSize = sizeof(dtp); @@ -1229,7 +1229,7 @@ nodisplay: if (type != CLCIT_DIVIDER) { TCHAR *szText = contact->szText; RECT rc; - int qlen = mir_tstrlen(dat->szQuickSearch); + int qlen = (int)mir_tstrlen(dat->szQuickSearch); if (hPreviousFont) SelectObject(hdcMem, hPreviousFont); SetTextColor(hdcMem, dat->quickSearchColour); diff --git a/plugins/Clist_nicer/src/clcutils.cpp b/plugins/Clist_nicer/src/clcutils.cpp index f8026b4d2e..4f90f28bdf 100644 --- a/plugins/Clist_nicer/src/clcutils.cpp +++ b/plugins/Clist_nicer/src/clcutils.cpp @@ -164,7 +164,7 @@ int RTL_HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact hFont = reinterpret_cast(SelectObject(hdc, dat->fontInfo[FONTID_GROUPS].hFont)); else hFont = reinterpret_cast(SelectObject(hdc, dat->fontInfo[FONTID_CONTACTS].hFont)); - GetTextExtentPoint32(hdc, hitcontact->szText, mir_tstrlen(hitcontact->szText), &textSize); + GetTextExtentPoint32(hdc, hitcontact->szText, (int)mir_tstrlen(hitcontact->szText), &textSize); width = textSize.cx; if (hitcontact->type == CLCIT_GROUP) { char *szCounts; @@ -173,7 +173,7 @@ int RTL_HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact GetTextExtentPoint32A(hdc, " ", 1, &textSize); width += textSize.cx; SelectObject(hdc, dat->fontInfo[FONTID_GROUPCOUNTS].hFont); - GetTextExtentPoint32A(hdc, szCounts, mir_strlen(szCounts), &textSize); + GetTextExtentPoint32A(hdc, szCounts, (int)mir_strlen(szCounts), &textSize); width += textSize.cx; } } @@ -305,7 +305,7 @@ int HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact **c hFont = reinterpret_cast(SelectObject(hdc, dat->fontInfo[FONTID_GROUPS].hFont)); else hFont = reinterpret_cast(SelectObject(hdc, dat->fontInfo[FONTID_CONTACTS].hFont)); - GetTextExtentPoint32(hdc, hitcontact->szText, mir_tstrlen(hitcontact->szText), &textSize); + GetTextExtentPoint32(hdc, hitcontact->szText, (int)mir_tstrlen(hitcontact->szText), &textSize); width = textSize.cx; if (hitcontact->type == CLCIT_GROUP) { char *szCounts; @@ -314,7 +314,7 @@ int HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact **c GetTextExtentPoint32A(hdc, " ", 1, &textSize); width += textSize.cx; SelectObject(hdc, dat->fontInfo[FONTID_GROUPCOUNTS].hFont); - GetTextExtentPoint32A(hdc, szCounts, mir_strlen(szCounts), &textSize); + GetTextExtentPoint32A(hdc, szCounts, (int)mir_strlen(szCounts), &textSize); width += textSize.cx; } } diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index 593b765869..9db9a3bfa1 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -1773,14 +1773,14 @@ buttons_done: if (mir_tstrlen(szName) < sizeof(szName) - 1) mir_tstrcat(szName, _T(" ")); - GetTextExtentPoint32(dis->hDC, szName, mir_tstrlen(szName), &textSize); - TextOut(dis->hDC, x, (dis->rcItem.top + dis->rcItem.bottom - textSize.cy) >> 1, szName, mir_tstrlen(szName)); + GetTextExtentPoint32(dis->hDC, szName, (int)mir_tstrlen(szName), &textSize); + TextOut(dis->hDC, x, (dis->rcItem.top + dis->rcItem.bottom - textSize.cy) >> 1, szName, (int)mir_tstrlen(szName)); x += textSize.cx; } if (showOpts & 4) { TCHAR *szStatus = pcli->pfnGetStatusModeDescription(status, 0); - GetTextExtentPoint32(dis->hDC, szStatus, mir_tstrlen(szStatus), &textSize); - TextOut(dis->hDC, x, (dis->rcItem.top + dis->rcItem.bottom - textSize.cy) >> 1, szStatus, mir_tstrlen(szStatus)); + GetTextExtentPoint32(dis->hDC, szStatus, (int)mir_tstrlen(szStatus), &textSize); + TextOut(dis->hDC, x, (dis->rcItem.top + dis->rcItem.bottom - textSize.cy) >> 1, szStatus, (int)mir_tstrlen(szStatus)); } } else if (dis->CtlType == ODT_MENU) { diff --git a/plugins/Clist_nicer/src/cluiservices.cpp b/plugins/Clist_nicer/src/cluiservices.cpp index d7ed5ed41c..832a308d4f 100644 --- a/plugins/Clist_nicer/src/cluiservices.cpp +++ b/plugins/Clist_nicer/src/cluiservices.cpp @@ -144,12 +144,12 @@ void CluiProtocolStatusChanged( int parStatus, const char* szProto ) szName[ SIZEOF(szName)-1 ] = 0; if (( showOpts & 4 ) && mir_tstrlen(szName) < sizeof(szName)-1 ) mir_tstrcat( szName, _T(" ")); - GetTextExtentPoint32( hdc, szName, mir_tstrlen(szName), &textSize ); + GetTextExtentPoint32( hdc, szName, (int)mir_tstrlen(szName), &textSize ); x += textSize.cx + GetSystemMetrics(SM_CXBORDER) * 4; // The SB panel doesnt allocate enough room } if (showOpts & 4) { TCHAR* modeDescr = pcli->pfnGetStatusModeDescription( CallProtoService(accs[i]->szModuleName,PS_GETSTATUS,0,0 ), 0 ); - GetTextExtentPoint32(hdc, modeDescr, mir_tstrlen(modeDescr), &textSize ); + GetTextExtentPoint32(hdc, modeDescr, (int)mir_tstrlen(modeDescr), &textSize ); x += textSize.cx + GetSystemMetrics(SM_CXBORDER) * 4; // The SB panel doesnt allocate enough room } partWidths[partCount]=(partCount?partWidths[partCount-1]:cfg::dat.bCLeft)+ x + 2; diff --git a/plugins/FavContacts/src/menu.cpp b/plugins/FavContacts/src/menu.cpp index b23259b3e4..56c0c5992d 100644 --- a/plugins/FavContacts/src/menu.cpp +++ b/plugins/FavContacts/src/menu.cpp @@ -47,7 +47,7 @@ static BOOL sttMeasureItem_Group(LPMEASUREITEMSTRUCT lpmis, Options *options) SelectObject(hdc, g_Options.hfntName); SIZE sz; - GetTextExtentPoint32(hdc, name, mir_tstrlen(name), &sz); + GetTextExtentPoint32(hdc, name, (int)mir_tstrlen(name), &sz); lpmis->itemHeight = sz.cy + 8; lpmis->itemWidth = sz.cx + 10; SelectObject(hdc, hfntSave); @@ -81,7 +81,7 @@ static BOOL sttMeasureItem_Contact(LPMEASUREITEMSTRUCT lpmis, Options *options) if (!options->bSysColors) SelectObject(hdc, g_Options.hfntSecond); - GetTextExtentPoint32(hdc, title, mir_tstrlen(title), &sz); + GetTextExtentPoint32(hdc, title, (int)mir_tstrlen(title), &sz); textWidth = sz.cx; lpmis->itemHeight += sz.cy + 3; @@ -92,7 +92,7 @@ static BOOL sttMeasureItem_Contact(LPMEASUREITEMSTRUCT lpmis, Options *options) TCHAR *name = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR); if (!options->bSysColors) SelectObject(hdc, g_Options.hfntName); - GetTextExtentPoint32(hdc, name, mir_tstrlen(name), &sz); + GetTextExtentPoint32(hdc, name, (int)mir_tstrlen(name), &sz); textWidth = max(textWidth, sz.cx); SelectObject(hdc, hfntSave); @@ -309,7 +309,7 @@ static BOOL sttDrawItem_Contact(LPDRAWITEMSTRUCT lpdis, Options *options = NULL) DrawText(hdcTemp, name, -1, &lpdis->rcItem, DT_NOPREFIX | DT_SINGLELINE | DT_TOP | DT_LEFT); SIZE sz; - GetTextExtentPoint32(hdcTemp, name, mir_tstrlen(name), &sz); + GetTextExtentPoint32(hdcTemp, name, (int)mir_tstrlen(name), &sz); lpdis->rcItem.top += sz.cy + 3; } @@ -390,8 +390,8 @@ static LRESULT CALLBACK MenuHostWndProc(HWND hwnd, UINT message, WPARAM wParam, RemoveMenu((HMENU)lParam, 1, MF_BYPOSITION); if (LOWORD(wParam) == VK_BACK) { - if (int l = mir_tstrlen(g_filter)) - g_filter[l - 1] = 0; + if (size_t l = mir_tstrlen(g_filter)) + g_filter[l-1] = 0; } else if (_istalnum(LOWORD(wParam))) { if (mir_tstrlen(g_filter) < SIZEOF(g_filter) - 1) { diff --git a/plugins/FloatingContacts/src/bitmap_funcs.cpp b/plugins/FloatingContacts/src/bitmap_funcs.cpp index 41b1b695cb..d8709fed3b 100644 --- a/plugins/FloatingContacts/src/bitmap_funcs.cpp +++ b/plugins/FloatingContacts/src/bitmap_funcs.cpp @@ -789,7 +789,7 @@ void MyBitmap::DrawIcon(HICON hic, int x, int y, int w, int h) //slightly modified and integrated to MyBitmap class void MyBitmap::DrawText(TCHAR *str, int x, int y, int blur, int strength) { - SIZE sz; GetTextExtentPoint32(this->getDC(), str, mir_tstrlen(str), &sz); + SIZE sz; GetTextExtentPoint32(this->getDC(), str, (int)mir_tstrlen(str), &sz); sz.cx += (blur+2)*2; sz.cy += (blur+2)*2; x -= blur+2; y -= blur+2; diff --git a/plugins/FloatingContacts/src/thumbs.cpp b/plugins/FloatingContacts/src/thumbs.cpp index a376d06838..93f74fcad1 100644 --- a/plugins/FloatingContacts/src/thumbs.cpp +++ b/plugins/FloatingContacts/src/thumbs.cpp @@ -287,7 +287,7 @@ void ThumbInfo::ResizeThumb() hOldFont = (HFONT)SelectObject( hdc, hFont[ index ] ); // Get text and icon sizes - GetTextExtentPoint32( hdc, ptszName, (DWORD)_tcslen(ptszName), &sizeText); + GetTextExtentPoint32( hdc, ptszName, (int)_tcslen(ptszName), &sizeText); SelectObject( hdc, hOldFont ); @@ -652,7 +652,7 @@ void ThumbInfo::UpdateContent() hOldFont = (HFONT)SelectObject(hdcDraw, hFont[index]); SIZE szText; - GetTextExtentPoint32(hdcDraw, ptszName, (DWORD)_tcslen(ptszName), &szText); + GetTextExtentPoint32(hdcDraw, ptszName, (int)_tcslen(ptszName), &szText); SetTextColor(hdcDraw, bkColor); // simple border diff --git a/plugins/NewAwaySysMod/src/GroupCheckbox.cpp b/plugins/NewAwaySysMod/src/GroupCheckbox.cpp index 040b566c94..fed51eb888 100644 --- a/plugins/NewAwaySysMod/src/GroupCheckbox.cpp +++ b/plugins/NewAwaySysMod/src/GroupCheckbox.cpp @@ -97,7 +97,7 @@ static int CALLBACK CheckboxWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM l SIZE size; TCHAR *szText = (TCHAR*)malloc(Len * sizeof(TCHAR)); GetWindowText(hWnd, szText, Len); - GetTextExtentPoint32(hdc, szText, mir_tstrlen(szText), &size); + GetTextExtentPoint32(hdc, szText, (int)mir_tstrlen(szText), &size); free(szText); rcText.right = size.cx; rcText.bottom = size.cy; @@ -292,7 +292,7 @@ static int CALLBACK CheckboxWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM l GetThemeTextExtent(hTheme, hdcMem, BP_GROUPBOX, IsWindowEnabled(hWnd) ? GBS_NORMAL : GBS_DISABLED, szTextT, -1, DT_CALCRECT | DT_LEFT | DT_VCENTER | DT_SINGLELINE, 0, &rcText); else { SIZE size; - GetTextExtentPoint32(hdcMem, szTextT, mir_tstrlen(szTextT), &size); + GetTextExtentPoint32(hdcMem, szTextT, (int)mir_tstrlen(szTextT), &size); rcText.right = size.cx; rcText.bottom = size.cy; } diff --git a/plugins/Ping/src/pingthread.cpp b/plugins/Ping/src/pingthread.cpp index 4f4a9fee28..1bea794431 100644 --- a/plugins/Ping/src/pingthread.cpp +++ b/plugins/Ping/src/pingthread.cpp @@ -411,19 +411,19 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar //DrawIconEx(dis->hDC,dis->rcItem.left,(dis->rcItem.top + dis->rcItem.bottom - GetSystemMetrics(SM_CYSMICON))>>1,hIcon,0, 0, 0, NULL, DI_NORMAL); DrawIconEx(dis->hDC,dis->rcItem.left,dis->rcItem.top + ((options.row_height - 16)>>1),hIcon,0, 0, 0, NULL, DI_NORMAL); - GetTextExtentPoint32(dis->hDC,itemData.pszLabel,mir_tstrlen(itemData.pszLabel),&textSize); - TextOut(dis->hDC,dis->rcItem.left + 16 + 4,(dis->rcItem.top + dis->rcItem.bottom - textSize.cy)>>1,itemData.pszLabel,mir_tstrlen(itemData.pszLabel)); + GetTextExtentPoint32(dis->hDC, itemData.pszLabel, (int)mir_tstrlen(itemData.pszLabel),&textSize); + TextOut(dis->hDC,dis->rcItem.left + 16 + 4,(dis->rcItem.top + dis->rcItem.bottom - textSize.cy)>>1,itemData.pszLabel,(int)mir_tstrlen(itemData.pszLabel)); if(itemData.status != PS_DISABLED) { TCHAR buf[256]; if(itemData.responding) { mir_sntprintf(buf, 256, TranslateT("%d ms"), itemData.round_trip_time); - GetTextExtentPoint32(dis->hDC,buf,mir_tstrlen(buf),&textSize); - TextOut(dis->hDC,dis->rcItem.right - textSize.cx - 2,(dis->rcItem.top + dis->rcItem.bottom -textSize.cy)>>1,buf,mir_tstrlen(buf)); + GetTextExtentPoint32(dis->hDC, buf, (int)mir_tstrlen(buf), &textSize); + TextOut(dis->hDC,dis->rcItem.right - textSize.cx - 2,(dis->rcItem.top + dis->rcItem.bottom -textSize.cy)>>1,buf,(int)mir_tstrlen(buf)); } else if(itemData.miss_count > 0) { mir_sntprintf(buf, 256, _T("[%d]"), itemData.miss_count); - GetTextExtentPoint32(dis->hDC,buf,mir_tstrlen(buf),&textSize); - TextOut(dis->hDC,dis->rcItem.right - textSize.cx - 2,(dis->rcItem.top + dis->rcItem.bottom -textSize.cy)>>1,buf,mir_tstrlen(buf)); + GetTextExtentPoint32(dis->hDC, buf, (int)mir_tstrlen(buf), &textSize); + TextOut(dis->hDC,dis->rcItem.right - textSize.cx - 2,(dis->rcItem.top + dis->rcItem.bottom -textSize.cy)>>1,buf,(int)mir_tstrlen(buf)); } } SetBkMode(dis->hDC, OPAQUE); diff --git a/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp b/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp index 68fd332cce..2014dfb8d5 100644 --- a/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp +++ b/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp @@ -238,7 +238,7 @@ static INT_PTR CALLBACK MsgBoxProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l for (rs = h = pMsgBox->ptszMsg, txtHeight = 0, txtWidth = 0; h; ++h) { if (*h == '\n' || *h == '\0') { - GetTextExtentPoint32(hDC, rs, h - rs, &ts); + GetTextExtentPoint32(hDC, rs, int(h - rs), &ts); if (ts.cx > txtWidth) txtWidth = ts.cx; diff --git a/plugins/SplashScreen/src/bitmap_funcs.cpp b/plugins/SplashScreen/src/bitmap_funcs.cpp index b01a2aec2e..e7498e3cc6 100644 --- a/plugins/SplashScreen/src/bitmap_funcs.cpp +++ b/plugins/SplashScreen/src/bitmap_funcs.cpp @@ -162,7 +162,7 @@ void MyBitmap::Blend(MyBitmap *bmp, int x, int y, int w, int h) void MyBitmap::DrawText(TCHAR *str, int x, int y) { - SIZE sz; GetTextExtentPoint32(this->getDC(), str, mir_tstrlen(str), &sz); + SIZE sz; GetTextExtentPoint32(this->getDC(), str, (int)mir_tstrlen(str), &sz); RECT rc; SetRect(&rc, x, y, x+10000, y+10000); this->saveAlpha(x-2,y-2,sz.cx+2,sz.cy+2); ::DrawText(this->getDC(), str, -1, &rc, DT_LEFT | DT_TOP | DT_SINGLELINE | DT_NOPREFIX); diff --git a/plugins/TooltipNotify/src/Tooltip.cpp b/plugins/TooltipNotify/src/Tooltip.cpp index 0ce9ce6d59..8891a3dd21 100644 --- a/plugins/TooltipNotify/src/Tooltip.cpp +++ b/plugins/TooltipNotify/src/Tooltip.cpp @@ -147,7 +147,7 @@ void CTooltip::Validate() SIZE Size; HDC hDC = GetDC(m_hWnd); SelectObject(hDC, m_hFont); - GetTextExtentPoint32(hDC, m_szText, mir_tstrlen(m_szText), &Size); + GetTextExtentPoint32(hDC, m_szText, (int)mir_tstrlen(m_szText), &Size); SetWindowPos(m_hWnd, 0, 0, 0, Size.cx+6, Size.cy+4, SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOREDRAW); ReleaseDC(m_hWnd, hDC); diff --git a/plugins/UserInfoEx/src/dlg_msgbox.cpp b/plugins/UserInfoEx/src/dlg_msgbox.cpp index feb3ff0beb..00deffc909 100644 --- a/plugins/UserInfoEx/src/dlg_msgbox.cpp +++ b/plugins/UserInfoEx/src/dlg_msgbox.cpp @@ -237,7 +237,7 @@ static INT_PTR CALLBACK MsgBoxProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l for (rs = h = pMsgBox->ptszMsg, txtHeight = 0, txtWidth = 0; h; h++) { if (*h == '\n' || *h == '\0') { - GetTextExtentPoint32(hDC, rs, h - rs, &ts); + GetTextExtentPoint32(hDC, rs, int(h - rs), &ts); if (ts.cx > txtWidth) txtWidth = ts.cx; diff --git a/plugins/UserInfoEx/src/psp_profile.cpp b/plugins/UserInfoEx/src/psp_profile.cpp index 4931695c6a..d8267f28bc 100644 --- a/plugins/UserInfoEx/src/psp_profile.cpp +++ b/plugins/UserInfoEx/src/psp_profile.cpp @@ -826,7 +826,7 @@ static LRESULT CALLBACK ProfileList_SubclassProc(HWND hwnd, UINT msg, WPARAM wPa // calculate size of text on the screen if ((hDC = GetDC(GetParent(hwnd)))) { SelectObject(hDC, (HFONT)SendMessage(GetParent(hwnd), WM_GETFONT, NULL, NULL)); - GetTextExtentPoint32(hDC, pItem->pszText[hi.iSubItem], mir_tstrlen(pItem->pszText[hi.iSubItem]), &textSize); + GetTextExtentPoint32(hDC, pItem->pszText[hi.iSubItem], (int)mir_tstrlen(pItem->pszText[hi.iSubItem]), &textSize); ReleaseDC(GetParent(hwnd), hDC); } // show tip only for text that is larger than te listview can display diff --git a/plugins/WhenWasIt/src/dlg_handlers.cpp b/plugins/WhenWasIt/src/dlg_handlers.cpp index bba0131142..86f7f2bbbf 100644 --- a/plugins/WhenWasIt/src/dlg_handlers.cpp +++ b/plugins/WhenWasIt/src/dlg_handlers.cpp @@ -124,7 +124,7 @@ SIZE GetControlTextSize(HWND hCtrl) TCHAR buffer[maxSize]; SIZE size; GetWindowText(hCtrl, buffer, SIZEOF(buffer)); - GetTextExtentPoint32(hDC, buffer, (int) _tcslen(buffer), &size); + GetTextExtentPoint32(hDC, buffer, (int)_tcslen(buffer), &size); SelectObject(hDC, oldFont); ReleaseDC(hCtrl, hDC); return size; -- cgit v1.2.3