summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-08-27 15:15:33 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-08-27 15:15:33 +0000
commitd6eee2018898f2442883a0aa77ad095b75572cfb (patch)
tree8fbfe32690b9b32e5d47b1958a02f6f6a5fbf000 /src
parent2d37d969153b5fad810984182f747755c1cbc616 (diff)
fix for 64-bit issues & warnings
git-svn-id: http://svn.miranda-ng.org/main/trunk@15043 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r--src/core/stdmsg/src/globals.cpp2
-rw-r--r--src/core/stduserinfo/src/userinfo.cpp7
-rw-r--r--src/mir_app/src/DefaultExtraIcons.cpp4
-rw-r--r--src/mir_app/src/chat_manager.cpp6
-rw-r--r--src/mir_app/src/chat_svc.cpp2
-rw-r--r--src/mir_app/src/clcutils.cpp33
-rw-r--r--src/mir_app/src/clistmod.cpp37
-rw-r--r--src/mir_app/src/clisttray.cpp2
-rw-r--r--src/mir_app/src/clui.cpp6
-rw-r--r--src/mir_app/src/extraicons.cpp8
-rw-r--r--src/mir_app/src/menu_clist.cpp2
-rw-r--r--src/mir_app/src/meta_services.cpp4
-rw-r--r--src/mir_app/src/options.cpp2
-rw-r--r--src/mir_app/src/skinicons.cpp2
14 files changed, 57 insertions, 60 deletions
diff --git a/src/core/stdmsg/src/globals.cpp b/src/core/stdmsg/src/globals.cpp
index 96c0739145..ceeac8cc98 100644
--- a/src/core/stdmsg/src/globals.cpp
+++ b/src/core/stdmsg/src/globals.cpp
@@ -77,7 +77,7 @@ static int ackevent(WPARAM, LPARAM lParam)
{
ACKDATA *pAck = (ACKDATA *)lParam;
if (pAck && pAck->type == ACKTYPE_MESSAGE) {
- msgQueue_processack(pAck->hContact, (int)pAck->hProcess, pAck->result == ACKRESULT_SUCCESS, (char*)pAck->lParam);
+ msgQueue_processack(pAck->hContact, (INT_PTR)pAck->hProcess, pAck->result == ACKRESULT_SUCCESS, (char*)pAck->lParam);
if (pAck->result == ACKRESULT_SUCCESS)
SkinPlaySound("SendMsg");
diff --git a/src/core/stduserinfo/src/userinfo.cpp b/src/core/stduserinfo/src/userinfo.cpp
index da47d1f538..4ca8f3332d 100644
--- a/src/core/stduserinfo/src/userinfo.cpp
+++ b/src/core/stduserinfo/src/userinfo.cpp
@@ -243,7 +243,7 @@ static INT_PTR CALLBACK DlgProcDetails(HWND hwndDlg, UINT msg, WPARAM wParam, LP
PROPSHEETHEADER *psh = (PROPSHEETHEADER*)lParam;
dat = (DetailsData*)mir_calloc(sizeof(DetailsData));
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat);
- dat->hContact = (MCONTACT)psh->pszCaption;
+ dat->hContact = (UINT_PTR)psh->pszCaption;
dat->hProtoAckEvent = HookEventMessage(ME_PROTO_ACK, hwndDlg, HM_PROTOACK);
WindowList_Add(hWindowList, hwndDlg, dat->hContact);
@@ -439,10 +439,11 @@ static INT_PTR CALLBACK DlgProcDetails(HWND hwndDlg, UINT msg, WPARAM wParam, LP
if (ack->result == ACKRESULT_SUCCESS || ack->result == ACKRESULT_FAILED)
dat->infosUpdated[ack->lParam] = 1;
- for (i = 0; i < (int)ack->hProcess; i++)
+ for (i = 0; i < (INT_PTR)ack->hProcess; i++)
if (dat->infosUpdated[i] == 0)
break;
- if (i == (int)ack->hProcess) {
+
+ if (i == (INT_PTR)ack->hProcess) {
ShowWindow(GetDlgItem(hwndDlg, IDC_UPDATING), SW_HIDE);
KillTimer(hwndDlg, 1);
SendMessage(hwndDlg, M_CHECKONLINE, 0, 0);
diff --git a/src/mir_app/src/DefaultExtraIcons.cpp b/src/mir_app/src/DefaultExtraIcons.cpp
index eac9fbbe7b..2f7080f8cb 100644
--- a/src/mir_app/src/DefaultExtraIcons.cpp
+++ b/src/mir_app/src/DefaultExtraIcons.cpp
@@ -65,7 +65,7 @@ static void SetVisibility(MCONTACT hContact, int apparentMode, bool clear)
if (hIcolib != NULL || clear) {
ExtraIcon *extra = GetExtraIcon(hExtraIcon);
if (extra)
- extra->setIcon((int)hExtraIcon, hContact, hIcolib);
+ extra->setIcon((INT_PTR)hExtraIcon, hContact, hIcolib);
}
}
@@ -94,7 +94,7 @@ static void SetGender(MCONTACT hContact, int gender, bool clear)
if (ico != NULL || clear) {
ExtraIcon *extra = GetExtraIcon(hExtraGender);
if (extra)
- extra->setIconByName((int)hExtraGender, hContact, ico);
+ extra->setIconByName((INT_PTR)hExtraGender, hContact, ico);
}
}
diff --git a/src/mir_app/src/chat_manager.cpp b/src/mir_app/src/chat_manager.cpp
index 361069cf08..0c74f5a249 100644
--- a/src/mir_app/src/chat_manager.cpp
+++ b/src/mir_app/src/chat_manager.cpp
@@ -217,7 +217,7 @@ static HICON SM_GetStatusIcon(SESSION_INFO *si, USERINFO * ui)
if ((UINT_PTR)ti->hIcon >= STATUSICONCOUNT)
return ti->hIcon;
- return chatApi.hIcons[ICON_STATUS0 + (int)ti->hIcon];
+ return chatApi.hIcons[ICON_STATUS0 + (INT_PTR)ti->hIcon];
}
return chatApi.hIcons[ICON_STATUS0];
}
@@ -794,7 +794,7 @@ static STATUSINFO* TM_AddStatus(STATUSINFO **ppStatusList, const TCHAR *pszStatu
memset(node, 0, sizeof(STATUSINFO));
replaceStrT(node->pszGroup, pszStatus);
node->hIcon = (HICON)(*iCount);
- while ((int)node->hIcon > STATUSICONCOUNT - 1)
+ while ((INT_PTR)node->hIcon > STATUSICONCOUNT - 1)
node->hIcon--;
if (*ppStatusList == NULL) { // list is empty
@@ -863,7 +863,7 @@ static BOOL TM_RemoveAll(STATUSINFO **ppStatusList)
while (*ppStatusList != NULL) {
STATUSINFO *pLast = ppStatusList[0]->next;
mir_free(ppStatusList[0]->pszGroup);
- if ((int)ppStatusList[0]->hIcon > 10)
+ if ((INT_PTR)ppStatusList[0]->hIcon > 10)
DestroyIcon(ppStatusList[0]->hIcon);
mir_free(*ppStatusList);
*ppStatusList = pLast;
diff --git a/src/mir_app/src/chat_svc.cpp b/src/mir_app/src/chat_svc.cpp
index 6eceedb9ed..a494e905de 100644
--- a/src/mir_app/src/chat_svc.cpp
+++ b/src/mir_app/src/chat_svc.cpp
@@ -274,7 +274,7 @@ static void SetInitDone(SESSION_INFO *si)
si->bInitDone = true;
for (STATUSINFO *p = si->pStatuses; p; p = p->next)
if ((UINT_PTR)p->hIcon < STATUSICONCOUNT)
- p->hIcon = HICON(si->iStatusCount - (int)p->hIcon - 1);
+ p->hIcon = HICON(si->iStatusCount - (INT_PTR)p->hIcon - 1);
}
static int DoControl(GCEVENT *gce, WPARAM wp)
diff --git a/src/mir_app/src/clcutils.cpp b/src/mir_app/src/clcutils.cpp
index 1dff6ca3d3..203720f278 100644
--- a/src/mir_app/src/clcutils.cpp
+++ b/src/mir_app/src/clcutils.cpp
@@ -89,8 +89,7 @@ int fnHitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact *
if (h != hwndTemp)
if (!hwndParent || !(GetWindowLongPtr(hwndTemp, GWL_STYLE) & BS_GROUPBOX))
return -1;
- }
- while (hwndParent);
+ } while (hwndParent);
RECT clRect;
GetClientRect(hwnd, &clRect);
@@ -294,7 +293,7 @@ void fnRecalcScrollBar(HWND hwnd, struct ClcData *dat)
nm.hdr.hwndFrom = hwnd;
nm.hdr.idFrom = GetDlgCtrlID(hwnd);
nm.pt.y = si.nMax;
- SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM) & nm);
+ SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM)&nm);
}
void fnSetGroupExpand(HWND hwnd, struct ClcData *dat, ClcGroup *group, int newState)
@@ -331,9 +330,9 @@ void fnSetGroupExpand(HWND hwnd, struct ClcData *dat, ClcGroup *group, int newSt
nm.hdr.code = CLN_EXPANDED;
nm.hdr.hwndFrom = hwnd;
nm.hdr.idFrom = GetDlgCtrlID(hwnd);
- nm.hItem = (HANDLE) group->groupId;
+ nm.hItem = (HANDLE)group->groupId;
nm.action = group->expanded;
- SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM) & nm);
+ SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM)&nm);
}
void fnDoSelectionDefaultAction(HWND hwnd, struct ClcData *dat)
@@ -348,7 +347,7 @@ void fnDoSelectionDefaultAction(HWND hwnd, struct ClcData *dat)
if (contact->type == CLCIT_GROUP)
cli.pfnSetGroupExpand(hwnd, dat, contact->group, -1);
if (contact->type == CLCIT_CONTACT)
- CallService(MS_CLIST_CONTACTDOUBLECLICKED, (WPARAM) contact->hContact, 0);
+ CallService(MS_CLIST_CONTACTDOUBLECLICKED, (WPARAM)contact->hContact, 0);
}
int fnFindRowByText(HWND hwnd, struct ClcData *dat, const TCHAR *text, int prefixOk)
@@ -501,9 +500,9 @@ void fnBeginRenameSelection(HWND hwnd, struct ClcData *dat)
int h = cli.pfnGetRowHeight(dat, dat->selection);
dat->hwndRenameEdit = CreateWindow(_T("EDIT"), contact->szText, WS_CHILD | WS_BORDER | ES_AUTOHSCROLL, pt.x, pt.y, clRect.right - pt.x, h, hwnd, NULL, cli.hInst, NULL);
mir_subclassWindow(dat->hwndRenameEdit, RenameEditSubclassProc);
- SendMessage(dat->hwndRenameEdit, WM_SETFONT, (WPARAM) (contact->type == CLCIT_GROUP ? dat->fontInfo[FONTID_GROUPS].hFont : dat->fontInfo[FONTID_CONTACTS].hFont), 0);
+ SendMessage(dat->hwndRenameEdit, WM_SETFONT, (WPARAM)(contact->type == CLCIT_GROUP ? dat->fontInfo[FONTID_GROUPS].hFont : dat->fontInfo[FONTID_CONTACTS].hFont), 0);
SendMessage(dat->hwndRenameEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN | EC_USEFONTINFO, 0);
- SendMessage(dat->hwndRenameEdit, EM_SETSEL, 0, (LPARAM) (-1));
+ SendMessage(dat->hwndRenameEdit, EM_SETSEL, 0, (LPARAM)(-1));
ShowWindow(dat->hwndRenameEdit, SW_SHOW);
SetFocus(dat->hwndRenameEdit);
}
@@ -626,11 +625,11 @@ void fnHideInfoTip(HWND, struct ClcData *dat)
return;
CLCINFOTIP it = { 0 };
- it.isGroup = IsHContactGroup(dat->hInfoTipItem);
- it.hItem = (HANDLE) ((UINT_PTR) dat->hInfoTipItem & ~HCONTACT_ISGROUP);
+ it.isGroup = IsHContactGroup((UINT_PTR)dat->hInfoTipItem);
+ it.hItem = (HANDLE)((UINT_PTR)dat->hInfoTipItem & ~HCONTACT_ISGROUP);
it.cbSize = sizeof(it);
dat->hInfoTipItem = NULL;
- NotifyEventHooks(hHideInfoTipEvent, 0, (LPARAM) & it);
+ NotifyEventHooks(hHideInfoTipEvent, 0, (LPARAM)&it);
}
void fnNotifyNewContact(HWND hwnd, MCONTACT hContact)
@@ -641,7 +640,7 @@ void fnNotifyNewContact(HWND hwnd, MCONTACT hContact)
nm.hdr.idFrom = GetDlgCtrlID(hwnd);
nm.flags = 0;
nm.hItem = (HANDLE)hContact;
- SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM) & nm);
+ SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM)&nm);
}
DWORD fnGetDefaultExStyle(void)
@@ -695,10 +694,10 @@ void fnGetFontSetting(int i, LOGFONT* lf, COLORREF* colour)
mir_snprintf(idstr, "Font%dCol", i);
*colour = db_get_dw(NULL, "CLC", idstr, *colour);
-
+
mir_snprintf(idstr, "Font%dSize", i);
lf->lfHeight = (char)db_get_b(NULL, "CLC", idstr, lf->lfHeight);
-
+
mir_snprintf(idstr, "Font%dSty", i);
BYTE style = (BYTE)db_get_b(NULL, "CLC", idstr, (lf->lfWeight == FW_NORMAL ? 0 : DBFONTF_BOLD) | (lf->lfItalic ? DBFONTF_ITALIC : 0) | (lf->lfUnderline ? DBFONTF_UNDERLINE : 0));
lf->lfWidth = lf->lfEscapement = lf->lfOrientation = 0;
@@ -706,7 +705,7 @@ void fnGetFontSetting(int i, LOGFONT* lf, COLORREF* colour)
lf->lfItalic = (style & DBFONTF_ITALIC) != 0;
lf->lfUnderline = (style & DBFONTF_UNDERLINE) != 0;
lf->lfStrikeOut = 0;
-
+
mir_snprintf(idstr, "Font%dSet", i);
lf->lfCharSet = db_get_b(NULL, "CLC", idstr, lf->lfCharSet);
lf->lfOutPrecision = OUT_DEFAULT_PRECIS;
@@ -750,7 +749,7 @@ void fnLoadClcOptions(HWND hwnd, struct ClcData *dat, BOOL bFirst)
dat->groupIndent = 10;
LPARAM dwColor = GetSysColor(COLOR_WINDOWTEXT);
- for (int i=0; i <= FONTID_MAX; i++)
+ for (int i = 0; i <= FONTID_MAX; i++)
SendMessage(hwnd, CLM_SETTEXTCOLOR, i, dwColor);
}
@@ -823,7 +822,7 @@ void fnSetContactCheckboxes(ClcContact *cc, int checked)
void fnSetGroupChildCheckboxes(ClcGroup *group, int checked)
{
- for (int i=0; i < group->cl.count; i++) {
+ for (int i = 0; i < group->cl.count; i++) {
ClcContact *cc = group->cl.items[i];
if (cc->type == CLCIT_GROUP) {
cli.pfnSetGroupChildCheckboxes(cc->group, checked);
diff --git a/src/mir_app/src/clistmod.cpp b/src/mir_app/src/clistmod.cpp
index 0054d57c26..e6a6897fed 100644
--- a/src/mir_app/src/clistmod.cpp
+++ b/src/mir_app/src/clistmod.cpp
@@ -111,14 +111,14 @@ TCHAR* fnGetStatusModeDescription(int mode, int flags)
static int ProtocolAck(WPARAM, LPARAM lParam)
{
- ACKDATA *ack = (ACKDATA *) lParam;
+ ACKDATA *ack = (ACKDATA*)lParam;
if (ack->type != ACKTYPE_STATUS)
return 0;
cli.pfnCluiProtocolStatusChanged(lParam, ack->szModule);
- if ((int)ack->hProcess < ID_STATUS_ONLINE && ack->lParam >= ID_STATUS_ONLINE) {
- DWORD caps = (DWORD)CallProtoServiceInt(NULL,ack->szModule, PS_GETCAPS, PFLAGNUM_1, 0);
+ if ((INT_PTR)ack->hProcess < ID_STATUS_ONLINE && ack->lParam >= ID_STATUS_ONLINE) {
+ DWORD caps = (DWORD)CallProtoServiceInt(NULL, ack->szModule, PS_GETCAPS, PFLAGNUM_1, 0);
if (caps & PF1_SERVERCLIST) {
for (MCONTACT hContact = db_find_first(ack->szModule); hContact; ) {
MCONTACT hNext = db_find_next(hContact, ack->szModule);
@@ -150,7 +150,7 @@ int fnIconFromStatusMode(const char *szProto, int status, MCONTACT)
index = 0;
if (szProto == NULL)
return index + 1;
- for (i=0; i < protoIconIndex.getCount(); i++) {
+ for (i = 0; i < protoIconIndex.getCount(); i++) {
if (mir_strcmp(szProto, protoIconIndex[i].szProto) == 0)
return protoIconIndex[i].iIconBase + index;
}
@@ -173,7 +173,7 @@ static void AddProtoIconIndex(PROTOACCOUNT *pa)
{
ProtoIconIndex *pii = new ProtoIconIndex;
pii->szProto = pa->szModuleName;
- for (int i=0; i < _countof(statusModeList); i++) {
+ for (int i = 0; i < _countof(statusModeList); i++) {
int iImg = ImageList_AddIcon_ProtoIconLibLoaded(hCListImages, pa->szModuleName, statusModeList[i]);
if (i == 0)
pii->iIconBase = iImg;
@@ -183,7 +183,7 @@ static void AddProtoIconIndex(PROTOACCOUNT *pa)
static void RemoveProtoIconIndex(PROTOACCOUNT *pa)
{
- for (int i=0; i < protoIconIndex.getCount(); i++)
+ for (int i = 0; i < protoIconIndex.getCount(); i++)
if (mir_strcmp(protoIconIndex[i].szProto, pa->szModuleName) == 0) {
protoIconIndex.remove(i);
break;
@@ -193,7 +193,7 @@ static void RemoveProtoIconIndex(PROTOACCOUNT *pa)
static int ContactListModulesLoaded(WPARAM, LPARAM)
{
RebuildMenuOrder();
- for (int i=0; i < accounts.getCount(); i++)
+ for (int i = 0; i < accounts.getCount(); i++)
AddProtoIconIndex(accounts[i]);
cli.pfnLoadContactTree();
@@ -253,11 +253,11 @@ static int CListIconsChanged(WPARAM, LPARAM)
{
int i, j;
- for (i=0; i < _countof(statusModeList); i++)
+ for (i = 0; i < _countof(statusModeList); i++)
ImageList_ReplaceIcon_IconLibLoaded(hCListImages, i + 1, Skin_LoadIcon(skinIconStatusList[i]));
ImageList_ReplaceIcon_IconLibLoaded(hCListImages, IMAGE_GROUPOPEN, Skin_LoadIcon(SKINICON_OTHER_GROUPOPEN));
ImageList_ReplaceIcon_IconLibLoaded(hCListImages, IMAGE_GROUPSHUT, Skin_LoadIcon(SKINICON_OTHER_GROUPSHUT));
- for (i=0; i < protoIconIndex.getCount(); i++)
+ for (i = 0; i < protoIconIndex.getCount(); i++)
for (j = 0; j < _countof(statusModeList); j++)
ImageList_ReplaceIcon_IconLibLoaded(hCListImages, protoIconIndex[i].iIconBase + j, Skin_LoadProtoIcon(protoIconIndex[i].szProto, statusModeList[j]));
cli.pfnTrayIconIconsChanged();
@@ -408,14 +408,12 @@ static INT_PTR CompareContacts(WPARAM wParam, LPARAM lParam)
{
MCONTACT a = wParam, b = lParam;
TCHAR namea[128], *nameb;
- int statusa, statusb;
- char *szProto1, *szProto2;
int rc;
- szProto1 = GetContactProto(a);
- szProto2 = GetContactProto(b);
- statusa = db_get_w(a, SAFESTRING(szProto1), "Status", ID_STATUS_OFFLINE);
- statusb = db_get_w(b, SAFESTRING(szProto2), "Status", ID_STATUS_OFFLINE);
+ char *szProto1 = GetContactProto(a);
+ char *szProto2 = GetContactProto(b);
+ int statusa = db_get_w(a, SAFESTRING(szProto1), "Status", ID_STATUS_OFFLINE);
+ int statusb = db_get_w(b, SAFESTRING(szProto2), "Status", ID_STATUS_OFFLINE);
if (sortByProto) {
/* deal with statuses, online contacts have to go above offline */
@@ -445,7 +443,6 @@ static INT_PTR CompareContacts(WPARAM wParam, LPARAM lParam)
nameb = cli.pfnGetContactDisplayName(a, 0);
_tcsncpy_s(namea, nameb, _TRUNCATE);
- namea[ _countof(namea)-1 ] = 0;
nameb = cli.pfnGetContactDisplayName(b, 0);
//otherwise just compare names
@@ -495,11 +492,11 @@ int LoadContactListModule2(void)
ImageList_AddIcon_NotShared(hCListImages, MAKEINTRESOURCE(IDI_BLANK));
- //now all core skin icons are loaded via icon lib. so lets release them
- for (int i=0; i < _countof(statusModeList); i++)
+ // now all core skin icons are loaded via icon lib. so lets release them
+ for (int i = 0; i < _countof(statusModeList); i++)
ImageList_AddIcon_IconLibLoaded(hCListImages, skinIconStatusList[i]);
- //see IMAGE_GROUP... in clist.h if you add more images above here
+ // see IMAGE_GROUP... in clist.h if you add more images above here
ImageList_AddIcon_IconLibLoaded(hCListImages, SKINICON_OTHER_GROUPOPEN);
ImageList_AddIcon_IconLibLoaded(hCListImages, SKINICON_OTHER_GROUPSHUT);
return 0;
@@ -510,7 +507,7 @@ void UnloadContactListModule()
if (!hCListImages)
return;
- //remove transitory contacts
+ // remove transitory contacts
for (MCONTACT hContact = db_find_first(); hContact != NULL; ) {
MCONTACT hNext = db_find_next(hContact);
if (db_get_b(hContact, "CList", "NotOnList", 0))
diff --git a/src/mir_app/src/clisttray.cpp b/src/mir_app/src/clisttray.cpp
index b671474456..eaf391935a 100644
--- a/src/mir_app/src/clisttray.cpp
+++ b/src/mir_app/src/clisttray.cpp
@@ -46,7 +46,7 @@ static bool hasTips()
#define initcheck if (!fTrayInited) return
-#define SIZEOFNID ((cli.shellVersion >= 5) ? NOTIFYICONDATA_V2_SIZE : NOTIFYICONDATA_V1_SIZE)
+#define SIZEOFNID (DWORD)((cli.shellVersion >= 5) ? NOTIFYICONDATA_V2_SIZE : NOTIFYICONDATA_V1_SIZE)
static BOOL fTrayInited = FALSE;
diff --git a/src/mir_app/src/clui.cpp b/src/mir_app/src/clui.cpp
index 2d984fc5dd..90c3d2fe8c 100644
--- a/src/mir_app/src/clui.cpp
+++ b/src/mir_app/src/clui.cpp
@@ -791,7 +791,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
case CLN_NEWCONTACT:
if (nmc != NULL)
- cli.pfnSetAllExtraIcons((MCONTACT)nmc->hItem);
+ cli.pfnSetAllExtraIcons((UINT_PTR)nmc->hItem);
return TRUE;
case CLN_LISTREBUILT:
@@ -844,8 +844,8 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
HANDLE hItem = (HANDLE)SendMessage(cli.hwndContactTree, CLM_HITTEST, (WPARAM)&hitFlags, MAKELPARAM(nmc->pt.x, nmc->pt.y));
if (hItem) {
if (hitFlags & CLCHT_ONITEMEXTRA) {
- if (!IsHContactGroup(hItem) && !IsHContactInfo(hItem))
- if (cli.pfnGetCacheEntry((MCONTACT)nmc->hItem))
+ if (!IsHContactGroup((UINT_PTR)hItem) && !IsHContactInfo((UINT_PTR)hItem))
+ if (cli.pfnGetCacheEntry((UINT_PTR)nmc->hItem))
NotifyEventHooks(hEventExtraClick, (WPARAM)nmc->hItem, nmc->iColumn+1);
}
break;
diff --git a/src/mir_app/src/extraicons.cpp b/src/mir_app/src/extraicons.cpp
index 3c1fe00047..321b9c8d21 100644
--- a/src/mir_app/src/extraicons.cpp
+++ b/src/mir_app/src/extraicons.cpp
@@ -101,7 +101,7 @@ int Clist_SetExtraIcon(MCONTACT hContact, int slot, HANDLE hImage)
ExtraIcon* GetExtraIcon(HANDLE id)
{
- int i = (int)id;
+ int i = (INT_PTR)id;
if (i < 1 || i > extraIconsByHandle.getCount())
return NULL;
@@ -473,7 +473,7 @@ MIR_APP_DLL(int) ExtraIcon_SetIcon(HANDLE hExtraIcon, MCONTACT hContact, HANDLE
if (extra == NULL)
return -1;
- return extra->setIcon((int)hExtraIcon, hContact, hImage);
+ return extra->setIcon((INT_PTR)hExtraIcon, hContact, hImage);
}
MIR_APP_DLL(int) ExtraIcon_SetIconByName(HANDLE hExtraIcon, MCONTACT hContact, const char *icoName)
@@ -485,7 +485,7 @@ MIR_APP_DLL(int) ExtraIcon_SetIconByName(HANDLE hExtraIcon, MCONTACT hContact, c
if (extra == NULL)
return -1;
- return extra->setIconByName((int)hExtraIcon, hContact, icoName);
+ return extra->setIconByName((INT_PTR)hExtraIcon, hContact, icoName);
}
MIR_APP_DLL(int) ExtraIcon_Clear(HANDLE hExtraIcon, MCONTACT hContact)
@@ -497,7 +497,7 @@ MIR_APP_DLL(int) ExtraIcon_Clear(HANDLE hExtraIcon, MCONTACT hContact)
if (extra == NULL)
return -1;
- return extra->setIcon((int)hExtraIcon, hContact, NULL);
+ return extra->setIcon((INT_PTR)hExtraIcon, hContact, NULL);
}
static INT_PTR svcExtraIcon_Add(WPARAM wParam, LPARAM)
diff --git a/src/mir_app/src/menu_clist.cpp b/src/mir_app/src/menu_clist.cpp
index cfbdd96d0c..55f8863d75 100644
--- a/src/mir_app/src/menu_clist.cpp
+++ b/src/mir_app/src/menu_clist.cpp
@@ -1017,7 +1017,7 @@ static int MenuProtoAck(WPARAM, LPARAM lParam)
for (int i = 0; i < accounts.getCount(); i++) {
if (!mir_strcmp(accounts[i]->szModuleName, ack->szModule)) {
- int iOldStatus = (int)ack->hProcess;
+ int iOldStatus = (INT_PTR)ack->hProcess;
if ((iOldStatus >= ID_STATUS_OFFLINE || iOldStatus == 0) && iOldStatus < ID_STATUS_OFFLINE + _countof(statusModeList)) {
int pos = statustopos(iOldStatus);
if (pos == -1)
diff --git a/src/mir_app/src/meta_services.cpp b/src/mir_app/src/meta_services.cpp
index 38d926147b..82c2fa90d7 100644
--- a/src/mir_app/src/meta_services.cpp
+++ b/src/mir_app/src/meta_services.cpp
@@ -570,7 +570,7 @@ static int Meta_MessageWindowEvent(WPARAM, LPARAM lParam)
static INT_PTR Meta_SrmmCurrentSub(WPARAM hMeta, LPARAM)
{
- MetaSrmmData tmp = { hMeta };
+ MetaSrmmData tmp = { (UINT_PTR)hMeta };
if (MetaSrmmData *p = arMetaWindows.find(&tmp))
return p->m_hSub;
@@ -659,7 +659,7 @@ int Meta_ModulesLoaded(WPARAM, LPARAM)
static VOID CALLBACK sttMenuThread(PVOID param)
{
- HMENU hMenu = Menu_BuildContactMenu(MCONTACT(param));
+ HMENU hMenu = Menu_BuildContactMenu((UINT_PTR)param);
TPMPARAMS tpmp = { 0 };
tpmp.cbSize = sizeof(tpmp);
diff --git a/src/mir_app/src/options.cpp b/src/mir_app/src/options.cpp
index 9790fdd325..ceac065583 100644
--- a/src/mir_app/src/options.cpp
+++ b/src/mir_app/src/options.cpp
@@ -83,7 +83,7 @@ struct OptionsPageData : public MZeroedObject
OptionsPageData(OPTIONSDIALOGPAGE *src)
{
if (src->hInstance != NULL && src->pszTemplate != NULL)
- pDialog = new COptionPageDialog(src->hInstance, (int)src->pszTemplate, src->pfnDlgProc, src->dwInitParam);
+ pDialog = new COptionPageDialog(src->hInstance, (INT_PTR)src->pszTemplate, src->pfnDlgProc, src->dwInitParam);
else
pDialog = src->pDialog;
assert(pDialog != NULL);
diff --git a/src/mir_app/src/skinicons.cpp b/src/mir_app/src/skinicons.cpp
index 8db8f9563b..698f7d4b72 100644
--- a/src/mir_app/src/skinicons.cpp
+++ b/src/mir_app/src/skinicons.cpp
@@ -134,7 +134,7 @@ static HICON LoadSmallIcon(HINSTANCE hInstance, LPCTSTR lpIconName)
return NULL;
HICON hIcon = NULL; // icon handle
- int index = -(int)lpIconName;
+ int index = -(INT_PTR)lpIconName;
ExtractIconEx(filename, index, NULL, &hIcon, 1);
return hIcon;
}