summaryrefslogtreecommitdiff
path: root/plugins/TooltipNotify/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TooltipNotify/src')
-rw-r--r--plugins/TooltipNotify/src/TooltipNotify.cpp6
-rw-r--r--plugins/TooltipNotify/src/TooltipNotify.h2
-rw-r--r--plugins/TooltipNotify/src/Utils.cpp9
-rw-r--r--plugins/TooltipNotify/src/Utils.h2
-rw-r--r--plugins/TooltipNotify/src/stdafx.h2
5 files changed, 9 insertions, 12 deletions
diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp
index ac480dc1e6..d21cae65d2 100644
--- a/plugins/TooltipNotify/src/TooltipNotify.cpp
+++ b/plugins/TooltipNotify/src/TooltipNotify.cpp
@@ -727,8 +727,8 @@ BOOL CTooltipNotify::ProtosDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP
lvi.lParam = i;
#ifdef _UNICODE
WCHAR wszProto[128];
- long lLen = MultiByteToWideChar(CP_ACP, 0, ppProtos[i]->szName,
- strlen(ppProtos[i]->szName), wszProto, ARRAY_SIZE(wszProto));
+ long lLen = MultiByteToWideChar(CP_ACP, 0, ppProtos[i]->szName,
+ (int)strlen(ppProtos[i]->szName), wszProto, ARRAY_SIZE(wszProto));
wszProto[lLen] = L'\0';
lvi.pszText = wszProto;
@@ -1009,7 +1009,7 @@ TCHAR *CTooltipNotify::MakeTooltipString(HANDLE hContact, int iStatus, TCHAR *sz
#ifdef _UNICODE
WCHAR wszProto[32];
- long lLen = MultiByteToWideChar(CP_ACP, 0, szProto, strlen(szProto), wszProto, ARRAY_SIZE(wszProto));
+ long lLen = MultiByteToWideChar(CP_ACP, 0, szProto, (int)strlen(szProto), wszProto, ARRAY_SIZE(wszProto));
wszProto[lLen] = _T('\0');
_sntprintf(szString, iBufSize-1, szFormatString, wszProto, _T(": "), szContactName);
diff --git a/plugins/TooltipNotify/src/TooltipNotify.h b/plugins/TooltipNotify/src/TooltipNotify.h
index 5e17597dd6..00ed0bb932 100644
--- a/plugins/TooltipNotify/src/TooltipNotify.h
+++ b/plugins/TooltipNotify/src/TooltipNotify.h
@@ -126,7 +126,7 @@ private:
{
CTooltipNotify::GetObjInstance()->OnTooltipTimer(hwnd, uMsg, idEvent, dwTime);
}
- static BOOL CALLBACK OptionsDlgProcWrapper(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+ static INT_PTR CALLBACK OptionsDlgProcWrapper(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
return CTooltipNotify::GetObjInstance()->OptionsDlgProc(hDlg, msg, wParam, lParam);
}
diff --git a/plugins/TooltipNotify/src/Utils.cpp b/plugins/TooltipNotify/src/Utils.cpp
index ce73dbc59b..67b9b670b6 100644
--- a/plugins/TooltipNotify/src/Utils.cpp
+++ b/plugins/TooltipNotify/src/Utils.cpp
@@ -14,19 +14,16 @@ BOOL IsNt50()
return (bMajorVer>=5 && bMinorVer>=0);
}
-void TruncateWithDots(TCHAR* szString, int iNewLen)
+void TruncateWithDots(TCHAR* szString, size_t iNewLen)
{
assert(iNewLen >= 0);
- int iOrigLen = _tcslen(szString);
- if (iNewLen < iOrigLen)
- {
+ size_t iOrigLen = _tcslen(szString);
+ if (iNewLen < iOrigLen) {
TCHAR* p = szString+iNewLen;
*p = _T('\0');
for(int i=0; --p>=szString && i<3; i++)
- {
*p = _T('.');
- }
}
}
diff --git a/plugins/TooltipNotify/src/Utils.h b/plugins/TooltipNotify/src/Utils.h
index d1ad4d0fe7..7264e4c27c 100644
--- a/plugins/TooltipNotify/src/Utils.h
+++ b/plugins/TooltipNotify/src/Utils.h
@@ -5,4 +5,4 @@
#pragma once
BOOL IsNt50();
-void TruncateWithDots(TCHAR* szString, int iNewLen); \ No newline at end of file
+void TruncateWithDots(TCHAR* szString, size_t iNewLen); \ No newline at end of file
diff --git a/plugins/TooltipNotify/src/stdafx.h b/plugins/TooltipNotify/src/stdafx.h
index d77c5a3037..d00b996556 100644
--- a/plugins/TooltipNotify/src/stdafx.h
+++ b/plugins/TooltipNotify/src/stdafx.h
@@ -5,7 +5,7 @@
#pragma once
-
+#define _CRT_SECURE_NO_WARNINGS
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#define _WIN32_WINNT 0x0500