From ee68ac82d5aabb596e8bd0f2b9286827ca2ce545 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 10 Feb 2014 21:37:41 +0000 Subject: these conversions aren't needed either git-svn-id: http://svn.miranda-ng.org/main/trunk@8088 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/AVS/src/acc.cpp | 4 +- plugins/AVS/src/main.cpp | 4 +- plugins/AVS/src/options.cpp | 10 ++-- plugins/AVS/src/services.cpp | 8 +-- plugins/Alarms/src/alarms.cpp | 2 +- plugins/AuthState/src/main.cpp | 14 ++--- plugins/AutoShutdown/src/watcher.cpp | 4 +- plugins/AvatarHistory/src/AvatarDlg.cpp | 4 +- plugins/AvatarHistory/src/AvatarHistory.cpp | 4 +- plugins/BasicHistory/src/BasicHistory.cpp | 6 +-- plugins/BasicHistory/src/HistoryWindow.cpp | 2 +- plugins/Boltun/src/boltun.cpp | 8 +-- plugins/BuddyExpectator/src/BuddyExpectator.cpp | 28 +++++----- plugins/BuddyPounce/src/dialog.cpp | 6 +-- plugins/BuddyPounce/src/main.cpp | 10 ++-- .../ClientChangeNotify/src/ClientChangeNotify.cpp | 2 +- plugins/Clist_modern/src/modern_clc.cpp | 50 ++++++++--------- plugins/Clist_modern/src/modern_clcmsgs.cpp | 2 +- plugins/Clist_modern/src/modern_clistmenus.cpp | 4 +- plugins/Clist_modern/src/modern_clistsettings.cpp | 6 +-- plugins/Clist_modern/src/modern_clui.cpp | 4 +- plugins/Clist_mw/src/clc.cpp | 10 ++-- plugins/Clist_mw/src/clistopts.cpp | 2 +- plugins/Clist_mw/src/clistsettings.cpp | 4 +- plugins/Clist_mw/src/contact.cpp | 2 +- plugins/Clist_nicer/src/clc.cpp | 52 +++++++++--------- plugins/Clist_nicer/src/clistmenus.cpp | 4 +- plugins/Clist_nicer/src/clistopts.cpp | 2 +- plugins/ContactsPlus/src/main.cpp | 12 ++--- plugins/ContactsPlus/src/send.cpp | 6 +-- plugins/CountryFlags/src/extraimg.cpp | 10 ++-- plugins/DbEditorPP/src/main.cpp | 8 +-- plugins/FTPFileYM/src/ftpfile.cpp | 6 +-- plugins/FavContacts/src/contact_cache.cpp | 2 +- plugins/FavContacts/src/main.cpp | 4 +- plugins/FileAsMessage/src/main.cpp | 6 +-- plugins/FingerprintNG/src/fingerprint.cpp | 4 +- plugins/FlashAvatars/src/cflash.cpp | 6 +-- plugins/FloatingContacts/src/main.cpp | 16 +++--- plugins/HTTPServer/src/GuiElements.cpp | 2 +- plugins/HistoryLinkListPlus/src/linklist.cpp | 2 +- plugins/HistoryLinkListPlus/src/linklist_fct.cpp | 2 +- plugins/HistorySweeperLight/src/main.cpp | 4 +- plugins/IgnoreState/src/main.cpp | 2 +- plugins/KeyboardNotify/src/main.cpp | 2 +- plugins/MetaContacts/src/addto.cpp | 6 +-- plugins/MetaContacts/src/edit.cpp | 16 +++--- plugins/MetaContacts/src/meta_api.cpp | 46 ++++++++-------- plugins/MetaContacts/src/meta_menu.cpp | 36 ++++++------- plugins/MetaContacts/src/meta_services.cpp | 62 +++++++++++----------- plugins/MirOTR/MirOTR/src/dbfilter.cpp | 6 +-- plugins/MirOTR/MirOTR/src/mirotrmenu.cpp | 2 +- plugins/MirOTR/MirOTR/src/svcs_menu.cpp | 14 ++--- plugins/MirOTR/MirOTR/src/svcs_srmm.cpp | 2 +- plugins/MirandaG15/src/CAppletManager.cpp | 18 +++---- plugins/MobileState/src/main.cpp | 8 +-- plugins/Msg_Export/src/main.cpp | 4 +- plugins/NewEventNotify/src/main.cpp | 2 +- plugins/NewXstatusNotify/src/common.h | 2 +- plugins/NewXstatusNotify/src/indsnd.cpp | 2 +- plugins/NewXstatusNotify/src/main.cpp | 4 +- plugins/New_GPG/src/clist.cpp | 2 +- plugins/New_GPG/src/srmm.cpp | 2 +- plugins/NewsAggregator/Src/Options.cpp | 2 +- plugins/NewsAggregator/Src/Services.cpp | 4 +- plugins/NoHistory/src/dllmain.cpp | 10 ++-- plugins/Non-IM Contact/src/dialog.cpp | 2 +- plugins/Non-IM Contact/src/main.cpp | 6 +-- plugins/Nudge/src/main.cpp | 4 +- plugins/Nudge/src/shake.cpp | 2 +- plugins/PasteIt/src/PasteIt.cpp | 6 +-- plugins/Popup/src/popup_wnd2.cpp | 4 +- plugins/Popup/src/srmm_menu.cpp | 2 +- plugins/QuickReplies/src/events.cpp | 2 +- plugins/Rate/src/main.cpp | 2 +- plugins/RecentContacts/src/RecentContacts.cpp | 4 +- plugins/SMS/src/SMS_svc.cpp | 6 +-- plugins/SMS/src/receive.cpp | 2 +- plugins/Scriver/src/msgdialog.cpp | 6 +-- plugins/Scriver/src/msgs.cpp | 40 +++++++------- plugins/Scriver/src/msgwindow.cpp | 2 +- plugins/Scriver/src/statusicon.cpp | 2 +- plugins/SecureIM/src/svcs_clist.cpp | 12 ++--- plugins/SecureIM/src/svcs_menu.cpp | 58 ++++++++++---------- plugins/SecureIM/src/svcs_srmm.cpp | 2 +- plugins/SendScreenshotPlus/src/Main.cpp | 4 +- plugins/SimpleAR/src/Main.cpp | 2 +- plugins/SimpleStatusMsg/src/awaymsg.cpp | 20 +++---- plugins/SmileyAdd/src/dlgboxsubclass.cpp | 2 +- plugins/SmileyAdd/src/services.cpp | 8 +-- plugins/Spamotron/src/spamotron.cpp | 2 +- plugins/SpellChecker/src/utils.cpp | 2 +- plugins/StartupSilence/src/main.cpp | 2 +- plugins/StopSpamMod/src/stopspam.cpp | 2 +- plugins/StopSpamPlus/src/services.cpp | 2 +- plugins/TabSRMM/src/buttonsbar.cpp | 4 +- plugins/TabSRMM/src/container.cpp | 6 +-- plugins/TabSRMM/src/generic_msghandlers.cpp | 4 +- plugins/TabSRMM/src/globals.cpp | 10 ++-- plugins/TabSRMM/src/hotkeyhandler.cpp | 12 ++--- plugins/TabSRMM/src/mim.cpp | 10 ++-- plugins/TabSRMM/src/msgdialog.cpp | 2 +- plugins/TabSRMM/src/msgs.cpp | 18 +++---- plugins/TabSRMM/src/sendlater.cpp | 2 +- plugins/TabSRMM/src/typingnotify.cpp | 2 +- plugins/TabSRMM/src/userprefs.cpp | 6 +-- plugins/TipperYM/src/message_pump.cpp | 2 +- plugins/TipperYM/src/popwin.cpp | 6 +-- plugins/TipperYM/src/tipper.cpp | 2 +- plugins/TooltipNotify/src/TooltipNotify.cpp | 4 +- plugins/UserInfoEx/src/Flags/svc_flags.cpp | 14 ++--- plugins/UserInfoEx/src/dlg_propsheet.cpp | 16 +++--- plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp | 4 +- plugins/UserInfoEx/src/psp_contact.cpp | 4 +- plugins/UserInfoEx/src/svc_contactinfo.cpp | 2 +- plugins/UserInfoEx/src/svc_email.cpp | 8 +-- plugins/UserInfoEx/src/svc_homepage.cpp | 4 +- plugins/UserInfoEx/src/svc_refreshci.cpp | 6 +-- plugins/UserInfoEx/src/svc_reminder.cpp | 2 +- plugins/UserInfoEx/src/svc_timezone.cpp | 4 +- plugins/UserInfoEx/src/svc_timezone_old.cpp | 4 +- plugins/Variables/src/contact.cpp | 2 +- plugins/Variables/src/help.cpp | 2 +- plugins/Weather/src/weather_contacts.cpp | 22 ++++---- plugins/Weather/src/weather_conv.cpp | 2 +- plugins/Weather/src/weather_mwin.cpp | 6 +-- plugins/Weather/src/weather_popup.cpp | 6 +-- plugins/Weather/src/weather_update.cpp | 10 ++-- plugins/Weather/src/weather_userinfo.cpp | 12 ++--- plugins/WebView/src/webview.cpp | 10 ++-- plugins/WebView/src/webview_alerts.cpp | 18 +++---- plugins/WebView/src/webview_datawnd.cpp | 4 +- plugins/WebView/src/webview_opts.cpp | 2 +- plugins/WebView/src/webview_services.cpp | 8 +-- plugins/WhenWasIt/src/dlg_handlers.cpp | 4 +- plugins/WhenWasIt/src/hooked_events.cpp | 2 +- plugins/WhenWasIt/src/services.cpp | 2 +- plugins/XSoundNotify/src/dialog.cpp | 4 +- plugins/XSoundNotify/src/xsn_main.cpp | 6 +-- plugins/YAMN/src/services.cpp | 10 ++-- plugins/YARelay/src/main.cpp | 2 +- plugins/wbOSD/src/events.cpp | 2 +- 142 files changed, 553 insertions(+), 553 deletions(-) (limited to 'plugins') diff --git a/plugins/AVS/src/acc.cpp b/plugins/AVS/src/acc.cpp index 4f5e423ace..ea9a39e6fb 100644 --- a/plugins/AVS/src/acc.cpp +++ b/plugins/AVS/src/acc.cpp @@ -556,7 +556,7 @@ static LRESULT CALLBACK ACCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l { DestroyAnimation(hwnd, data); - data->hContact = (MCONTACT)lParam; + data->hContact = lParam; if (lParam == NULL) data->proto[0] = '\0'; else @@ -708,7 +708,7 @@ static LRESULT CALLBACK ACCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l } case DM_AVATARCHANGED: { - if (data->hContact == (MCONTACT)wParam) + if (data->hContact == wParam) { DestroyAnimation(hwnd, data); StartAnimation(hwnd, data); diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp index 0a4997a54e..a0de907cfd 100644 --- a/plugins/AVS/src/main.cpp +++ b/plugins/AVS/src/main.cpp @@ -134,7 +134,7 @@ static int MetaChanged(WPARAM wParam, LPARAM lParam) AVATARCACHEENTRY *ace; - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; MCONTACT hSubContact = GetContactThatHaveTheAvatar(hContact); // Get the node @@ -242,7 +242,7 @@ static int ContactSettingChanged(WPARAM wParam, LPARAM lParam) static int ContactDeleted(WPARAM wParam, LPARAM lParam) { - DeleteAvatarFromCache((MCONTACT)wParam, TRUE); + DeleteAvatarFromCache(wParam, TRUE); return 0; } diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp index 580e375048..6d28942e5c 100644 --- a/plugins/AVS/src/options.cpp +++ b/plugins/AVS/src/options.cpp @@ -501,10 +501,10 @@ INT_PTR CALLBACK DlgProcAvatarOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPA struct WindowData *dat = (struct WindowData *)malloc(sizeof(struct WindowData)); if (dat) - dat->hContact = (MCONTACT)lParam; + dat->hContact = lParam; SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat); - hContact = (MCONTACT)lParam; + hContact = lParam; TranslateDialogDefault(hwndDlg); if (hContact) { szNick = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR); @@ -771,7 +771,7 @@ static INT_PTR CALLBACK DlgProcAvatarUserInfo(HWND hwndDlg, UINT msg, WPARAM wPa dat = (struct WindowData *) malloc(sizeof(struct WindowData)); if (dat == NULL) return FALSE; - dat->hContact = (MCONTACT)lParam; + dat->hContact = lParam; HWND protopic = GetDlgItem(hwndDlg, IDC_PROTOPIC); SendMessage(protopic, AVATAR_SETCONTACT, 0, (LPARAM) dat->hContact); @@ -781,7 +781,7 @@ static INT_PTR CALLBACK DlgProcAvatarUserInfo(HWND hwndDlg, UINT msg, WPARAM wPa SendMessage(protopic, AVATAR_SETRESIZEIFSMALLER, 0, (LPARAM) FALSE); SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat); - hContact = (MCONTACT)lParam; + hContact = lParam; TranslateDialogDefault(hwndDlg); SendMessage(hwndDlg, DM_SETAVATARNAME, 0, 0); CheckDlgButton(hwndDlg, IDC_PROTECTAVATAR, db_get_b(hContact, "ContactPhoto", "Locked", 0) ? TRUE : FALSE); @@ -1148,7 +1148,7 @@ int OnDetailsInit(WPARAM wParam, LPARAM lParam) odp.hInstance = g_hInst; odp.pszTitle = LPGEN("Avatar"); - MCONTACT hContact = (MCONTACT)lParam; + MCONTACT hContact = lParam; if (hContact == NULL) { // User dialog odp.pfnDlgProc = DlgProcAvatarProtoInfo; diff --git a/plugins/AVS/src/services.cpp b/plugins/AVS/src/services.cpp index b02f0e5d19..d854e4fd1c 100644 --- a/plugins/AVS/src/services.cpp +++ b/plugins/AVS/src/services.cpp @@ -31,7 +31,7 @@ INT_PTR GetAvatarBitmap(WPARAM wParam, LPARAM lParam) if (wParam == 0 || g_shutDown || fei == NULL) return 0; - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; hContact = GetContactThatHaveTheAvatar(hContact); // Get the node @@ -46,7 +46,7 @@ INT_PTR GetAvatarBitmap(WPARAM wParam, LPARAM lParam) INT_PTR ProtectAvatar(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; BYTE was_locked = db_get_b(hContact, "ContactPhoto", "Locked", 0); if (fei == NULL || was_locked == (BYTE)lParam) // no need for redundant lockings... @@ -188,12 +188,12 @@ static INT_PTR avSetAvatar(MCONTACT hContact, TCHAR *tszPath) INT_PTR SetAvatar(WPARAM wParam, LPARAM lParam) { - return avSetAvatar((MCONTACT)wParam, _A2T((const char*)lParam)); + return avSetAvatar(wParam, _A2T((const char*)lParam)); } INT_PTR SetAvatarW(WPARAM wParam, LPARAM lParam) { - return avSetAvatar((MCONTACT)wParam, (TCHAR*)lParam); + return avSetAvatar(wParam, (TCHAR*)lParam); } /* diff --git a/plugins/Alarms/src/alarms.cpp b/plugins/Alarms/src/alarms.cpp index 2c09fc0267..eecc9c8bc9 100644 --- a/plugins/Alarms/src/alarms.cpp +++ b/plugins/Alarms/src/alarms.cpp @@ -87,7 +87,7 @@ void ShowPopup(MCONTACT hContact, const TCHAR *msg) static int PluginSendMessage(WPARAM wParam,LPARAM lParam) { - CallContactService((MCONTACT)wParam,PSS_MESSAGE,0,lParam); + CallContactService(wParam,PSS_MESSAGE,0,lParam); return 0; } diff --git a/plugins/AuthState/src/main.cpp b/plugins/AuthState/src/main.cpp index 2ffcc0a64d..fbfd2a170a 100644 --- a/plugins/AuthState/src/main.cpp +++ b/plugins/AuthState/src/main.cpp @@ -94,7 +94,7 @@ int onExtraImageApplying(WPARAM wParam, LPARAM lParam) if (wParam == NULL) return 0; - int usedIcon = getIconToUse((MCONTACT)wParam, lParam); + int usedIcon = getIconToUse(wParam, lParam); const char *icon; switch (usedIcon) { @@ -103,14 +103,14 @@ int onExtraImageApplying(WPARAM wParam, LPARAM lParam) case icon_auth: icon = "auth_icon"; break; default: icon = NULL; break; } - ExtraIcon_SetIcon(hExtraIcon, (MCONTACT)wParam, icon); + ExtraIcon_SetIcon(hExtraIcon, wParam, icon); return 0; } int onContactSettingChanged(WPARAM wParam,LPARAM lParam) { DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam; - char *proto = GetContactProto((MCONTACT)wParam); + char *proto = GetContactProto(wParam); if (!proto) return 0; if (!lstrcmpA(cws->szModule,proto)) @@ -123,7 +123,7 @@ int onContactSettingChanged(WPARAM wParam,LPARAM lParam) int onDBContactAdded(WPARAM wParam, LPARAM lParam) { // A new contact added, mark it as recent - db_set_b((MCONTACT)wParam, MODULENAME, "ShowIcons", 1); + db_set_b(wParam, MODULENAME, "ShowIcons", 1); onExtraImageApplying(wParam, 0); return 0; @@ -131,8 +131,8 @@ int onDBContactAdded(WPARAM wParam, LPARAM lParam) INT_PTR onAuthMenuSelected(WPARAM wParam, LPARAM lParam) { - byte enabled = db_get_b((MCONTACT)wParam,"AuthState","ShowIcons",1); - db_set_b((MCONTACT)wParam, MODULENAME, "ShowIcons", !enabled); + byte enabled = db_get_b(wParam,"AuthState","ShowIcons",1); + db_set_b(wParam, MODULENAME, "ShowIcons", !enabled); onExtraImageApplying(wParam, 0); return 0; @@ -140,7 +140,7 @@ INT_PTR onAuthMenuSelected(WPARAM wParam, LPARAM lParam) int onPrebuildContactMenu(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; char *proto = GetContactProto(hContact); if (!proto) return 0; diff --git a/plugins/AutoShutdown/src/watcher.cpp b/plugins/AutoShutdown/src/watcher.cpp index 5ece5c84df..70111eaa44 100644 --- a/plugins/AutoShutdown/src/watcher.cpp +++ b/plugins/AutoShutdown/src/watcher.cpp @@ -203,7 +203,7 @@ static int StatusSettingChanged(WPARAM wParam,LPARAM lParam) if (currentWatcherType&SDWTF_STATUS) { DBCONTACTWRITESETTING *dbcws=(DBCONTACTWRITESETTING*)lParam; if ((HANDLE)wParam != NULL && dbcws->value.wVal==ID_STATUS_OFFLINE && !lstrcmpA(dbcws->szSetting,"Status")) { - char *pszProto = GetContactProto((MCONTACT)wParam); + char *pszProto = GetContactProto(wParam); if (pszProto != NULL && !lstrcmpA(dbcws->szModule,pszProto)) if (CheckAllContactsOffline()) ShutdownAndStopWatcher(); @@ -239,7 +239,7 @@ static BOOL CALLBACK CpuUsageWatcherProc(BYTE nCpuUsage,LPARAM lParam) static int WeatherUpdated(WPARAM wParam,LPARAM lParam) { - char *pszProto = GetContactProto((MCONTACT)wParam); + char *pszProto = GetContactProto(wParam); if ((BOOL)lParam && pszProto != NULL && CallProtoService(pszProto,PS_GETSTATUS,0,0)==THUNDER) if (db_get_b(NULL,"AutoShutdown","WeatherShutdown",SETTING_WEATHERSHUTDOWN_DEFAULT)) ServiceShutdown(SDSDT_SHUTDOWN,TRUE); diff --git a/plugins/AvatarHistory/src/AvatarDlg.cpp b/plugins/AvatarHistory/src/AvatarDlg.cpp index a0897015d1..86fad5edce 100644 --- a/plugins/AvatarHistory/src/AvatarDlg.cpp +++ b/plugins/AvatarHistory/src/AvatarDlg.cpp @@ -513,7 +513,7 @@ int CleanupAvatarPic(HWND hwnd) int PreBuildContactMenu(WPARAM wParam,LPARAM lParam) { - char *proto = GetContactProto((MCONTACT)wParam); + char *proto = GetContactProto(wParam); Menu_ShowItem(hMenu, ProtocolEnabled(proto)); return 0; } @@ -534,7 +534,7 @@ void InitMenuItem() static INT_PTR ShowDialogSvc(WPARAM wParam, LPARAM lParam) { - OpenAvatarDialog((MCONTACT)wParam, (char*)lParam); + OpenAvatarDialog(wParam, (char*)lParam); return 0; } diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp index 927c9d1c03..e6a878d420 100644 --- a/plugins/AvatarHistory/src/AvatarHistory.cpp +++ b/plugins/AvatarHistory/src/AvatarHistory.cpp @@ -105,11 +105,11 @@ static INT_PTR IsEnabled(WPARAM wParam, LPARAM lParam) static int AvatarChanged(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if (hContact == NULL) return 0; - char *proto = GetContactProto((MCONTACT)wParam); + char *proto = GetContactProto(wParam); if (proto == NULL) return 0; diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp index b12e7c8347..a1d4024961 100644 --- a/plugins/BasicHistory/src/BasicHistory.cpp +++ b/plugins/BasicHistory/src/BasicHistory.cpp @@ -76,7 +76,7 @@ INT_PTR ExecuteTaskService(WPARAM wParam, LPARAM lParam); int PrebuildContactMenu(WPARAM wParam, LPARAM lParam) { - int count = EventList::GetContactMessageNumber((MCONTACT)wParam); + int count = EventList::GetContactMessageNumber(wParam); bool isInList = HistoryWindow::IsInList(GetForegroundWindow()); Menu_ShowItem(hContactMenu, count != 0); @@ -196,7 +196,7 @@ HICON LoadIconEx(int iconId, int big) INT_PTR ShowContactHistory(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; HistoryWindow::Open(hContact); return 0; } @@ -210,7 +210,7 @@ int PreShutdownHistoryModule(WPARAM, LPARAM) int HistoryContactDelete(WPARAM wParam, LPARAM) { - HistoryWindow::Close((MCONTACT)wParam); + HistoryWindow::Close(wParam); return 0; } diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp index 4d1687a101..5a6a1c2af4 100644 --- a/plugins/BasicHistory/src/HistoryWindow.cpp +++ b/plugins/BasicHistory/src/HistoryWindow.cpp @@ -427,7 +427,7 @@ void HistoryWindow::OptionsSearchingChanged() INT_PTR HistoryWindow::DeleteAllUserHistory(WPARAM wParam, LPARAM) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; HWND hWnd = NULL; int start = 0; int end = 0; diff --git a/plugins/Boltun/src/boltun.cpp b/plugins/Boltun/src/boltun.cpp index bdea12d4d9..494d652bac 100644 --- a/plugins/Boltun/src/boltun.cpp +++ b/plugins/Boltun/src/boltun.cpp @@ -212,7 +212,7 @@ static bool BoltunAutoChat(MCONTACT hContact) static int MessageEventAdded(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; HANDLE hDbEvent = (HANDLE)lParam; if (!BoltunAutoChat(hContact)) return 0; @@ -501,7 +501,7 @@ static int MessageOptInit(WPARAM wParam, LPARAM lParam) static int ContactClick(WPARAM wParam, LPARAM lParam, BOOL clickNotToChat) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; BOOL boltunautochat = db_get_b(hContact, BOLTUN_KEY, DB_CONTACT_BOLTUN_AUTO_CHAT, FALSE); BOOL boltunnottochat = db_get_b(hContact, BOLTUN_KEY, DB_CONTACT_BOLTUN_NOT_TO_CHAT, FALSE); @@ -545,7 +545,7 @@ static INT_PTR ContactClickNotToChat(WPARAM wParam, LPARAM lParam) static INT_PTR ContactClickStartChatting(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; StartChatting(hContact); return 0; } @@ -554,7 +554,7 @@ static int MessagePrebuild(WPARAM wParam, LPARAM lParam) { CLISTMENUITEM clmi = { sizeof(clmi) }; - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if (!blInit || (db_get_b(hContact,"CList","NotOnList",0) == 1)) { clmi.flags = CMIM_FLAGS | CMIF_GRAYED; diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp index d60229c7fc..6bea40587e 100644 --- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp +++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp @@ -348,7 +348,7 @@ INT_PTR MissYouAction(WPARAM wParam, LPARAM lParam) CLISTEVENT* cle = (CLISTEVENT*)lParam; hContact = cle->hContact; } - else hContact = (MCONTACT)wParam; + else hContact = wParam; CallService(MS_MSG_SENDMESSAGET, (WPARAM)hContact, 0); return 0; @@ -366,7 +366,7 @@ INT_PTR ContactReturnedAction(WPARAM wParam, LPARAM lParam) CLISTEVENT* cle = (CLISTEVENT*)lParam; hContact = cle->hContact; } - else hContact = (MCONTACT)wParam; + else hContact = wParam; if (options.iShowMessageWindow>0) CallService(MS_MSG_SENDMESSAGET, (WPARAM)hContact, 0); @@ -390,7 +390,7 @@ INT_PTR ContactStillAbsentAction(WPARAM wParam, LPARAM lParam) CLISTEVENT* cle = (CLISTEVENT*)lParam; hContact = cle->hContact; } - else hContact = (MCONTACT)wParam; + else hContact = wParam; switch (options.action2) { case GCA_DELETE: @@ -423,15 +423,15 @@ int onIconsChanged(WPARAM wParam, LPARAM lParam) */ INT_PTR MenuMissYouClick(WPARAM wParam, LPARAM lParam) { - if (db_get_b((MCONTACT)wParam, MODULE_NAME, "MissYou", 0)) { - db_set_b((MCONTACT)wParam, MODULE_NAME, "MissYou", 0); + if (db_get_b(wParam, MODULE_NAME, "MissYou", 0)) { + db_set_b(wParam, MODULE_NAME, "MissYou", 0); if (options.MissYouIcon) - ExtraIcon_Clear(hExtraIcon, (MCONTACT)wParam); + ExtraIcon_Clear(hExtraIcon, wParam); } else { - db_set_b((MCONTACT)wParam, MODULE_NAME, "MissYou", 1); + db_set_b(wParam, MODULE_NAME, "MissYou", 1); if (options.MissYouIcon) - ExtraIcon_SetIcon(hExtraIcon, (MCONTACT)wParam, "enabled_icon"); + ExtraIcon_SetIcon(hExtraIcon, wParam, "enabled_icon"); } return 0; @@ -442,13 +442,13 @@ INT_PTR MenuMissYouClick(WPARAM wParam, LPARAM lParam) */ int onPrebuildContactMenu(WPARAM wParam, LPARAM lParam) { - char *proto = GetContactProto((MCONTACT)wParam); + char *proto = GetContactProto(wParam); if (!proto) return 0; CLISTMENUITEM mi = { sizeof(mi) }; mi.flags = CMIM_ICON | CMIM_NAME | CMIF_TCHAR; - if (db_get_b((MCONTACT)wParam, MODULE_NAME, "MissYou", 0)) { + if (db_get_b(wParam, MODULE_NAME, "MissYou", 0)) { mi.ptszName = LPGENT("Disable Miss You"); mi.icolibItem = iconList[1].hIcolib; } @@ -457,14 +457,14 @@ int onPrebuildContactMenu(WPARAM wParam, LPARAM lParam) mi.icolibItem = iconList[2].hIcolib; } Menu_ModifyItem(hContactMenu, &mi); - Menu_ShowItem(hContactMenu, !db_get_b((MCONTACT)wParam, proto, "ChatRoom", 0) && (CallProtoService(proto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND)); + Menu_ShowItem(hContactMenu, !db_get_b(wParam, proto, "ChatRoom", 0) && (CallProtoService(proto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND)); return 0; } int onExtraImageApplying(WPARAM wParam, LPARAM lParam) { - if ( db_get_b((MCONTACT)wParam, MODULE_NAME, "MissYou", 0)) - ExtraIcon_SetIcon(hExtraIcon, (MCONTACT)wParam, "enabled_icon"); + if ( db_get_b(wParam, MODULE_NAME, "MissYou", 0)) + ExtraIcon_SetIcon(hExtraIcon, wParam, "enabled_icon"); return 0; } @@ -671,7 +671,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda int ContactAdded(WPARAM wParam, LPARAM lParam) { - db_set_dw((MCONTACT)wParam, MODULE_NAME, "CreationTime", (DWORD)time(0)); + db_set_dw(wParam, MODULE_NAME, "CreationTime", (DWORD)time(0)); return 0; } diff --git a/plugins/BuddyPounce/src/dialog.cpp b/plugins/BuddyPounce/src/dialog.cpp index 464e9ea1cf..3e7ccc182e 100644 --- a/plugins/BuddyPounce/src/dialog.cpp +++ b/plugins/BuddyPounce/src/dialog.cpp @@ -197,7 +197,7 @@ INT_PTR CALLBACK BuddyPounceSimpleDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LP switch(msg) { case WM_INITDIALOG: TranslateDialogDefault(hwnd); - hContact = (MCONTACT)lParam; + hContact = lParam; SetWindowLongPtr(hwnd, GWLP_USERDATA, (LPARAM)lParam); getDefaultMessage(hwnd, IDC_MESSAGE, hContact); @@ -259,7 +259,7 @@ INT_PTR CALLBACK BuddyPounceDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l msg(TranslateT("error......"), TranslateT("Buddy Pounce")); DestroyWindow(hwnd); } - wi->hContact = (MCONTACT)lParam; + wi->hContact = lParam; wi->SendIfMy = 0; wi->SendWhenThey = 0; SetWindowLongPtr(hwnd, GWLP_USERDATA, (LPARAM)wi); @@ -576,7 +576,7 @@ INT_PTR CALLBACK PounceSentDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP case WM_INITDIALOG: SetWindowLongPtr(hwnd, GWLP_USERDATA, (WPARAM)lParam); TranslateDialogDefault(hwnd); - hContact = (MCONTACT)lParam; + hContact = lParam; { DBVARIANT dbv; if (db_get_ts(hContact, modname, "PounceMsg", &dbv)) diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp index 8d87f43033..15e1649b83 100644 --- a/plugins/BuddyPounce/src/main.cpp +++ b/plugins/BuddyPounce/src/main.cpp @@ -153,14 +153,14 @@ void SendPounce(TCHAR *text, MCONTACT hContact) int UserOnlineSettingChanged(WPARAM wParam,LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam; char *szProto = GetContactProto(hContact); if((HANDLE)wParam == NULL || strcmp(cws->szSetting,"Status")) return 0; if (szProto && (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM)) { int newStatus = cws->value.wVal; - int oldStatus = db_get_w((MCONTACT)wParam,"UserOnline","OldStatus",ID_STATUS_OFFLINE); + int oldStatus = db_get_w(wParam,"UserOnline","OldStatus",ID_STATUS_OFFLINE); if (newStatus != oldStatus && wParam != NULL && newStatus != ID_STATUS_OFFLINE) { DBVARIANT dbv; @@ -192,7 +192,7 @@ int UserOnlineSettingChanged(WPARAM wParam,LPARAM lParam) INT_PTR BuddyPounceMenuCommand(WPARAM wParam, LPARAM lParam) { - if (db_get_b(NULL, modname, "UseAdvanced", 0) || db_get_b((MCONTACT)wParam, modname, "UseAdvanced", 0)) + if (db_get_b(NULL, modname, "UseAdvanced", 0) || db_get_b(wParam, modname, "UseAdvanced", 0)) CreateDialogParam(hInst,MAKEINTRESOURCE(IDD_POUNCE),0,BuddyPounceDlgProc, wParam); else CreateDialogParam(hInst,MAKEINTRESOURCE(IDD_POUNCE_SIMPLE),0,BuddyPounceSimpleDlgProc, wParam); return 0; @@ -200,7 +200,7 @@ INT_PTR BuddyPounceMenuCommand(WPARAM wParam, LPARAM lParam) INT_PTR AddSimpleMessage(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; TCHAR* message = (TCHAR*)lParam; time_t today = time(NULL); db_set_ws(hContact, modname, "PounceMsg", message); @@ -214,7 +214,7 @@ INT_PTR AddSimpleMessage(WPARAM wParam, LPARAM lParam) INT_PTR AddToPounce(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; TCHAR* message = (TCHAR*)lParam; DBVARIANT dbv; if (!db_get_ts(hContact, modname, "PounceMsg",&dbv)) diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp index c79ace857e..8c14220ac5 100644 --- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp +++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp @@ -201,7 +201,7 @@ int ContactSettingChanged(WPARAM wParam, LPARAM lParam) if (lstrcmpA(cws->szSetting, DB_MIRVER)) return 0; - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; SHOWPOPUP_DATA sd = {0}; char *szProto = GetContactProto(hContact); if (g_PreviewOptPage) diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index 2cbe60d814..ac75da25a4 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -162,7 +162,7 @@ static int clcHookSmileyAddOptionsChanged(WPARAM wParam,LPARAM lParam) static int clcHookProtoAck(WPARAM wParam, LPARAM lParam) { - return ClcDoProtoAck((MCONTACT)wParam, (ACKDATA*)lParam); + return ClcDoProtoAck(wParam, (ACKDATA*)lParam); } static int clcHookIconsChanged(WPARAM wParam, LPARAM lParam) @@ -259,7 +259,7 @@ static int clcHookSettingChanged(WPARAM wParam,LPARAM lParam) else if (!strcmp(cws->szSetting,"ListeningTo")) pcli->pfnClcBroadcast( INTM_STATUSMSGCHANGED,wParam,0); else if (!strcmp(cws->szSetting,"Transport") || !strcmp(cws->szSetting,"IsTransported")) { - pcli->pfnInvalidateDisplayNameCacheEntry((MCONTACT)wParam); + pcli->pfnInvalidateDisplayNameCacheEntry(wParam); pcli->pfnClcBroadcast( CLM_AUTOREBUILD,wParam,0); } } @@ -274,8 +274,8 @@ static int clcHookDbEventAdded(WPARAM wParam,LPARAM lParam) DBEVENTINFO dbei = { sizeof(dbei) }; db_event_get((HANDLE)lParam, &dbei); if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & DBEF_SENT)) { - ClcCacheEntry *pdnce = pcli->pfnGetCacheEntry((MCONTACT)wParam); - db_set_dw((MCONTACT)wParam, "CList", "mf_lastmsg", dbei.timestamp); + ClcCacheEntry *pdnce = pcli->pfnGetCacheEntry(wParam); + db_set_dw(wParam, "CList", "mf_lastmsg", dbei.timestamp); if (pdnce) pdnce->dwLastMsgTime = dbei.timestamp; } @@ -1476,10 +1476,10 @@ static LRESULT clcOnIntmGroupChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM w memcpy(iExtraImage, contact->iExtraImage, sizeof(iExtraImage)); flags = contact->flags; } - pcli->pfnDeleteItemFromTree(hwnd, (MCONTACT)wParam); - if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !db_get_b((MCONTACT)wParam, "CList", "Hidden", 0)) { + pcli->pfnDeleteItemFromTree(hwnd, wParam); + if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !db_get_b(wParam, "CList", "Hidden", 0)) { NMCLISTCONTROL nm; - pcli->pfnAddContactToTree(hwnd, dat, (MCONTACT)wParam, 1, 1); + pcli->pfnAddContactToTree(hwnd, dat, wParam, 1, 1); if (pcli->pfnFindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL)) { memcpy(contact->iExtraImage, iExtraImage, sizeof(iExtraImage)); if (flags & CONTACTF_CHECKED) @@ -1505,24 +1505,24 @@ static LRESULT clcOnIntmIconChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM wP BOOL needRepaint = FALSE; WORD status; RECT iconRect = {0}; - int contacticon = corecli.pfnGetContactIcon((MCONTACT)wParam); + int contacticon = corecli.pfnGetContactIcon(wParam); MCONTACT hSelItem = NULL; ClcContact *selcontact = NULL; - char *szProto = GetContactProto((MCONTACT)wParam); + char *szProto = GetContactProto(wParam); if (szProto == NULL) status = ID_STATUS_OFFLINE; else - status = GetContactCachedStatus((MCONTACT)wParam); + status = GetContactCachedStatus(wParam); BOOL image_is_special = (LOWORD(contacticon) != (LOWORD(lParam))); //check only base icons - int nHiddenStatus = CLVM_GetContactHiddenStatus((MCONTACT)wParam, szProto, dat); + int nHiddenStatus = CLVM_GetContactHiddenStatus(wParam, szProto, dat); DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE); bool isVisiblebyFilter = (( ( style & CLS_SHOWHIDDEN ) && nHiddenStatus != -1 ) || !nHiddenStatus ); bool ifVisibleByClui = !pcli->pfnIsHiddenMode( dat, status ); bool isVisible = g_CluiData.bFilterEffective&CLVM_FILTER_STATUS ? TRUE : ifVisibleByClui; - bool isIconChanged = cli_GetContactIcon((MCONTACT)wParam) != LOWORD(lParam); + bool isIconChanged = cli_GetContactIcon(wParam) != LOWORD(lParam); shouldShow = isVisiblebyFilter && ( isVisible || isIconChanged ) ; @@ -1532,14 +1532,14 @@ static LRESULT clcOnIntmIconChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM wP if (shouldShow && CallService(MS_DB_CONTACT_IS, wParam, 0)) { if (dat->selection >= 0 && pcli->pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) != -1) hSelItem = (MCONTACT)pcli->pfnContactToHItem(selcontact); - pcli->pfnAddContactToTree(hwnd, dat, (MCONTACT)wParam, (style & CLS_CONTACTLIST) == 0, 0); + pcli->pfnAddContactToTree(hwnd, dat, wParam, (style & CLS_CONTACTLIST) == 0, 0); recalcScrollBar = 1; needRepaint = TRUE; pcli->pfnFindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL); if (contact) { contact->iImage = lParam; contact->image_is_special = image_is_special; - pcli->pfnNotifyNewContact(hwnd, (MCONTACT)wParam); + pcli->pfnNotifyNewContact(hwnd, wParam); dat->needsResort = 1; } } @@ -1601,7 +1601,7 @@ static LRESULT clcOnIntmIconChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM wP static LRESULT clcOnIntmAvatarChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { ClcContact *contact; - if (FindItem(hwnd, dat, (MCONTACT)wParam, &contact, NULL, NULL, FALSE)) + if (FindItem(hwnd, dat, wParam, &contact, NULL, NULL, FALSE)) Cache_GetAvatar(dat, contact); else if (dat->use_avatar_service && !wParam) UpdateAllAvatars(dat); @@ -1613,7 +1613,7 @@ static LRESULT clcOnIntmAvatarChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM static LRESULT clcOnIntmTimeZoneChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { ClcContact *contact; - if (!FindItem(hwnd, dat, (MCONTACT)wParam, &contact, NULL, NULL, FALSE)) + if (!FindItem(hwnd, dat, wParam, &contact, NULL, NULL, FALSE)) return corecli.pfnContactListControlWndProc(hwnd,msg,wParam,lParam); if (contact) { @@ -1628,13 +1628,13 @@ static LRESULT clcOnIntmNameChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM wP { int ret = corecli.pfnContactListControlWndProc(hwnd, msg, wParam, lParam); - pcli->pfnInvalidateDisplayNameCacheEntry((MCONTACT)wParam); + pcli->pfnInvalidateDisplayNameCacheEntry(wParam); ClcContact *contact; - if (!FindItem(hwnd, dat, (MCONTACT)wParam, &contact, NULL, NULL, FALSE)) + if (!FindItem(hwnd, dat, wParam, &contact, NULL, NULL, FALSE)) return ret; - lstrcpyn(contact->szText, pcli->pfnGetContactDisplayName((MCONTACT)wParam, 0), SIZEOF(contact->szText)); + lstrcpyn(contact->szText, pcli->pfnGetContactDisplayName(wParam, 0), SIZEOF(contact->szText)); if (contact) { Cache_GetText(dat,contact,1); cliRecalcScrollBar(hwnd,dat); @@ -1653,7 +1653,7 @@ static LRESULT clcOnIntmApparentModeChanged(ClcData *dat, HWND hwnd, UINT msg, W static LRESULT clcOnIntmStatusMsgChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { ClcContact *contact; - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if (hContact == NULL || IsHContactInfo(hContact) || IsHContactGroup(hContact)) return corecli.pfnContactListControlWndProc(hwnd, msg, wParam, lParam); if (!FindItem(hwnd,dat,hContact,&contact,NULL,NULL,FALSE)) @@ -1672,7 +1672,7 @@ static LRESULT clcOnIntmNotOnListChanged(ClcData *dat, HWND hwnd, UINT msg, WPAR DBCONTACTWRITESETTING *dbcws = (DBCONTACTWRITESETTING*)lParam; ClcContact *contact; - if (!FindItem(hwnd, dat, (MCONTACT)wParam, &contact, NULL, NULL, TRUE)) + if (!FindItem(hwnd, dat, wParam, &contact, NULL, NULL, TRUE)) return corecli.pfnContactListControlWndProc(hwnd, msg, wParam, lParam); if (contact->type != CLCIT_CONTACT) @@ -1702,18 +1702,18 @@ static LRESULT clcOnIntmStatusChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM { int ret = corecli.pfnContactListControlWndProc(hwnd, msg, wParam, lParam); if (wParam != 0) { - ClcCacheEntry *pdnce = pcli->pfnGetCacheEntry((MCONTACT)wParam); + ClcCacheEntry *pdnce = pcli->pfnGetCacheEntry(wParam); if (pdnce && pdnce->m_cache_cszProto) { pdnce___SetStatus( pdnce, GetStatusForContact(pdnce->hContact,pdnce->m_cache_cszProto)); if (!dat->force_in_dialog && (dat->second_line_show || dat->third_line_show)) gtaRenewText(pdnce->hContact); - SendMessage(hwnd, INTM_ICONCHANGED, wParam, corecli.pfnGetContactIcon((MCONTACT)wParam)); + SendMessage(hwnd, INTM_ICONCHANGED, wParam, corecli.pfnGetContactIcon(wParam)); ClcContact *contact; - if (FindItem(hwnd, dat, (MCONTACT)wParam, &contact, NULL, NULL, TRUE)) { + if (FindItem(hwnd, dat, wParam, &contact, NULL, NULL, TRUE)) { if (contact && contact->type == CLCIT_CONTACT) { if (!contact->image_is_special && pdnce___GetStatus( pdnce ) > ID_STATUS_OFFLINE) - contact->iImage = corecli.pfnGetContactIcon((MCONTACT)wParam); + contact->iImage = corecli.pfnGetContactIcon(wParam); if (contact->isSubcontact && contact->subcontacts && contact->subcontacts->type == CLCIT_CONTACT) pcli->pfnClcBroadcast(INTM_STATUSCHANGED, (WPARAM)contact->subcontacts->hContact, 0); //forward status changing to host meta contact } diff --git a/plugins/Clist_modern/src/modern_clcmsgs.cpp b/plugins/Clist_modern/src/modern_clcmsgs.cpp index f0933fc4bc..d048f249a5 100644 --- a/plugins/Clist_modern/src/modern_clcmsgs.cpp +++ b/plugins/Clist_modern/src/modern_clcmsgs.cpp @@ -35,7 +35,7 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd,ClcData *dat,UINT msg,WPARAM wPara switch(msg) { case CLM_DELETEITEM: - pcli->pfnDeleteItemFromTree(hwnd, (MCONTACT)wParam); + pcli->pfnDeleteItemFromTree(hwnd, wParam); clcSetDelayTimer( TIMERID_DELAYEDRESORTCLC, hwnd, 1 ); //pcli->pfnSortCLC(hwnd, dat, 1); clcSetDelayTimer( TIMERID_RECALCSCROLLBAR, hwnd, 2 ); //pcli->pfnRecalcScrollBar(hwnd, dat); return 0; diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp index 28db20bfde..c93d4982cb 100644 --- a/plugins/Clist_modern/src/modern_clistmenus.cpp +++ b/plugins/Clist_modern/src/modern_clistmenus.cpp @@ -94,7 +94,7 @@ static IconItem iconList[] = static int FAV_OnContactMenuBuild(WPARAM wParam,LPARAM lParam) { - BYTE bContactRate = db_get_b((MCONTACT)wParam, "CList", "Rate", 0); + BYTE bContactRate = db_get_b(wParam, "CList", "Rate", 0); if ( bContactRate > SIZEOF(rates)-1) bContactRate = SIZEOF(rates)-1; @@ -149,7 +149,7 @@ static int FAV_OnContactMenuBuild(WPARAM wParam,LPARAM lParam) mi.hIcon = NULL; mi.ptszName = LPGENT("Show even if offline"); - mi.flags = CMIF_CHILDPOPUP | CMIF_TCHAR | (db_get_b((MCONTACT)wParam, "CList", "noOffline", 0) ? CMIF_CHECKED : 0); + mi.flags = CMIF_CHILDPOPUP | CMIF_TCHAR | (db_get_b(wParam, "CList", "noOffline", 0) ? CMIF_CHECKED : 0); mi.pszService = CLUI_FAVTOGGLESHOWOFFLINE; mi.popupPosition = i+100000000; mi.position = -100000000; diff --git a/plugins/Clist_modern/src/modern_clistsettings.cpp b/plugins/Clist_modern/src/modern_clistsettings.cpp index f59c355d4a..97b18e1b7b 100644 --- a/plugins/Clist_modern/src/modern_clistsettings.cpp +++ b/plugins/Clist_modern/src/modern_clistsettings.cpp @@ -417,7 +417,7 @@ int GetContactCachedStatus(MCONTACT hContact) int ContactAdded(WPARAM wParam,LPARAM lParam) { if (!MirandaExiting()) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; cli_ChangeContactIcon(hContact,pcli->pfnIconFromStatusMode((char*)GetContactCachedProtocol(hContact),ID_STATUS_OFFLINE,hContact),1); ///by FYR pcli->pfnSortContacts(); } @@ -426,7 +426,7 @@ int ContactAdded(WPARAM wParam,LPARAM lParam) int ContactSettingChanged(WPARAM wParam,LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if (MirandaExiting() || !pcli || !clistCache || hContact == NULL) return 0; @@ -494,7 +494,7 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam) else if (!strcmp(cws->szSetting,"Hidden")) { InvalidateDNCEbyPointer(hContact,pdnce,cws->value.type); if (cws->value.type == DBVT_DELETED || cws->value.bVal == 0) { - char *szProto = GetContactProto((MCONTACT)wParam); + char *szProto = GetContactProto(wParam); cli_ChangeContactIcon(hContact,pcli->pfnIconFromStatusMode(szProto, szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact,szProto,"Status",ID_STATUS_OFFLINE), hContact),1); //by FYR } diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index 86db9f4b91..0887cff8b8 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -240,7 +240,7 @@ INT_PTR CLUI::Service_ShowStatusMenu(WPARAM wParam,LPARAM lParam) INT_PTR CLUI::Service_Menu_ShowContactAvatar(WPARAM wParam,LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; db_set_b(hContact, "CList", "HideContactAvatar", 0); @@ -250,7 +250,7 @@ INT_PTR CLUI::Service_Menu_ShowContactAvatar(WPARAM wParam,LPARAM lParam) INT_PTR CLUI::Service_Menu_HideContactAvatar(WPARAM wParam,LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; db_set_b(hContact, "CList", "HideContactAvatar", 1); diff --git a/plugins/Clist_mw/src/clc.cpp b/plugins/Clist_mw/src/clc.cpp index 648071ca5e..66a00dff3b 100644 --- a/plugins/Clist_mw/src/clc.cpp +++ b/plugins/Clist_mw/src/clc.cpp @@ -145,7 +145,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L int recalcScrollBar = 0,shouldShow; MCONTACT hSelItem = NULL; struct ClcContact *selcontact = NULL; - ClcCacheEntry *cacheEntry = GetContactFullCacheEntry((MCONTACT)wParam); + ClcCacheEntry *cacheEntry = GetContactFullCacheEntry(wParam); WORD status; int needsResort = 0; @@ -158,7 +158,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L // this means an offline msg is flashing, so the contact should be shown shouldShow = (GetWindowLongPtr(hwnd,GWL_STYLE) & CLS_SHOWHIDDEN || !cacheEntry->bIsHidden) && - (!pcli->pfnIsHiddenMode(dat, status) || cacheEntry->noHiddenOffline || pcli->pfnGetContactIcon((MCONTACT)wParam) != LOWORD(lParam)); + (!pcli->pfnIsHiddenMode(dat, status) || cacheEntry->noHiddenOffline || pcli->pfnGetContactIcon(wParam) != LOWORD(lParam)); ClcContact *contact; ClcGroup *group; @@ -166,13 +166,13 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L if (shouldShow && CallService(MS_DB_CONTACT_IS, wParam, 0)) { if (dat->selection>=0 && GetRowByIndex(dat,dat->selection,&selcontact,NULL) != -1) hSelItem = (MCONTACT)pcli->pfnContactToHItem(selcontact); - AddContactToTree(hwnd, dat, (MCONTACT)wParam, 0, 0); + AddContactToTree(hwnd, dat, wParam, 0, 0); needsResort = 1; recalcScrollBar = 1; FindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL); if (contact) { contact->iImage = (WORD)lParam; - pcli->pfnNotifyNewContact(hwnd, (MCONTACT)wParam); + pcli->pfnNotifyNewContact(hwnd, wParam); dat->needsResort = 1; } } @@ -222,7 +222,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L ClcGroup *group; if (FindItem(hwnd, dat, (HANDLE)wParam, &contact, &group, NULL) && contact != NULL) { contact->flags &= ~CONTACTF_STATUSMSG; - if (!db_get_ts((MCONTACT)wParam, "CList", "StatusMsg", &dbv)) { + if (!db_get_ts(wParam, "CList", "StatusMsg", &dbv)) { int j; if (dbv.ptszVal == NULL || _tcslen(dbv.ptszVal) == 0) break; lstrcpyn(contact->szStatusMsg, dbv.ptszVal, SIZEOF(contact->szStatusMsg)); diff --git a/plugins/Clist_mw/src/clistopts.cpp b/plugins/Clist_mw/src/clistopts.cpp index 1d6d5917f5..cf834b6157 100644 --- a/plugins/Clist_mw/src/clistopts.cpp +++ b/plugins/Clist_mw/src/clistopts.cpp @@ -51,7 +51,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP { case WM_USER+1: { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; DBCONTACTWRITESETTING * ws = (DBCONTACTWRITESETTING *)lParam; if ( hContact == NULL && ws != NULL && ws->szModule != NULL && ws->szSetting != NULL && lstrcmpiA(ws->szModule,"CList") == 0 && lstrcmpiA(ws->szSetting,"UseGroups") == 0 diff --git a/plugins/Clist_mw/src/clistsettings.cpp b/plugins/Clist_mw/src/clistsettings.cpp index 43883dfd95..f562742124 100644 --- a/plugins/Clist_mw/src/clistsettings.cpp +++ b/plugins/Clist_mw/src/clistsettings.cpp @@ -260,7 +260,7 @@ int GetContactCachedStatus(MCONTACT hContact) int ContactSettingChanged(WPARAM wParam,LPARAM lParam) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam; - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; // Early exit if (hContact == NULL) @@ -315,7 +315,7 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam) if ( !strcmp(cws->szSetting,"Hidden")) { InvalidateDisplayNameCacheEntryByPDNE(hContact,pdnce,cws->value.type); if (cws->value.type == DBVT_DELETED || cws->value.bVal == 0) { - char *szProto = GetContactProto((MCONTACT)wParam); + char *szProto = GetContactProto(wParam); ChangeContactIcon(hContact,ExtIconFromStatusMode(hContact, szProto, szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE)), 1); //by FYR } } diff --git a/plugins/Clist_mw/src/contact.cpp b/plugins/Clist_mw/src/contact.cpp index fa87740548..695be8f1c9 100644 --- a/plugins/Clist_mw/src/contact.cpp +++ b/plugins/Clist_mw/src/contact.cpp @@ -167,7 +167,7 @@ void SortContacts(void) INT_PTR ContactChangeGroup(WPARAM wParam,LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; CallService(MS_CLUI_CONTACTDELETED,wParam,0); if ((HANDLE)lParam == NULL) diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp index a80632ae94..283f86f11b 100644 --- a/plugins/Clist_nicer/src/clc.cpp +++ b/plugins/Clist_nicer/src/clc.cpp @@ -78,14 +78,14 @@ static int ClcEventAdded(WPARAM wParam, LPARAM lParam) DBEVENTINFO dbei = { sizeof(dbei) }; db_event_get((HANDLE)lParam, &dbei); if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & DBEF_SENT)) { - DWORD firstTime = cfg::getDword((MCONTACT)wParam, "CList", "mf_firstEvent", 0); - DWORD count = cfg::getDword((MCONTACT)wParam, "CList", "mf_count", 0); + DWORD firstTime = cfg::getDword(wParam, "CList", "mf_firstEvent", 0); + DWORD count = cfg::getDword(wParam, "CList", "mf_count", 0); count++; new_freq = count ? (dbei.timestamp - firstTime) / count : 0x7fffffff; - cfg::writeDword((MCONTACT)wParam, "CList", "mf_freq", new_freq); - cfg::writeDword((MCONTACT)wParam, "CList", "mf_count", count); + cfg::writeDword(wParam, "CList", "mf_freq", new_freq); + cfg::writeDword(wParam, "CList", "mf_count", count); - TExtraCache *p = cfg::getCache((MCONTACT)wParam, NULL); + TExtraCache *p = cfg::getCache(wParam, NULL); if (p) { p->dwLastMsgTime = dbei.timestamp; if (new_freq) @@ -111,9 +111,9 @@ static int ClcSettingChanged(WPARAM wParam, LPARAM lParam) if ( !__strcmp(cws->szSetting, "ANSIcodepage")) pcli->pfnClcBroadcast(INTM_CODEPAGECHANGED, wParam, lParam); else if ( !__strcmp(cws->szSetting, "Timezone") || !__strcmp(cws->szSetting, "TzName")) - ReloadExtraInfo((MCONTACT)wParam); + ReloadExtraInfo(wParam); } - else if (wParam != 0 && (szProto = GetContactProto((MCONTACT)wParam)) != NULL) { + else if (wParam != 0 && (szProto = GetContactProto(wParam)) != NULL) { char *id = NULL; if ( !__strcmp(cws->szModule, "Protocol") && !__strcmp(cws->szSetting, "p")) { char *szProto_s; @@ -122,24 +122,24 @@ static int ClcSettingChanged(WPARAM wParam, LPARAM lParam) szProto_s = NULL; else szProto_s = cws->value.pszVal; - pcli->pfnChangeContactIcon((MCONTACT)wParam, IconFromStatusMode(szProto_s, szProto_s == NULL ? ID_STATUS_OFFLINE : cfg::getWord((MCONTACT)wParam, szProto_s, "Status", ID_STATUS_OFFLINE), (MCONTACT)wParam, NULL), 0); + pcli->pfnChangeContactIcon(wParam, IconFromStatusMode(szProto_s, szProto_s == NULL ? ID_STATUS_OFFLINE : cfg::getWord(wParam, szProto_s, "Status", ID_STATUS_OFFLINE), wParam, NULL), 0); } // something is being written to a protocol module if ( !__strcmp(szProto, cws->szModule)) { // was a unique setting key written? - pcli->pfnInvalidateDisplayNameCacheEntry((MCONTACT)wParam); + pcli->pfnInvalidateDisplayNameCacheEntry(wParam); if ( !__strcmp(cws->szSetting, "Status")) { - if (!cfg::getByte((MCONTACT)wParam, "CList", "Hidden", 0)) { + if (!cfg::getByte(wParam, "CList", "Hidden", 0)) { if (cfg::getByte("CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT)) { // User's state is changing, and we are hideOffline-ing if (cws->value.wVal == ID_STATUS_OFFLINE) { - pcli->pfnChangeContactIcon((MCONTACT)wParam, IconFromStatusMode(cws->szModule, cws->value.wVal, (MCONTACT)wParam, NULL), 0); + pcli->pfnChangeContactIcon(wParam, IconFromStatusMode(cws->szModule, cws->value.wVal, wParam, NULL), 0); CallService(MS_CLUI_CONTACTDELETED, wParam, 0); return 0; } - pcli->pfnChangeContactIcon((MCONTACT)wParam, IconFromStatusMode(cws->szModule, cws->value.wVal, (MCONTACT)wParam, NULL), 1); + pcli->pfnChangeContactIcon(wParam, IconFromStatusMode(cws->szModule, cws->value.wVal, wParam, NULL), 1); } - pcli->pfnChangeContactIcon((MCONTACT)wParam, IconFromStatusMode(cws->szModule, cws->value.wVal, (MCONTACT)wParam, NULL), 0); + pcli->pfnChangeContactIcon(wParam, IconFromStatusMode(cws->szModule, cws->value.wVal, wParam, NULL), 0); } SendMessage(pcli->hwndContactTree, INTM_STATUSCHANGED, wParam, lParam); return 0; @@ -149,7 +149,7 @@ static int ClcSettingChanged(WPARAM wParam, LPARAM lParam) else if (strstr(cws->szSetting, "XStatus")) SendMessage(pcli->hwndContactTree, INTM_XSTATUSCHANGED, wParam, lParam); else if ( !__strcmp(cws->szSetting, "Timezone") || !__strcmp(cws->szSetting, "TzName")) - ReloadExtraInfo((MCONTACT)wParam); + ReloadExtraInfo(wParam); if (cfg::dat.bMetaAvail && !(cfg::dat.dwFlags & CLUI_USEMETAICONS) && !__strcmp(szProto, cfg::dat.szMetaName)) { if ((lstrlenA(cws->szSetting) > 6 && !strncmp(cws->szSetting, "Status", 6)) || strstr("Default,ForceSend,Nick", cws->szSetting)) @@ -288,9 +288,9 @@ LBL_Def: memcpy(iExtraImage, contact->iExtraImage, sizeof(iExtraImage)); flags = contact->flags; } - pcli->pfnDeleteItemFromTree(hwnd, (MCONTACT)wParam); - if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !CLVM_GetContactHiddenStatus((MCONTACT)wParam, NULL, dat)) { - pcli->pfnAddContactToTree(hwnd, dat, (MCONTACT)wParam, 1, 1); + pcli->pfnDeleteItemFromTree(hwnd, wParam); + if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !CLVM_GetContactHiddenStatus(wParam, NULL, dat)) { + pcli->pfnAddContactToTree(hwnd, dat, wParam, 1, 1); if (FindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL)) { memcpy(contact->iExtraImage, iExtraImage, sizeof(iExtraImage)); if (flags & CONTACTF_CHECKED) @@ -313,7 +313,7 @@ LBL_Def: case INTM_ICONCHANGED: { int recalcScrollBar = 0; - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; WORD status = ID_STATUS_OFFLINE; int contactRemoved = 0; MCONTACT hSelItem = NULL; @@ -412,7 +412,7 @@ LBL_Def: ClcContact *contact; if (!FindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL)) break; - lstrcpyn(contact->szText, pcli->pfnGetContactDisplayName((MCONTACT)wParam, 0), SIZEOF(contact->szText)); + lstrcpyn(contact->szText, pcli->pfnGetContactDisplayName(wParam, 0), SIZEOF(contact->szText)); RTL_DetectAndSet(contact, 0); @@ -423,7 +423,7 @@ LBL_Def: case INTM_CODEPAGECHANGED: if (!FindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL)) break; - contact->codePage = cfg::getDword((MCONTACT)wParam, "Tab_SRMsg", "ANSIcodepage", cfg::getDword((MCONTACT)wParam, "UserInfo", "ANSIcodepage", CP_ACP)); + contact->codePage = cfg::getDword(wParam, "Tab_SRMsg", "ANSIcodepage", cfg::getDword(wParam, "UserInfo", "ANSIcodepage", CP_ACP)); PostMessage(hwnd, INTM_INVALIDATE, 0, 0); goto LBL_Def; @@ -467,7 +467,7 @@ LBL_Def: char *szProto = NULL; if (!FindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL)) - p = cfg::getCache((MCONTACT)wParam, NULL); + p = cfg::getCache(wParam, NULL); else { p = contact->pExtra; szProto = contact->proto; @@ -479,7 +479,7 @@ LBL_Def: case INTM_STATUSCHANGED: if (FindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL)) { - WORD wStatus = cfg::getWord((MCONTACT)wParam, contact->proto, "Status", ID_STATUS_OFFLINE); + WORD wStatus = cfg::getWord(wParam, contact->proto, "Status", ID_STATUS_OFFLINE); if (cfg::dat.bNoOfflineAvatars && wStatus != ID_STATUS_OFFLINE && contact->wStatus == ID_STATUS_OFFLINE) { contact->wStatus = wStatus; if (cfg::dat.bAvatarServiceAvail && contact->ace == NULL) @@ -494,9 +494,9 @@ LBL_Def: if (!FindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL)) break; - contact->proto = GetContactProto((MCONTACT)wParam); + contact->proto = GetContactProto(wParam); CallService(MS_CLIST_INVALIDATEDISPLAYNAME, wParam, 0); - lstrcpyn(contact->szText, pcli->pfnGetContactDisplayName((MCONTACT)wParam, 0), SIZEOF(contact->szText)); + lstrcpyn(contact->szText, pcli->pfnGetContactDisplayName(wParam, 0), SIZEOF(contact->szText)); RTL_DetectAndSet(contact, 0); @@ -545,7 +545,7 @@ LBL_Def: break; contact->flags &= ~CONTACTF_IDLE; - if (cfg::getDword((MCONTACT)wParam, szProto, "IdleTS", 0)) { + if (cfg::getDword(wParam, szProto, "IdleTS", 0)) { contact->flags |= CONTACTF_IDLE; } PostMessage(hwnd, INTM_INVALIDATE, 0, (LPARAM)contact->hContact); @@ -557,7 +557,7 @@ LBL_Def: { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam; char *szProto = (char *)cws->szModule; - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; TExtraCache *p; if (!FindItem(hwnd, dat, (HANDLE)hContact, &contact, NULL, NULL)) { diff --git a/plugins/Clist_nicer/src/clistmenus.cpp b/plugins/Clist_nicer/src/clistmenus.cpp index 9526e4f946..c71996de4c 100644 --- a/plugins/Clist_nicer/src/clistmenus.cpp +++ b/plugins/Clist_nicer/src/clistmenus.cpp @@ -78,7 +78,7 @@ static INT_PTR CALLBACK IgnoreDialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPA int pCaps; HWND hwndAdd; - hContact = (MCONTACT)lParam; + hContact = lParam; SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)hContact); dwMask = cfg::getDword(hContact, "Ignore", "Mask1", 0); SendMessage(hWnd, WM_USER + 100, (WPARAM)hContact, dwMask); @@ -365,7 +365,7 @@ static INT_PTR SetContactIgnore(WPARAM wParam, LPARAM lParam) if (hWindowListIGN == 0) hWindowListIGN = WindowList_Create(); - hWnd = WindowList_Find(hWindowListIGN, (MCONTACT)wParam); + hWnd = WindowList_Find(hWindowListIGN, wParam); if ( wParam ) { if ( hWnd == 0 ) CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_QUICKIGNORE), 0, IgnoreDialogProc, (LPARAM)wParam); diff --git a/plugins/Clist_nicer/src/clistopts.cpp b/plugins/Clist_nicer/src/clistopts.cpp index 775a6b5c1c..b6758f0fee 100644 --- a/plugins/Clist_nicer/src/clistopts.cpp +++ b/plugins/Clist_nicer/src/clistopts.cpp @@ -39,7 +39,7 @@ INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP switch (msg) { case WM_USER+1: { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; DBCONTACTWRITESETTING *ws = (DBCONTACTWRITESETTING *) lParam; if (hContact == NULL && ws != NULL && ws->szModule != NULL && ws->szSetting != NULL && lstrcmpiA(ws->szModule, "CList") == 0 && lstrcmpiA(ws->szSetting, "UseGroups") == 0 && IsWindowVisible(hwndDlg)) CheckDlgButton(hwndDlg, IDC_DISABLEGROUPS, ws->value.bVal == 0); diff --git a/plugins/ContactsPlus/src/main.cpp b/plugins/ContactsPlus/src/main.cpp index 87da26fa8e..5c604e25a8 100644 --- a/plugins/ContactsPlus/src/main.cpp +++ b/plugins/ContactsPlus/src/main.cpp @@ -59,7 +59,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) static int HookDBEventAdded(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; HANDLE hDbEvent = (HANDLE)lParam; //process the event DBEVENTINFO dbe = { sizeof(dbe) }; @@ -117,7 +117,7 @@ static bool CheckContactsServiceSupport(const char* szProto) static int HookPreBuildContactMenu(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; char *szProto = GetContactProto(hContact); int bVisible = FALSE; @@ -156,7 +156,7 @@ static int HookModulesLoaded(WPARAM wParam, LPARAM lParam) static int HookContactSettingChanged(WPARAM wParam, LPARAM lParam) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam; - char *szProto = GetContactProto((MCONTACT)wParam); + char *szProto = GetContactProto(wParam); if (strcmpnull(cws->szModule, "CList") && strcmpnull(cws->szModule, szProto)) return 0; @@ -167,13 +167,13 @@ static int HookContactSettingChanged(WPARAM wParam, LPARAM lParam) static int HookContactDeleted(WPARAM wParam, LPARAM lParam) { // if our contact gets deleted close his window - HWND h = WindowList_Find(ghSendWindowList, (MCONTACT)wParam); + HWND h = WindowList_Find(ghSendWindowList, wParam); if (h) SendMessage(h, WM_CLOSE, 0, 0); // since we hack the window list - more windows for one contact, we need to close them all - while (h = WindowList_Find(ghRecvWindowList, (MCONTACT)wParam)) + while (h = WindowList_Find(ghRecvWindowList, wParam)) SendMessage(h, WM_CLOSE, 0, 0); return 0; } @@ -181,7 +181,7 @@ static int HookContactDeleted(WPARAM wParam, LPARAM lParam) static INT_PTR ServiceSendCommand(WPARAM wParam, LPARAM lParam) { //find window for hContact - HWND hWnd = WindowList_Find(ghSendWindowList, (MCONTACT)wParam); + HWND hWnd = WindowList_Find(ghSendWindowList, wParam); if (!hWnd) CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_SEND), NULL, SendDlgProc, wParam); else { diff --git a/plugins/ContactsPlus/src/send.cpp b/plugins/ContactsPlus/src/send.cpp index a988481b6b..5913a616d2 100644 --- a/plugins/ContactsPlus/src/send.cpp +++ b/plugins/ContactsPlus/src/send.cpp @@ -251,9 +251,9 @@ INT_PTR CALLBACK SendDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara TranslateDialogDefault(hwndDlg); SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadIcon(hInst, MAKEINTRESOURCE(IDI_CONTACTS))); ResetListOptions(GetDlgItem(hwndDlg, IDC_LIST)); - SetAllContactChecks(GetDlgItem(hwndDlg, IDC_LIST), (MCONTACT)lParam); - WindowList_Add(ghSendWindowList, hwndDlg, (MCONTACT)lParam); - wndData = new TSendContactsData((MCONTACT)lParam); + SetAllContactChecks(GetDlgItem(hwndDlg, IDC_LIST), lParam); + WindowList_Add(ghSendWindowList, hwndDlg, lParam); + wndData = new TSendContactsData(lParam); SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG)wndData); // new dlg init wndData->hIcons[0] = InitMButton(hwndDlg, IDC_ADD, MAKEINTRESOURCEA(IDI_ADDCONTACT), LPGEN("Add Contact Permanently to List")); diff --git a/plugins/CountryFlags/src/extraimg.cpp b/plugins/CountryFlags/src/extraimg.cpp index 34514b0c88..f7961c65bb 100644 --- a/plugins/CountryFlags/src/extraimg.cpp +++ b/plugins/CountryFlags/src/extraimg.cpp @@ -27,15 +27,15 @@ static HANDLE hServiceDetectContactOrigin; static INT_PTR ServiceDetectContactOriginCountry(WPARAM wParam,LPARAM lParam) { int countryNumber = 0xFFFF; - char *pszProto = GetContactProto((MCONTACT)wParam); + char *pszProto = GetContactProto(wParam); /* ip detect */ if (bUseIpToCountry) - countryNumber = ServiceIpToCountry(db_get_dw((MCONTACT)wParam,pszProto,"RealIP",0),0); + countryNumber = ServiceIpToCountry(db_get_dw(wParam,pszProto,"RealIP",0),0); /* fallback */ if (countryNumber == 0xFFFF) - countryNumber = db_get_w((MCONTACT)wParam,pszProto,"Country",0); + countryNumber = db_get_w(wParam,pszProto,"Country",0); if (countryNumber == 0 || countryNumber == 0xFFFF) - countryNumber = db_get_w((MCONTACT)wParam,pszProto,"CompanyCountry",0); + countryNumber = db_get_w(wParam,pszProto,"CompanyCountry",0); return (countryNumber == 0) ? 0xFFFF : countryNumber; } @@ -167,7 +167,7 @@ static int ExtraImgSettingChanged(WPARAM wParam,LPARAM lParam) /* user details update */ if (!lstrcmpA(dbcws->szSetting,"RealIP") || !lstrcmpA(dbcws->szSetting,"Country") || !lstrcmpA(dbcws->szSetting,"CompanyCountry")) { /* Extra Image */ - SetExtraImage((MCONTACT)wParam); + SetExtraImage(wParam); /* Status Icon */ if (ServiceExists(MS_MSG_REMOVEICON)) CallFunctionBuffered(UpdateStatusIcons,0,FALSE,STATUSICON_REFRESHDELAY); diff --git a/plugins/DbEditorPP/src/main.cpp b/plugins/DbEditorPP/src/main.cpp index d0691b97ec..d4201977a2 100644 --- a/plugins/DbEditorPP/src/main.cpp +++ b/plugins/DbEditorPP/src/main.cpp @@ -56,7 +56,7 @@ void settingChanged(HWND hwnd2Settings, MCONTACT hContact, char* module, char* s int DBSettingChanged(WPARAM wParam,LPARAM lParam) { DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam; - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; char *setting; SettingListInfo* info; @@ -106,7 +106,7 @@ int DBSettingChanged(WPARAM wParam,LPARAM lParam) INT_PTR DBEditorppMenuCommand(WPARAM wParam, LPARAM lParam) { if (!hwnd2mainWindow) { // so only opens 1 at a time - hRestore = (MCONTACT)wParam; + hRestore = wParam; SetCursor(LoadCursor(NULL,IDC_WAIT)); CreateDialog(hInst, MAKEINTRESOURCE(IDD_MAIN), 0, MainDlgProc); } @@ -114,7 +114,7 @@ INT_PTR DBEditorppMenuCommand(WPARAM wParam, LPARAM lParam) ShowWindow(hwnd2mainWindow, SW_RESTORE); SetForegroundWindow(hwnd2mainWindow); if (!hRestore && wParam) { - hRestore = (MCONTACT)wParam; + hRestore = wParam; refreshTree(4); } } @@ -225,7 +225,7 @@ INT_PTR ServiceMode(WPARAM wParam, LPARAM lParam) INT_PTR ImportFromFile(WPARAM wParam, LPARAM lParam) { - ImportSettingsFromFileMenuItem((MCONTACT)wParam, (char*)lParam); + ImportSettingsFromFileMenuItem(wParam, (char*)lParam); return 0; } diff --git a/plugins/FTPFileYM/src/ftpfile.cpp b/plugins/FTPFileYM/src/ftpfile.cpp index 14eeeabb8e..4de26794e3 100644 --- a/plugins/FTPFileYM/src/ftpfile.cpp +++ b/plugins/FTPFileYM/src/ftpfile.cpp @@ -210,7 +210,7 @@ int PrebuildContactMenu(WPARAM wParam, LPARAM lParam) { bool bIsContact = false; - char *szProto = GetContactProto((MCONTACT)wParam); + char *szProto = GetContactProto(wParam); if (szProto) bIsContact = (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM) ? true : false; bool bHideRoot = opt.bHideInactive; @@ -236,7 +236,7 @@ void PrebuildMainMenu() int TabsrmmButtonPressed(WPARAM wParam, LPARAM lParam) { CustomButtonClickData *cbc = (CustomButtonClickData *)lParam; - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if (!strcmp(cbc->pszModule, MODULE) && cbc->dwButtonId == 1 && hContact) { @@ -363,7 +363,7 @@ INT_PTR ShowManagerService(WPARAM wParam, LPARAM lParam) INT_PTR ContactMenuService(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; int ftpNum = lParam & (1|2|4); int mode = lParam & (UploadJob::FTP_RAWFILE | UploadJob::FTP_ZIPFILE | UploadJob::FTP_ZIPFOLDER); return UploadFile(hContact, ftpNum, (UploadJob::EMode)mode); diff --git a/plugins/FavContacts/src/contact_cache.cpp b/plugins/FavContacts/src/contact_cache.cpp index f934015eb2..ad43d99269 100644 --- a/plugins/FavContacts/src/contact_cache.cpp +++ b/plugins/FavContacts/src/contact_cache.cpp @@ -2,7 +2,7 @@ int __cdecl CContactCache::OnDbEventAdded(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; HANDLE hEvent = (HANDLE)lParam; DBEVENTINFO dbei = {0}; diff --git a/plugins/FavContacts/src/main.cpp b/plugins/FavContacts/src/main.cpp index ee53ee1b06..139b44463a 100644 --- a/plugins/FavContacts/src/main.cpp +++ b/plugins/FavContacts/src/main.cpp @@ -892,7 +892,7 @@ INT_PTR svcShowMenuCentered(WPARAM wParam, LPARAM lParam) INT_PTR svcOpenContact(WPARAM wParam, LPARAM lParam) { - hContactToActivate = (MCONTACT)wParam; + hContactToActivate = wParam; CallService(MS_CLIST_CONTACTDOUBLECLICKED, (WPARAM)hContactToActivate, 0); return 0; } @@ -940,7 +940,7 @@ int ProcessSrmmIconClick( WPARAM wParam, LPARAM lParam ) StatusIconClickData *sicd = (StatusIconClickData *)lParam; if (lstrcmpA(sicd->szModule, "FavContacts")) return 0; - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if (!hContact) return 0; diff --git a/plugins/FileAsMessage/src/main.cpp b/plugins/FileAsMessage/src/main.cpp index 1472a5cb0e..7eb1768619 100644 --- a/plugins/FileAsMessage/src/main.cpp +++ b/plugins/FileAsMessage/src/main.cpp @@ -54,7 +54,7 @@ int OnSettingChanged(WPARAM wParam,LPARAM lParam) { DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam; - HWND hwnd = WindowList_Find(hFileList,(MCONTACT)wParam); + HWND hwnd = WindowList_Find(hFileList,wParam); PostMessage(hwnd, WM_FE_STATUSCHANGE, 0,0); //OnSkinIconsChanged(0,0); //PostMessage(hwnd, WM_FE_SKINCHANGE, 0,0); @@ -94,7 +94,7 @@ INT_PTR OnRecvFile(WPARAM wParam, LPARAM lParam) INT_PTR OnSendFile(WPARAM wParam, LPARAM lParam) { - HWND hwnd = WindowList_Find(hFileList, (MCONTACT)wParam); + HWND hwnd = WindowList_Find(hFileList, wParam); if(IsWindow(hwnd)) { SetForegroundWindow(hwnd); @@ -103,7 +103,7 @@ INT_PTR OnSendFile(WPARAM wParam, LPARAM lParam) else { if(hwnd != 0) WindowList_Remove(hFileList, hwnd); - FILEECHO *fe = new FILEECHO((MCONTACT)wParam); + FILEECHO *fe = new FILEECHO(wParam); fe->inSend = TRUE; hwnd = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_MAIN), NULL, DialogProc, (LPARAM)fe); if(hwnd == NULL) diff --git a/plugins/FingerprintNG/src/fingerprint.cpp b/plugins/FingerprintNG/src/fingerprint.cpp index 4790a2c184..36ae676557 100644 --- a/plugins/FingerprintNG/src/fingerprint.cpp +++ b/plugins/FingerprintNG/src/fingerprint.cpp @@ -838,7 +838,7 @@ static int OnIconsChanged(WPARAM wParam, LPARAM lParam) int OnExtraImageApply(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if (hContact == NULL) return 0; @@ -862,7 +862,7 @@ int OnExtraImageApply(WPARAM wParam, LPARAM lParam) static int OnContactSettingChanged(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if (hContact == NULL) return 0; diff --git a/plugins/FlashAvatars/src/cflash.cpp b/plugins/FlashAvatars/src/cflash.cpp index 7b280a6e45..134b896758 100644 --- a/plugins/FlashAvatars/src/cflash.cpp +++ b/plugins/FlashAvatars/src/cflash.cpp @@ -477,13 +477,13 @@ static int statusChanged(WPARAM wParam, LPARAM lParam) Lock l(cs); for(int i = 0; i < FlashList.getCount(); i++) { flash_avatar_item *item = FlashList[i]; - if (item->hContact == (MCONTACT)wParam) { + if (item->hContact == wParam) { IShockwaveFlash* flash = item->pFlash; if (flash) { getFace(); flash->SetVariable(L"face.emotion", _bstr_t(face).copy()); } - } else if (item->hContact > (MCONTACT)wParam) + } else if (item->hContact > wParam) break; // the list is sorted by hContact } return 0; @@ -542,7 +542,7 @@ static int eventAdded(WPARAM wParam, LPARAM lParam) face = AV_NORMAL; } - MCONTACT hContact = (dbei.flags & DBEF_SENT) ? 0 : (MCONTACT)wParam; + MCONTACT hContact = (dbei.flags & DBEF_SENT) ? 0 : wParam; for(int i=0; ihContact == hContact && !strcmpnull(dbei.szModule, item->getProto())) { diff --git a/plugins/FloatingContacts/src/main.cpp b/plugins/FloatingContacts/src/main.cpp index b303a07796..31edc604ef 100644 --- a/plugins/FloatingContacts/src/main.cpp +++ b/plugins/FloatingContacts/src/main.cpp @@ -136,7 +136,7 @@ static LPCTSTR s_fonts[FLT_FONTIDS] = static int OnContactDeleted(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; ThumbInfo *pThumb = thumbList.FindThumbByContact(hContact); if (pThumb) { pThumb->DeleteContactPos(); @@ -147,7 +147,7 @@ static int OnContactDeleted(WPARAM wParam, LPARAM lParam) static int OnContactIconChanged(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; ThumbInfo *pThumb = thumbList.FindThumbByContact(hContact); if (pThumb) { pThumb->RefreshContactIcon((int)lParam); @@ -163,7 +163,7 @@ static int OnContactDrag(WPARAM wParam, LPARAM lParam) POINT pt; GetCursorPos(&pt); - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; ThumbInfo *pThumb = thumbList.FindThumbByContact(hContact); if (pThumb == NULL) { int idStatus = GetContactStatus(hContact); @@ -188,7 +188,7 @@ static int OnContactDrop(WPARAM wParam, LPARAM lParam) RECT rcMiranda; RECT rcThumb; - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; ThumbInfo *pThumb = thumbList.FindThumbByContact(hContact); if (hNewContact == hContact && pThumb != NULL) { @@ -204,7 +204,7 @@ static int OnContactDrop(WPARAM wParam, LPARAM lParam) static int OnContactDragStop(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; ThumbInfo *pThumb = thumbList.FindThumbByContact(hContact); if (pThumb != NULL && hNewContact == hContact) { thumbList.RemoveThumb(pThumb); @@ -228,7 +228,7 @@ static int OnSkinIconsChanged(WPARAM wParam, LPARAM lParam) static int OnContactSettingChanged(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; ThumbInfo *pThumb = thumbList.FindThumbByContact(hContact); int idStatus = ID_STATUS_OFFLINE; BOOL bRefresh = TRUE; @@ -292,7 +292,7 @@ static int OnStatusModeChange(WPARAM wParam, LPARAM lParam) static int OnPrebuildContactMenu(WPARAM wParam, LPARAM lParam) { - ThumbInfo *pThumb = thumbList.FindThumbByContact((MCONTACT)wParam); + ThumbInfo *pThumb = thumbList.FindThumbByContact(wParam); Menu_ShowItem(hMenuItemRemove, pThumb != NULL); Menu_ShowItem(hMenuItemHideAll, !fcOpt.bHideAll); @@ -719,7 +719,7 @@ static INT_PTR OnMainMenu_HideAll(WPARAM wParam, LPARAM lParam) static INT_PTR OnContactMenu_Remove(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; ThumbInfo *pThumb = thumbList.FindThumbByContact(hContact); if (pThumb) { pThumb->DeleteContactPos(); diff --git a/plugins/HTTPServer/src/GuiElements.cpp b/plugins/HTTPServer/src/GuiElements.cpp index 26eb3a534c..4443a1709b 100644 --- a/plugins/HTTPServer/src/GuiElements.cpp +++ b/plugins/HTTPServer/src/GuiElements.cpp @@ -1014,7 +1014,7 @@ void SendLinkToUser(WPARAM wParam, char *pszSrvPath) { ///////////////////////////////////////////////////////////////////// static INT_PTR nShareNewFile(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; // used to be _MAX_PATH // changed it since selecting multiple files requires a bigger buffer diff --git a/plugins/HistoryLinkListPlus/src/linklist.cpp b/plugins/HistoryLinkListPlus/src/linklist.cpp index 8e3a9eaa7d..40e22ff3f9 100644 --- a/plugins/HistoryLinkListPlus/src/linklist.cpp +++ b/plugins/HistoryLinkListPlus/src/linklist.cpp @@ -123,7 +123,7 @@ int InitOptionsDlg(WPARAM wParam, LPARAM) static INT_PTR LinkList_Main(WPARAM wParam, LPARAM) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; HWND hWnd = WindowList_Find(hWindowList, hContact); if ( hWnd != NULL ) { int len; diff --git a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp index 9b2485d476..40d45560fa 100644 --- a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp +++ b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp @@ -1202,7 +1202,7 @@ This function is derived from his Wordlookup Plugin int DBUpdate(WPARAM wParam, LPARAM lParam) { HANDLE hEvent=(HANDLE)lParam; - HWND hDlg = WindowList_Find(hWindowList, (MCONTACT)wParam); + HWND hDlg = WindowList_Find(hWindowList, wParam); DIALOGPARAM *DlgParam; HMENU listMenu = GetMenu(hDlg); int linkNum = 0; diff --git a/plugins/HistorySweeperLight/src/main.cpp b/plugins/HistorySweeperLight/src/main.cpp index e19a516674..32e965599a 100644 --- a/plugins/HistorySweeperLight/src/main.cpp +++ b/plugins/HistorySweeperLight/src/main.cpp @@ -53,7 +53,7 @@ int OnIconPressed(WPARAM wParam, LPARAM lParam) if ( !(sicd->flags & MBCF_RIGHTBUTTON) && !lstrcmpA(sicd->szModule, ModuleName) && db_get_b(NULL, ModuleName, "ChangeInMW", 0)) { - int nh = sicd->dwId; MCONTACT hContact = (MCONTACT)wParam; + int nh = sicd->dwId; MCONTACT hContact = wParam; StatusIconData sid = { sizeof(sid) }; sid.szModule = ModuleName; @@ -62,7 +62,7 @@ int OnIconPressed(WPARAM wParam, LPARAM lParam) Srmm_ModifyIcon(hContact, &sid); nh = (nh + 1) % 4; - db_set_b((MCONTACT)wParam, ModuleName, "SweepHistory", (BYTE)nh); + db_set_b(wParam, ModuleName, "SweepHistory", (BYTE)nh); sid.dwId = nh; sid.flags = 0; diff --git a/plugins/IgnoreState/src/main.cpp b/plugins/IgnoreState/src/main.cpp index 669c62f3cf..68f4701581 100644 --- a/plugins/IgnoreState/src/main.cpp +++ b/plugins/IgnoreState/src/main.cpp @@ -150,7 +150,7 @@ int onModulesLoaded(WPARAM wParam,LPARAM lParam) int onContactSettingChanged(WPARAM wParam,LPARAM lParam) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam; - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if ( !lstrcmpA(cws->szModule, "Ignore") && !lstrcmpA(cws->szSetting, "Mask1")) applyExtraImage(hContact); diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp index 9bff1e4283..f1f78731d3 100644 --- a/plugins/KeyboardNotify/src/main.cpp +++ b/plugins/KeyboardNotify/src/main.cpp @@ -427,7 +427,7 @@ BOOL checkXstatus(char *szProto) // 'Pings' the FlashThread to keep the LEDs flashing. static int PluginMessageEventHook(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; HANDLE hEvent = (HANDLE)lParam; //get DBEVENTINFO without pBlob diff --git a/plugins/MetaContacts/src/addto.cpp b/plugins/MetaContacts/src/addto.cpp index 507c3961e3..a97461eb4a 100644 --- a/plugins/MetaContacts/src/addto.cpp +++ b/plugins/MetaContacts/src/addto.cpp @@ -124,7 +124,7 @@ INT_PTR CALLBACK Meta_SelectDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP case WM_INITDIALOG: TranslateDialogDefault( hwndDlg ); - if ( db_get_dw((MCONTACT)lParam, META_PROTO, META_ID, (DWORD)-1) != (DWORD)-1) { + if ( db_get_dw(lParam, META_PROTO, META_ID, (DWORD)-1) != (DWORD)-1) { MessageBox(hwndDlg, TranslateT("This contact is a MetaContact.\nYou can't add a MetaContact to another MetaContact.\n\nPlease choose another."), TranslateT("MetaContact Conflict"),MB_ICONERROR); @@ -132,7 +132,7 @@ INT_PTR CALLBACK Meta_SelectDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP return TRUE; } - if ( db_get_dw((MCONTACT)lParam, META_PROTO, META_LINK, (DWORD)-1) != (DWORD)-1) { + if ( db_get_dw(lParam, META_PROTO, META_LINK, (DWORD)-1) != (DWORD)-1) { MessageBox(hwndDlg, TranslateT("This contact is already associated to a MetaContact.\nYou cannot add a contact to multiple MetaContacts."), TranslateT("Multiple MetaContacts"),MB_ICONERROR); @@ -155,7 +155,7 @@ INT_PTR CALLBACK Meta_SelectDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP } else { // get contact display name from clist - TCHAR *ptszCDN = pcli->pfnGetContactDisplayName((MCONTACT)lParam, GCDNF_TCHAR); + TCHAR *ptszCDN = pcli->pfnGetContactDisplayName(lParam, GCDNF_TCHAR); if (!ptszCDN) ptszCDN = TranslateT("a contact"); diff --git a/plugins/MetaContacts/src/edit.cpp b/plugins/MetaContacts/src/edit.cpp index b3a8622689..7a1a2cc303 100644 --- a/plugins/MetaContacts/src/edit.cpp +++ b/plugins/MetaContacts/src/edit.cpp @@ -270,17 +270,17 @@ INT_PTR CALLBACK Meta_EditDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR EnableWindow(GetDlgItem(hwndDlg, IDC_BTN_UP), FALSE); EnableWindow(GetDlgItem(hwndDlg, IDC_BTN_DOWN), FALSE); - int nb_contacts = db_get_dw((MCONTACT)lParam, META_PROTO, "NumContacts", 0); - int default_contact_number = db_get_dw((MCONTACT)lParam, META_PROTO, "Default", (DWORD)-1); - int offline_contact_number = db_get_dw((MCONTACT)lParam, META_PROTO, "OfflineSend", (DWORD)-1); + int nb_contacts = db_get_dw(lParam, META_PROTO, "NumContacts", 0); + int default_contact_number = db_get_dw(lParam, META_PROTO, "Default", (DWORD)-1); + int offline_contact_number = db_get_dw(lParam, META_PROTO, "OfflineSend", (DWORD)-1); - changes.hMeta = (MCONTACT)lParam; + changes.hMeta = lParam; changes.num_contacts = nb_contacts; changes.num_deleted = 0; - changes.hDefaultContact = Meta_GetContactHandle((MCONTACT)lParam, default_contact_number); - changes.hOfflineContact = Meta_GetContactHandle((MCONTACT)lParam, offline_contact_number); + changes.hDefaultContact = Meta_GetContactHandle(lParam, default_contact_number); + changes.hOfflineContact = Meta_GetContactHandle(lParam, offline_contact_number); for (i = 0; i < nb_contacts; i++) - changes.hContact[i] = Meta_GetContactHandle((MCONTACT)lParam, i); + changes.hContact[i] = Meta_GetContactHandle(lParam, i); changes.force_default = MetaAPI_GetForceState((WPARAM)lParam, 0); SendMessage(hwndDlg, WMU_SETTITLE, 0, lParam); @@ -293,7 +293,7 @@ INT_PTR CALLBACK Meta_EditDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR case WMU_SETTITLE: { - TCHAR *ptszCDN = pcli->pfnGetContactDisplayName((MCONTACT)lParam, GCDNF_TCHAR); + TCHAR *ptszCDN = pcli->pfnGetContactDisplayName(lParam, GCDNF_TCHAR); if (ptszCDN == NULL) ptszCDN = TranslateT("(Unknown Contact)"); diff --git a/plugins/MetaContacts/src/meta_api.cpp b/plugins/MetaContacts/src/meta_api.cpp index 6fbad29f5d..600249cefb 100644 --- a/plugins/MetaContacts/src/meta_api.cpp +++ b/plugins/MetaContacts/src/meta_api.cpp @@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //lParam=0 //returns a handle to the parent metacontact, or null if this contact is not a subcontact INT_PTR MetaAPI_GetMeta(WPARAM wParam, LPARAM lParam) { - return (INT_PTR)(HANDLE)db_get_dw((MCONTACT)wParam, META_PROTO, "Handle", 0); + return (INT_PTR)(HANDLE)db_get_dw(wParam, META_PROTO, "Handle", 0); } //gets the handle for the default contact @@ -40,9 +40,9 @@ INT_PTR MetaAPI_GetMeta(WPARAM wParam, LPARAM lParam) { //lParam=0 //returns a handle to the default contact, or null on failure INT_PTR MetaAPI_GetDefault(WPARAM wParam, LPARAM lParam) { - DWORD default_contact_number = db_get_dw((MCONTACT)wParam, META_PROTO, "Default", -1); + DWORD default_contact_number = db_get_dw(wParam, META_PROTO, "Default", -1); if (default_contact_number != -1) { - return (INT_PTR)Meta_GetContactHandle((MCONTACT)wParam, default_contact_number); + return (INT_PTR)Meta_GetContactHandle(wParam, default_contact_number); } return 0; } @@ -52,7 +52,7 @@ INT_PTR MetaAPI_GetDefault(WPARAM wParam, LPARAM lParam) { //lParam=0 //returns a DWORD contact number, or -1 on failure INT_PTR MetaAPI_GetDefaultNum(WPARAM wParam, LPARAM lParam) { - return db_get_dw((MCONTACT)wParam, META_PROTO, "Default", -1); + return db_get_dw(wParam, META_PROTO, "Default", -1); } //gets the handle for the 'most online' contact @@ -60,7 +60,7 @@ INT_PTR MetaAPI_GetDefaultNum(WPARAM wParam, LPARAM lParam) { //lParam=0 //returns a handle to the 'most online' contact INT_PTR MetaAPI_GetMostOnline(WPARAM wParam, LPARAM lParam) { - return (INT_PTR)Meta_GetMostOnline((MCONTACT)wParam); + return (INT_PTR)Meta_GetMostOnline(wParam); } //gets the number of subcontacts for a metacontact @@ -68,7 +68,7 @@ INT_PTR MetaAPI_GetMostOnline(WPARAM wParam, LPARAM lParam) { //lParam=0 //returns a DWORD representing the number of subcontacts for the given metacontact INT_PTR MetaAPI_GetNumContacts(WPARAM wParam, LPARAM lParam) { - DWORD num_contacts = db_get_dw((MCONTACT)wParam, META_PROTO, "NumContacts", -1); + DWORD num_contacts = db_get_dw(wParam, META_PROTO, "NumContacts", -1); return num_contacts; } @@ -77,7 +77,7 @@ INT_PTR MetaAPI_GetNumContacts(WPARAM wParam, LPARAM lParam) { //lParam=(DWORD)contact number //returns a handle to the specified subcontact INT_PTR MetaAPI_GetContact(WPARAM wParam, LPARAM lParam) { - return (INT_PTR)Meta_GetContactHandle((MCONTACT)wParam, (DWORD)lParam); + return (INT_PTR)Meta_GetContactHandle(wParam, (DWORD)lParam); } //sets the default contact, using the subcontact's contact number @@ -85,15 +85,15 @@ INT_PTR MetaAPI_GetContact(WPARAM wParam, LPARAM lParam) { //lParam=(DWORD)contact number //returns 0 on success INT_PTR MetaAPI_SetDefaultContactNum(WPARAM wParam, LPARAM lParam) { - DWORD num_contacts = db_get_dw((MCONTACT)wParam, META_PROTO, "NumContacts", -1); + DWORD num_contacts = db_get_dw(wParam, META_PROTO, "NumContacts", -1); if (num_contacts == -1) return 1; if ((DWORD)lParam >= num_contacts || (DWORD)lParam < 0) return 1; - if (db_set_dw((MCONTACT)wParam, META_PROTO, "Default", (DWORD)lParam)) + if (db_set_dw(wParam, META_PROTO, "Default", (DWORD)lParam)) return 1; - NotifyEventHooks(hEventDefaultChanged, wParam, (LPARAM)Meta_GetContactHandle((MCONTACT)wParam, (int)lParam)); + NotifyEventHooks(hEventDefaultChanged, wParam, (LPARAM)Meta_GetContactHandle(wParam, (int)lParam)); return 0; } @@ -102,9 +102,9 @@ INT_PTR MetaAPI_SetDefaultContactNum(WPARAM wParam, LPARAM lParam) { //lParam=(HANDLE)hSubcontact //returns 0 on success INT_PTR MetaAPI_SetDefaultContact(WPARAM wParam, LPARAM lParam) { - MCONTACT hMeta = (MCONTACT)db_get_dw((MCONTACT)lParam, META_PROTO, "Handle", 0); - DWORD contact_number = Meta_GetContactNumber((MCONTACT)lParam); - if (contact_number == -1 || !hMeta || hMeta != (MCONTACT)wParam) + MCONTACT hMeta = (MCONTACT)db_get_dw(lParam, META_PROTO, "Handle", 0); + DWORD contact_number = Meta_GetContactNumber(lParam); + if (contact_number == -1 || !hMeta || hMeta != wParam) return 1; if (db_set_dw(hMeta, META_PROTO, "Default", contact_number)) return 1; @@ -118,9 +118,9 @@ INT_PTR MetaAPI_SetDefaultContact(WPARAM wParam, LPARAM lParam) { //lParam=(DWORD)contact number //returns 0 on success INT_PTR MetaAPI_ForceSendContactNum(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = Meta_GetContactHandle((MCONTACT)wParam, (int)lParam); + MCONTACT hContact = Meta_GetContactHandle(wParam, (int)lParam); MCONTACT hMeta = (MCONTACT)db_get_dw(hContact, META_PROTO, "Handle", 0); - if (!hContact || !hMeta || hMeta != (MCONTACT)wParam || db_get_b(hMeta, META_PROTO, "ForceDefault", 0)) + if (!hContact || !hMeta || hMeta != wParam || db_get_b(hMeta, META_PROTO, "ForceDefault", 0)) return 1; db_set_dw(hMeta, META_PROTO, "ForceSend", (DWORD)hContact); @@ -134,9 +134,9 @@ INT_PTR MetaAPI_ForceSendContactNum(WPARAM wParam, LPARAM lParam) { //lParam=(HANDLE)hSubcontact //returns 0 on success (will fail if 'force default' is in effect) INT_PTR MetaAPI_ForceSendContact(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)lParam; + MCONTACT hContact = lParam; MCONTACT hMeta = (MCONTACT)db_get_dw(hContact, META_PROTO, "Handle", 0); - if (!hContact || !hMeta || hMeta != (MCONTACT)wParam || db_get_b(hMeta, META_PROTO, "ForceDefault", 0)) + if (!hContact || !hMeta || hMeta != wParam || db_get_b(hMeta, META_PROTO, "ForceDefault", 0)) return 1; db_set_dw(hMeta, META_PROTO, "ForceSend", (DWORD)hContact); @@ -150,10 +150,10 @@ INT_PTR MetaAPI_ForceSendContact(WPARAM wParam, LPARAM lParam) { //lParam=0 //returns 0 on success (will fail if 'force default' is in effect) INT_PTR MetaAPI_UnforceSendContact(WPARAM wParam, LPARAM lParam) { - if (db_get_b((MCONTACT)wParam, META_PROTO, "ForceDefault", 0)) + if (db_get_b(wParam, META_PROTO, "ForceDefault", 0)) return 1; - db_set_dw((MCONTACT)wParam, META_PROTO, "ForceSend", 0); + db_set_dw(wParam, META_PROTO, "ForceSend", 0); NotifyEventHooks(hEventUnforceSend, wParam, lParam); return 0; @@ -169,7 +169,7 @@ INT_PTR MetaAPI_UnforceSendContact(WPARAM wParam, LPARAM lParam) { INT_PTR MetaAPI_ForceDefault(WPARAM wParam, LPARAM lParam) { // forward to menu function Meta_ForceDefault(wParam, lParam); - return db_get_b((MCONTACT)wParam, META_PROTO, "ForceDefault", 0); + return db_get_b(wParam, META_PROTO, "ForceDefault", 0); } // method to get state of 'force' for a metacontact @@ -179,11 +179,11 @@ INT_PTR MetaAPI_ForceDefault(WPARAM wParam, LPARAM lParam) { // or if none is in force, the value (DWORD)-1 will be copied // (v0.8.0.8+ returns 1 if 'force default' is true with *lParam == default contact number, else returns 0 with *lParam as above) INT_PTR MetaAPI_GetForceState(WPARAM wParam, LPARAM lParam) { - MCONTACT hMeta = (MCONTACT)wParam; + MCONTACT hMeta = wParam; if ( !hMeta) return 0; if (db_get_b(hMeta, META_PROTO, "ForceDefault", 0)) { - if (lParam) *(DWORD *)lParam = db_get_dw((MCONTACT)wParam, META_PROTO, "Default", -1); + if (lParam) *(DWORD *)lParam = db_get_dw(wParam, META_PROTO, "Default", -1); return 1; } @@ -216,7 +216,7 @@ INT_PTR MetaAPI_ConvertToMeta(WPARAM wParam, LPARAM lParam) { // lParam=(HANDLE)hMeta // add an existing contact to a metacontact INT_PTR MetaAPI_AddToMeta(WPARAM wParam, LPARAM lParam) { - return Meta_Assign((MCONTACT)wParam, (MCONTACT)lParam, FALSE); + return Meta_Assign(wParam, lParam, FALSE); } // added 0.9.5.0 (22/3/05) diff --git a/plugins/MetaContacts/src/meta_menu.cpp b/plugins/MetaContacts/src/meta_menu.cpp index 30ab1750a6..853dc18394 100644 --- a/plugins/MetaContacts/src/meta_menu.cpp +++ b/plugins/MetaContacts/src/meta_menu.cpp @@ -42,7 +42,7 @@ INT_PTR Meta_Convert(WPARAM wParam, LPARAM lParam) char *group = 0; // Get some information about the selected contact. - if ( !db_get_utf((MCONTACT)wParam, "CList", "Group", &dbv)) { + if ( !db_get_utf(wParam, "CList", "Group", &dbv)) { group = _strdup(dbv.pszVal); db_free(&dbv); } @@ -61,7 +61,7 @@ INT_PTR Meta_Convert(WPARAM wParam, LPARAM lParam) db_set_utf(hMetaContact, "CList", "Group", group); // Assign the contact to the MetaContact just created (and make default). - if ( !Meta_Assign((MCONTACT)wParam, hMetaContact, TRUE)) { + if ( !Meta_Assign(wParam, hMetaContact, TRUE)) { MessageBox(0, TranslateT("There was a problem in assigning the contact to the MetaContact"), TranslateT("Error"), MB_ICONEXCLAMATION); CallService(MS_DB_CONTACT_DELETE, (WPARAM)hMetaContact, 0); return 0; @@ -207,7 +207,7 @@ INT_PTR Meta_Delete(WPARAM wParam,LPARAM lParam) DWORD metaID; // The wParam is a metacontact - if ((metaID = db_get_dw((MCONTACT)wParam, META_PROTO, META_ID, (DWORD)-1)) != (DWORD)-1) { + if ((metaID = db_get_dw(wParam, META_PROTO, META_ID, (DWORD)-1)) != (DWORD)-1) { if ( !lParam) { // check from recursion - see second half of this function if ( MessageBox((HWND)CallService(MS_CLUI_GETHWND,0,0), TranslateT("This will remove the MetaContact permanently.\n\nProceed Anyway?"), @@ -237,7 +237,7 @@ INT_PTR Meta_Delete(WPARAM wParam,LPARAM lParam) CallService(MS_DB_CONTACT_DELETE,wParam,0); } else { - MCONTACT hMeta = (MCONTACT)db_get_dw((MCONTACT)wParam, META_PROTO, "Handle", 0); + MCONTACT hMeta = (MCONTACT)db_get_dw(wParam, META_PROTO, "Handle", 0); DWORD num_contacts = db_get_dw(hMeta, META_PROTO, "NumContacts", -1); if (num_contacts == 1) { @@ -247,7 +247,7 @@ INT_PTR Meta_Delete(WPARAM wParam,LPARAM lParam) return 0; } - Meta_RemoveContactNumber(hMeta, db_get_dw((MCONTACT)wParam, META_PROTO, "ContactNumber", -1)); + Meta_RemoveContactNumber(hMeta, db_get_dw(wParam, META_PROTO, "ContactNumber", -1)); } return 0; } @@ -265,8 +265,8 @@ INT_PTR Meta_Default(WPARAM wParam,LPARAM lParam) MCONTACT hMeta; // the wParam is a subcontact - if ((hMeta = (MCONTACT)db_get_dw((MCONTACT)wParam, META_PROTO, "Handle",0)) != 0) { - db_set_dw(hMeta, META_PROTO, "Default", (DWORD)Meta_GetContactNumber((MCONTACT)wParam)); + if ((hMeta = (MCONTACT)db_get_dw(wParam, META_PROTO, "Handle",0)) != 0) { + db_set_dw(hMeta, META_PROTO, "Default", (DWORD)Meta_GetContactNumber(wParam)); NotifyEventHooks(hEventDefaultChanged, (WPARAM)hMeta, (LPARAM)wParam); } return 0; @@ -284,15 +284,15 @@ INT_PTR Meta_Default(WPARAM wParam,LPARAM lParam) INT_PTR Meta_ForceDefault(WPARAM wParam,LPARAM lParam) { // the wParam is a MetaContact - if (db_get_dw((MCONTACT)wParam, META_PROTO, META_ID, (DWORD)-1) != (DWORD)-1) { - BOOL current = db_get_b((MCONTACT)wParam, META_PROTO, "ForceDefault", 0); + if (db_get_dw(wParam, META_PROTO, META_ID, (DWORD)-1) != (DWORD)-1) { + BOOL current = db_get_b(wParam, META_PROTO, "ForceDefault", 0); current = !current; - db_set_b((MCONTACT)wParam, META_PROTO, "ForceDefault", (BYTE)current); + db_set_b(wParam, META_PROTO, "ForceDefault", (BYTE)current); - db_set_dw((MCONTACT)wParam, META_PROTO, "ForceSend", 0); + db_set_dw(wParam, META_PROTO, "ForceSend", 0); if (current) - NotifyEventHooks(hEventForceSend, wParam, (LPARAM)Meta_GetContactHandle((MCONTACT)wParam, db_get_dw((MCONTACT)wParam, META_PROTO, "Default", -1))); + NotifyEventHooks(hEventForceSend, wParam, (LPARAM)Meta_GetContactHandle(wParam, db_get_dw(wParam, META_PROTO, "Default", -1))); else NotifyEventHooks(hEventUnforceSend, wParam, 0); } @@ -317,7 +317,7 @@ int Meta_ModifyMenu(WPARAM wParam, LPARAM lParam) WORD status; CLISTMENUITEM mi = { sizeof(mi) }; - if (db_get_dw((MCONTACT)wParam, META_PROTO, META_ID,-1) != (DWORD)-1) { + if (db_get_dw(wParam, META_PROTO, META_ID,-1) != (DWORD)-1) { // save the mouse pos in case they open a subcontact menu GetCursorPos(&menuMousePoint); @@ -333,14 +333,14 @@ int Meta_ModifyMenu(WPARAM wParam, LPARAM lParam) Menu_ModifyItem(hMenuDelete, &mi); //show subcontact menu items - int num_contacts = db_get_dw((MCONTACT)wParam, META_PROTO, "NumContacts", 0); + int num_contacts = db_get_dw(wParam, META_PROTO, "NumContacts", 0); for (int i = 0; i < MAX_CONTACTS; i++) { if (i >= num_contacts) { Menu_ShowItem(hMenuContact[i], false); continue; } - MCONTACT hContact = Meta_GetContactHandle((MCONTACT)wParam, i); + MCONTACT hContact = Meta_GetContactHandle(wParam, i); char *szProto = GetContactProto(hContact); if ( !szProto) status = ID_STATUS_OFFLINE; @@ -351,7 +351,7 @@ int Meta_ModifyMenu(WPARAM wParam, LPARAM lParam) strcpy(buf, "Login"); strcat(buf, _itoa(i, idStr, 10)); - db_get((MCONTACT)wParam, META_PROTO, buf, &dbv); + db_get(wParam, META_PROTO, buf, &dbv); switch(dbv.type) { case DBVT_ASCIIZ: mir_snprintf(buf,512,"%s",dbv.pszVal); @@ -391,7 +391,7 @@ int Meta_ModifyMenu(WPARAM wParam, LPARAM lParam) // wParam = char *szProto // lParam = BOOL show char serviceFunc[256]; - mir_snprintf(serviceFunc, 256, "%s%s", GetContactProto( Meta_GetMostOnline((MCONTACT)wParam)), PS_SEND_NUDGE); + mir_snprintf(serviceFunc, 256, "%s%s", GetContactProto( Meta_GetMostOnline(wParam)), PS_SEND_NUDGE); CallService(MS_NUDGE_SHOWMENU, (WPARAM)META_PROTO, (LPARAM)ServiceExists(serviceFunc)); } else { // This is a simple contact @@ -403,7 +403,7 @@ int Meta_ModifyMenu(WPARAM wParam, LPARAM lParam) Menu_ShowItem(hMenuConvert, false); Menu_ShowItem(hMenuEdit, false); } - else if (db_get_dw((MCONTACT)wParam, META_PROTO, META_LINK,(DWORD)-1)!=(DWORD)-1) { + else if (db_get_dw(wParam, META_PROTO, META_LINK,(DWORD)-1)!=(DWORD)-1) { // The contact is affected to a metacontact. Menu_ShowItem(hMenuDefault, true); diff --git a/plugins/MetaContacts/src/meta_services.cpp b/plugins/MetaContacts/src/meta_services.cpp index f12a2ee768..c615a01b08 100755 --- a/plugins/MetaContacts/src/meta_services.cpp +++ b/plugins/MetaContacts/src/meta_services.cpp @@ -261,7 +261,7 @@ INT_PTR MetaFilter_SendMessage(WPARAM wParam,LPARAM lParam) INT_PTR Meta_SendNudge(WPARAM wParam,LPARAM lParam) { - MCONTACT hSubContact = Meta_GetMostOnline((MCONTACT)wParam); + MCONTACT hSubContact = Meta_GetMostOnline(wParam); return ProtoCallService(GetContactProto(hSubContact), PS_SEND_NUDGE, (WPARAM)hSubContact, lParam); } @@ -601,22 +601,22 @@ int Meta_SettingChanged(WPARAM wParam, LPARAM lParam) // from here on, we're just interested in contact settings if (wParam == 0) return 0; - if ((hMeta=(MCONTACT)db_get_dw((MCONTACT)wParam, META_PROTO, "Handle",0))!=0 && CallService(MS_DB_CONTACT_IS, (WPARAM)hMeta, 0)) // just to be safe + if ((hMeta=(MCONTACT)db_get_dw(wParam, META_PROTO, "Handle",0))!=0 && CallService(MS_DB_CONTACT_IS, (WPARAM)hMeta, 0)) // just to be safe { // This contact is attached to a MetaContact. - contact_number = Meta_GetContactNumber((MCONTACT)wParam); + contact_number = Meta_GetContactNumber(wParam); if (contact_number == -1) return 0; // exit - db corruption if ( !meta_group_hack_disabled && !strcmp(dcws->szModule, "CList") && !strcmp(dcws->szSetting, "Group") && - Meta_IsEnabled() && db_get_b((MCONTACT)wParam, META_PROTO, "Hidden", 0) == 0 && !Miranda_Terminated()) { + Meta_IsEnabled() && db_get_b(wParam, META_PROTO, "Hidden", 0) == 0 && !Miranda_Terminated()) { if ((dcws->value.type == DBVT_ASCIIZ || dcws->value.type == DBVT_UTF8) && !Meta_IsHiddenGroup(dcws->value.pszVal)) { // subcontact group reassigned - copy to saved group - db_set((MCONTACT)wParam, META_PROTO, "OldCListGroup", &dcws->value); - db_set_s((MCONTACT)wParam, "CList", "Group", META_HIDDEN_GROUP); + db_set(wParam, META_PROTO, "OldCListGroup", &dcws->value); + db_set_s(wParam, "CList", "Group", META_HIDDEN_GROUP); } else if (dcws->value.type == DBVT_DELETED) { - db_unset((MCONTACT)wParam, META_PROTO, "OldCListGroup"); - db_set_s((MCONTACT)wParam, "CList", "Group", META_HIDDEN_GROUP); + db_unset(wParam, META_PROTO, "OldCListGroup"); + db_set_s(wParam, "CList", "Group", META_HIDDEN_GROUP); } } else if ( !strcmp(dcws->szSetting, "IP")) { @@ -655,7 +655,7 @@ int Meta_SettingChanged(WPARAM wParam, LPARAM lParam) db_set(hMeta, META_PROTO, buffer, &dcws->value); DBVARIANT dbv; - if (Mydb_get((MCONTACT)wParam, "CList", "MyHandle", &dbv)) { + if (Mydb_get(wParam, "CList", "MyHandle", &dbv)) { strcpy(buffer, "CListName"); strcat(buffer, _itoa(contact_number, szId, 10)); db_set(hMeta, META_PROTO, buffer, &dcws->value); @@ -682,12 +682,12 @@ int Meta_SettingChanged(WPARAM wParam, LPARAM lParam) } else if ( !strcmp(dcws->szModule, "CList") && !strcmp(dcws->szSetting, "MyHandle")) { if (dcws->value.type == DBVT_DELETED) { - char *proto = GetContactProto((MCONTACT)wParam); + char *proto = GetContactProto(wParam); strcpy(buffer, "CListName"); strcat(buffer, _itoa(contact_number, szId, 10)); DBVARIANT dbv; - if (proto && !Mydb_get((MCONTACT)wParam, proto, "Nick", &dbv)) { + if (proto && !Mydb_get(wParam, proto, "Nick", &dbv)) { db_set(hMeta, META_PROTO, buffer, &dbv); db_free(&dbv); } else { @@ -752,11 +752,11 @@ int Meta_SettingChanged(WPARAM wParam, LPARAM lParam) Meta_CopyData(hMeta); } else if ( !meta_group_hack_disabled && !strcmp(dcws->szModule, "CList") && !strcmp(dcws->szSetting, "Hidden")) { - if ((dcws->value.type == DBVT_DELETED || db_get_b((MCONTACT)wParam, "CList", "Hidden", 0) == 0) - && db_get_b((MCONTACT)wParam, META_PROTO, "Hidden", 0) == 1) + if ((dcws->value.type == DBVT_DELETED || db_get_b(wParam, "CList", "Hidden", 0) == 0) + && db_get_b(wParam, META_PROTO, "Hidden", 0) == 1) { // a subcontact we hid (e.g. jabber) has been unhidden - hide it again :( - db_set_b((MCONTACT)wParam, "CList", "Hidden", 1); + db_set_b(wParam, "CList", "Hidden", 1); } } } @@ -767,21 +767,21 @@ int Meta_SettingChanged(WPARAM wParam, LPARAM lParam) int Meta_ContactDeleted(WPARAM wParam, LPARAM lParam) { // is a subcontact - update meta contact - MCONTACT hMeta = (MCONTACT)db_get_dw((MCONTACT)wParam, META_PROTO, "Handle", 0); + MCONTACT hMeta = (MCONTACT)db_get_dw(wParam, META_PROTO, "Handle", 0); if (hMeta) { - Meta_RemoveContactNumber(hMeta, db_get_dw((MCONTACT)wParam, META_PROTO, "ContactNumber", -1)); + Meta_RemoveContactNumber(hMeta, db_get_dw(wParam, META_PROTO, "ContactNumber", -1)); NotifyEventHooks(hSubcontactsChanged, (WPARAM)hMeta, 0); return 0; } // not a subcontact - is it a metacontact? - int num_contacts = db_get_dw((MCONTACT)wParam, META_PROTO, "NumContacts", 0); + int num_contacts = db_get_dw(wParam, META_PROTO, "NumContacts", 0); if (num_contacts) NotifyEventHooks(hSubcontactsChanged, (WPARAM)wParam, 0); // remove & restore all subcontacts for (int i = 0; i < num_contacts; i++) { - MCONTACT hContact = Meta_GetContactHandle((MCONTACT)wParam, i); + MCONTACT hContact = Meta_GetContactHandle(wParam, i); if (hContact && (HANDLE)db_get_dw(hContact, META_PROTO, "Handle", 0) == (HANDLE)wParam) { if (db_get_b(hContact, META_PROTO, "IsSubcontact", 0) == 1) db_unset(hContact, META_PROTO, "IsSubcontact"); @@ -807,13 +807,13 @@ int Meta_ContactDeleted(WPARAM wParam, LPARAM lParam) INT_PTR Meta_UserIsTyping(WPARAM wParam, LPARAM lParam) { // This is a simple contact, let through the stack of protocols - if (db_get_dw((MCONTACT)wParam, META_PROTO, META_ID,(DWORD)-1) == (DWORD)-1) + if (db_get_dw(wParam, META_PROTO, META_ID,(DWORD)-1) == (DWORD)-1) return 0; // forward to sending protocol, if supported - MCONTACT most_online = Meta_GetMostOnline((MCONTACT)wParam); - Meta_CopyContactNick((MCONTACT)wParam, most_online); + MCONTACT most_online = Meta_GetMostOnline(wParam); + Meta_CopyContactNick(wParam, most_online); if ( !most_online) return 0; @@ -833,7 +833,7 @@ INT_PTR Meta_UserIsTyping(WPARAM wParam, LPARAM lParam) int Meta_ContactIsTyping(WPARAM wParam, LPARAM lParam) { MCONTACT hMeta; - if ((hMeta = (MCONTACT)db_get_dw((MCONTACT)wParam, META_PROTO, "Handle",0)) != 0 && Meta_IsEnabled()) { + if ((hMeta = (MCONTACT)db_get_dw(wParam, META_PROTO, "Handle",0)) != 0 && Meta_IsEnabled()) { // This contact is attached to a MetaContact. if ( !options.subcontact_windows) { // we don't want clicking on the clist notification icon to open the metacontact message window // try to remove any clist events we added for subcontact @@ -855,12 +855,12 @@ int Meta_ContactIsTyping(WPARAM wParam, LPARAM lParam) int Meta_UserInfo(WPARAM wParam, LPARAM lParam) { - DWORD default_contact_number = db_get_dw((MCONTACT)lParam, META_PROTO, "Default", (DWORD)-1); + DWORD default_contact_number = db_get_dw(lParam, META_PROTO, "Default", (DWORD)-1); if (default_contact_number == -1) // not a meta contact return 0; - CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)Meta_GetContactHandle((MCONTACT)lParam, default_contact_number), 0); + CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)Meta_GetContactHandle(lParam, default_contact_number), 0); return 1; } @@ -907,11 +907,11 @@ int Meta_MessageWindowEvent(WPARAM wParam, LPARAM lParam) { int Meta_ClistDoubleClicked(WPARAM wParam, LPARAM lParam) { - if (db_get_dw((MCONTACT)wParam, META_PROTO, "Default",(WORD)-1) == (WORD)-1) + if (db_get_dw(wParam, META_PROTO, "Default",(WORD)-1) == (WORD)-1) return 0; // -1 indicates no specific capability but respect 'ForceDefault' - MCONTACT most_online = Meta_GetMostOnlineSupporting((MCONTACT)wParam, PFLAGNUM_1, -1); + MCONTACT most_online = Meta_GetMostOnlineSupporting(wParam, PFLAGNUM_1, -1); if ( !most_online) return 0; @@ -1093,7 +1093,7 @@ static VOID CALLBACK sttMenuThread( PVOID param ) INT_PTR Meta_ContactMenuFunc(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = Meta_GetContactHandle((MCONTACT)wParam, (int)lParam); + MCONTACT hContact = Meta_GetContactHandle(wParam, (int)lParam); if (options.menu_function == FT_MSG) { // open message window if protocol supports message sending or chat, else simulate double click @@ -1112,7 +1112,7 @@ INT_PTR Meta_ContactMenuFunc(WPARAM wParam, LPARAM lParam) if ((caps & PF1_IMSEND) || (caps & PF1_CHAT) || (proto && strcmp(proto, "IRC") == 0)) { // set default contact for sending/status and open message window - db_set_dw((MCONTACT)wParam, META_PROTO, "Default", (DWORD)(int)lParam); + db_set_dw(wParam, META_PROTO, "Default", (DWORD)(int)lParam); NotifyEventHooks(hEventDefaultChanged, wParam, (LPARAM)hContact); CallService(MS_MSG_SENDMESSAGE, wParam, 0); } else @@ -1292,13 +1292,13 @@ int Meta_OptInit(WPARAM wParam, LPARAM lParam) int Meta_CallMostOnline(WPARAM wParam, LPARAM lParam) { - MCONTACT most_online_im = Meta_GetMostOnline((MCONTACT)wParam); + MCONTACT most_online_im = Meta_GetMostOnline(wParam); // fix nick - Meta_CopyContactNick((MCONTACT)wParam, most_online_im); + Meta_CopyContactNick(wParam, most_online_im); // fix status - Meta_FixStatus((MCONTACT)wParam); + Meta_FixStatus(wParam); // copy all other data Meta_CopyData((MCONTACT) wParam); diff --git a/plugins/MirOTR/MirOTR/src/dbfilter.cpp b/plugins/MirOTR/MirOTR/src/dbfilter.cpp index 787164e6f0..333a49be06 100644 --- a/plugins/MirOTR/MirOTR/src/dbfilter.cpp +++ b/plugins/MirOTR/MirOTR/src/dbfilter.cpp @@ -45,7 +45,7 @@ VOID CALLBACK DeleteTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTi // add prefix to sent messages int OnDatabaseEventPreAdd(WPARAM wParam, LPARAM lParam) { if (!options.prefix_messages || !lParam) return 0; - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; DBEVENTINFO *dbei = (DBEVENTINFO *)lParam; if ((dbei->eventType != EVENTTYPE_MESSAGE) || !(dbei->flags & DBEF_SENT) || (dbei->flags & DBEF_OTR_PREFIXED)) return 0; @@ -191,7 +191,7 @@ int OnDatabaseEventPreAdd(WPARAM wParam, LPARAM lParam) { info.pBlob = (PBYTE)mir_alloc(info.cbBlob); if (!db_event_get((HANDLE)lParam, &info)) { if(info.eventType == EVENTTYPE_MESSAGE) { - MCONTACT hContact = (MCONTACT)wParam, hSub; + MCONTACT hContact = wParam, hSub; if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0) hContact = hSub; @@ -296,7 +296,7 @@ int StatusModeChange(WPARAM wParam, LPARAM lParam) { int OnContactSettingChanged(WPARAM wParam, LPARAM lParam) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *)lParam; if (!lParam || strcmp(cws->szSetting, "Status") != 0) return 0; - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; int status=0; switch (cws->value.type){ case DBVT_WORD: diff --git a/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp b/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp index 35ecb94435..9a8bb85475 100644 --- a/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp +++ b/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp @@ -49,7 +49,7 @@ static INT_PTR AddMirOTRMenuItem(WPARAM, LPARAM lParam) static INT_PTR BuildMirOTRMenu(WPARAM wParam, LPARAM) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; ListParam param = { 0 }; param.MenuObjectHandle = hMirOTRMenuObject; diff --git a/plugins/MirOTR/MirOTR/src/svcs_menu.cpp b/plugins/MirOTR/MirOTR/src/svcs_menu.cpp index 12fbb966dc..2874d5f81a 100644 --- a/plugins/MirOTR/MirOTR/src/svcs_menu.cpp +++ b/plugins/MirOTR/MirOTR/src/svcs_menu.cpp @@ -24,7 +24,7 @@ int StartOTR(MCONTACT hContact) { } INT_PTR SVC_StartOTR(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam, hSub; + MCONTACT hContact = wParam, hSub; if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0) { hContact = hSub; } @@ -47,7 +47,7 @@ INT_PTR SVC_StartOTR(WPARAM wParam, LPARAM lParam) { } INT_PTR SVC_RefreshOTR(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam, hSub; + MCONTACT hContact = wParam, hSub; if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0) { hContact = hSub; } @@ -89,7 +89,7 @@ int otr_disconnect_contact(MCONTACT hContact) INT_PTR SVC_StopOTR(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; // prevent this filter from acting on injeceted messages for metas, when they are passed though the subcontact's proto send chain if (otr_disconnect_contact(hContact)) return 0; @@ -104,11 +104,11 @@ INT_PTR SVC_StopOTR(WPARAM wParam, LPARAM lParam) } INT_PTR SVC_VerifyOTR(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam, hSub; + MCONTACT hContact = wParam, hSub; if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0) hContact = hSub; - ConnContext *context = otrl_context_find_miranda(otr_user_state, (MCONTACT)wParam); + ConnContext *context = otrl_context_find_miranda(otr_user_state, wParam); if (!context) return 1; //VerifyContextDialog(context); SMPInitDialog(context); @@ -116,7 +116,7 @@ INT_PTR SVC_VerifyOTR(WPARAM wParam, LPARAM lParam) { } INT_PTR SVC_ToggleHTMLOTR(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if (db_get_b(hContact, MODULENAME, "HTMLConv", 0)) db_set_b(hContact, MODULENAME, "HTMLConv", 0); else @@ -154,7 +154,7 @@ void InitMenu() int SVC_PrebuildContactMenu(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; CLISTMENUITEM mi = { sizeof(mi) }; mi.flags = CMIM_FLAGS | CMIF_NOTOFFLINE | CMIF_TCHAR; diff --git a/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp b/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp index bebbe8ddbc..a24bc5dec5 100644 --- a/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp +++ b/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp @@ -5,7 +5,7 @@ BBButton OTRButton; int SVC_IconPressed(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; StatusIconClickData *sicd = (StatusIconClickData *)lParam; if(sicd->cbSize < (int)sizeof(StatusIconClickData)) return 0; diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp index 1da2a47d0c..b8cebd541e 100644 --- a/plugins/MirandaG15/src/CAppletManager.cpp +++ b/plugins/MirandaG15/src/CAppletManager.cpp @@ -953,7 +953,7 @@ void CAppletManager::MarkMessageAsRead(MCONTACT hContact,HANDLE hEvent) //************************************************************************ bool CAppletManager::TranslateDBEvent(CEvent *pEvent,WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; HANDLE hdbevent = (HANDLE)lParam; @@ -1582,7 +1582,7 @@ int CAppletManager::HookMessageWindowEvent(WPARAM wParam, LPARAM lParam) //************************************************************************ int CAppletManager::HookContactIsTyping(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; int iState = (int)lParam; CEvent Event; @@ -1621,7 +1621,7 @@ int CAppletManager::HookStatusChanged(WPARAM wParam, LPARAM lParam) // Prepare message and append to queue CEvent Event; - Event.hContact = (MCONTACT)wParam; + Event.hContact = wParam; int iStatus = cws->value.wVal; Event.iValue = iStatus; @@ -1821,7 +1821,7 @@ int CAppletManager::HookContactAdded(WPARAM wParam, LPARAM lParam) { CEvent Event; Event.eType = EVENT_CONTACT_ADDED; - Event.hContact = (MCONTACT)wParam; + Event.hContact = wParam; CAppletManager::GetInstance()->HandleEvent(&Event); return 0; @@ -1834,7 +1834,7 @@ int CAppletManager::HookContactDeleted(WPARAM wParam, LPARAM lParam) { CEvent Event; Event.eType = EVENT_CONTACT_DELETED; - Event.hContact = (MCONTACT)wParam; + Event.hContact = wParam; Event.bNotification = CConfig::GetBoolSetting(NOTIFY_CONTACTS); Event.bLog = Event.bNotification; @@ -1854,7 +1854,7 @@ int CAppletManager::HookSettingChanged(WPARAM wParam,LPARAM lParam) DBCONTACTWRITESETTING *dbcws = (DBCONTACTWRITESETTING*)lParam; CEvent Event; - Event.hContact = (MCONTACT)wParam; + Event.hContact = wParam; if(!lstrcmpA(dbcws->szModule,"MetaContacts")) { @@ -1865,7 +1865,7 @@ int CAppletManager::HookSettingChanged(WPARAM wParam,LPARAM lParam) if(!lstrcmpA(dbcws->szSetting,"IsSubcontact")) { Event.eType = EVENT_CONTACT_GROUP; DBVARIANT dbv; - int res = db_get_ts((MCONTACT)wParam, "CList", "Group", &dbv); + int res = db_get_ts(wParam, "CList", "Group", &dbv); if(!res) Event.strValue = dbv.ptszVal; db_free(&dbv); @@ -1910,13 +1910,13 @@ int CAppletManager::HookSettingChanged(WPARAM wParam,LPARAM lParam) if(!lstrcmpA(dbcws->szSetting,"Hidden")) { Event.eType = EVENT_CONTACT_HIDDEN; - Event.iValue = db_get_b((MCONTACT)wParam,"CList","Hidden",0); + Event.iValue = db_get_b(wParam,"CList","Hidden",0); } else if(!lstrcmpA(dbcws->szSetting,"Group")) { Event.eType = EVENT_CONTACT_GROUP; DBVARIANT dbv; - int res = db_get_ts((MCONTACT)wParam, "CList", "Group", &dbv); + int res = db_get_ts(wParam, "CList", "Group", &dbv); if(!res) Event.strValue = dbv.ptszVal; db_free(&dbv); diff --git a/plugins/MobileState/src/main.cpp b/plugins/MobileState/src/main.cpp index ef0cd8ddb7..9130103774 100644 --- a/plugins/MobileState/src/main.cpp +++ b/plugins/MobileState/src/main.cpp @@ -71,10 +71,10 @@ int ExtraIconsApply(WPARAM wParam, LPARAM lParam) if (wParam == NULL) return 0; - if (hasMobileClient((MCONTACT)wParam, lParam)) - ExtraIcon_SetIcon(hExtraIcon, (MCONTACT)wParam, "mobile_icon"); + if (hasMobileClient(wParam, lParam)) + ExtraIcon_SetIcon(hExtraIcon, wParam, "mobile_icon"); else - ExtraIcon_Clear(hExtraIcon, (MCONTACT)wParam); + ExtraIcon_Clear(hExtraIcon, wParam); return 0; } @@ -82,7 +82,7 @@ int ExtraIconsApply(WPARAM wParam, LPARAM lParam) int onContactSettingChanged(WPARAM wParam,LPARAM lParam) { DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam; - char *proto = GetContactProto((MCONTACT)wParam); + char *proto = GetContactProto(wParam); if (!proto) return 0; diff --git a/plugins/Msg_Export/src/main.cpp b/plugins/Msg_Export/src/main.cpp index 8670284b34..f05a5fc46b 100755 --- a/plugins/Msg_Export/src/main.cpp +++ b/plugins/Msg_Export/src/main.cpp @@ -62,10 +62,10 @@ static INT_PTR ShowExportHistory(WPARAM wParam, LPARAM /*lParam*/) { if (bUseInternalViewer()) { - bShowFileViewer((MCONTACT)wParam); + bShowFileViewer(wParam); return 0; } - bOpenExternaly((MCONTACT)wParam); + bOpenExternaly(wParam); return 0; } diff --git a/plugins/NewEventNotify/src/main.cpp b/plugins/NewEventNotify/src/main.cpp index 3c559d4321..642a58fcda 100644 --- a/plugins/NewEventNotify/src/main.cpp +++ b/plugins/NewEventNotify/src/main.cpp @@ -62,7 +62,7 @@ HANDLE hHookedDeletedEvent; int HookedNewEvent(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; PLUGIN_DATA* pdata; //are popups currently enabled? diff --git a/plugins/NewXstatusNotify/src/common.h b/plugins/NewXstatusNotify/src/common.h index 53ab39ce15..544e7ca667 100644 --- a/plugins/NewXstatusNotify/src/common.h +++ b/plugins/NewXstatusNotify/src/common.h @@ -131,7 +131,7 @@ typedef struct { } STATUSMSGINFO; /* -MCONTACT hContact = (MCONTACT)wParam; +MCONTACT hContact = wParam; WORD oldStatus = LOWORD(lParam); WORD newStatus = HIWORD(lParam); oldStatus is the status the contact was before the change. diff --git a/plugins/NewXstatusNotify/src/indsnd.cpp b/plugins/NewXstatusNotify/src/indsnd.cpp index 19ecaa0d90..b4c0330129 100644 --- a/plugins/NewXstatusNotify/src/indsnd.cpp +++ b/plugins/NewXstatusNotify/src/indsnd.cpp @@ -114,7 +114,7 @@ INT_PTR CALLBACK DlgProcSoundUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA case WM_INITDIALOG: TranslateDialogDefault(hwndDlg); { - hContact = (MCONTACT)lParam; + hContact = lParam; char *szProto = GetContactProto(hContact); ListView_SetImageList(hList, GetStatusIconsImgList(szProto), LVSIL_SMALL); diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index 39b9d5a9cb..1bd318505a 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -543,7 +543,7 @@ int ProcessStatus(DBCONTACTWRITESETTING *cws, MCONTACT hContact) int ContactSettingChanged(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if (hContact == NULL) return 0; @@ -751,7 +751,7 @@ int ContactStatusChanged(WPARAM wParam, LPARAM lParam) { WORD oldStatus = LOWORD(lParam); WORD newStatus = HIWORD(lParam); - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; bool bEnablePopup = true, bEnableSound = true; char *hlpProto = GetContactProto(hContact); diff --git a/plugins/New_GPG/src/clist.cpp b/plugins/New_GPG/src/clist.cpp index 1cd6088b9c..7057db9813 100644 --- a/plugins/New_GPG/src/clist.cpp +++ b/plugins/New_GPG/src/clist.cpp @@ -26,6 +26,6 @@ int onExtraImageListRebuilding(WPARAM, LPARAM) int onExtraImageApplying(WPARAM wParam, LPARAM) { - setClistIcon((MCONTACT)wParam); + setClistIcon(wParam); return 0; } diff --git a/plugins/New_GPG/src/srmm.cpp b/plugins/New_GPG/src/srmm.cpp index 154ff32c3d..aab34ee826 100644 --- a/plugins/New_GPG/src/srmm.cpp +++ b/plugins/New_GPG/src/srmm.cpp @@ -34,7 +34,7 @@ int __cdecl onWindowEvent(WPARAM wParam, LPARAM lParam) { int __cdecl onIconPressed(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; MCONTACT hMeta = NULL; if(metaIsProtoMetaContacts(hContact)) { diff --git a/plugins/NewsAggregator/Src/Options.cpp b/plugins/NewsAggregator/Src/Options.cpp index b7c104b65a..c2c64edd6b 100644 --- a/plugins/NewsAggregator/Src/Options.cpp +++ b/plugins/NewsAggregator/Src/Options.cpp @@ -325,7 +325,7 @@ INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LP SetWindowText(hwndDlg, TranslateT("Change Feed")); SendDlgItemMessage(hwndDlg, IDC_CHECKTIME, UDM_SETRANGE32, 0, 999); - MCONTACT hContact = (MCONTACT)lParam; + MCONTACT hContact = lParam; WindowList_Add(hChangeFeedDlgList, hwndDlg, hContact); Utils_RestoreWindowPositionNoSize(hwndDlg, hContact, MODULE, "ChangeDlg"); DBVARIANT dbv; diff --git a/plugins/NewsAggregator/Src/Services.cpp b/plugins/NewsAggregator/Src/Services.cpp index 5ee8862342..67a194ae3f 100644 --- a/plugins/NewsAggregator/Src/Services.cpp +++ b/plugins/NewsAggregator/Src/Services.cpp @@ -172,7 +172,7 @@ INT_PTR AddFeed(WPARAM wParam, LPARAM lParam) INT_PTR ChangeFeed(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; HWND hChangeFeedDlg = WindowList_Find(hChangeFeedDlgList, hContact); if (!hChangeFeedDlg) { hChangeFeedDlg = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_ADDFEED), NULL, DlgProcChangeFeedMenu, (LPARAM)hContact); @@ -198,7 +198,7 @@ INT_PTR ExportFeeds(WPARAM wParam, LPARAM lParam) INT_PTR CheckFeed(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if(IsMyContact(hContact)) UpdateListAdd(hContact); if ( !ThreadRunning) diff --git a/plugins/NoHistory/src/dllmain.cpp b/plugins/NoHistory/src/dllmain.cpp index f9404d1a3c..7258e4962e 100644 --- a/plugins/NoHistory/src/dllmain.cpp +++ b/plugins/NoHistory/src/dllmain.cpp @@ -114,7 +114,7 @@ void CALLBACK TimerProc(HWND hWnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) int OnDatabaseEventAdd(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; HANDLE hDBEvent = (HANDLE)lParam; // history not disabled for this contact @@ -141,7 +141,7 @@ int OnDatabaseEventAdd(WPARAM wParam, LPARAM lParam) INT_PTR ServiceClear(WPARAM wParam, LPARAM lParam) { if (MessageBox(0, TranslateT("This operation will PERMANENTLY REMOVE all history for this contact.\nAre you sure you want to do this?"), TranslateT("Clear History"), MB_YESNO | MB_ICONWARNING) == IDYES) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; RemoveAllEvents(hContact); } @@ -150,7 +150,7 @@ INT_PTR ServiceClear(WPARAM wParam, LPARAM lParam) int PrebuildContactMenu(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; bool remove = db_get_b(hContact, MODULE, DBSETTING_REMOVE, 0) != 0; char *proto = GetContactProto(hContact); @@ -172,7 +172,7 @@ int PrebuildContactMenu(WPARAM wParam, LPARAM lParam) INT_PTR ServiceToggle(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; int remove = db_get_b(hContact, MODULE, DBSETTING_REMOVE, 0) != 0; remove = !remove; @@ -218,7 +218,7 @@ int WindowEvent(WPARAM wParam, LPARAM lParam) int IconPressed(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; StatusIconClickData *sicd = (StatusIconClickData *)lParam; if (sicd->cbSize < (int)sizeof(StatusIconClickData)) return 0; diff --git a/plugins/Non-IM Contact/src/dialog.cpp b/plugins/Non-IM Contact/src/dialog.cpp index 8e7e7d2c04..2cf8ce46f7 100644 --- a/plugins/Non-IM Contact/src/dialog.cpp +++ b/plugins/Non-IM Contact/src/dialog.cpp @@ -320,7 +320,7 @@ INT_PTR addContact(WPARAM wParam,LPARAM lParam) INT_PTR editContact(WPARAM wParam,LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; char tmp[256]; if (!hContact) { hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0); diff --git a/plugins/Non-IM Contact/src/main.cpp b/plugins/Non-IM Contact/src/main.cpp index 1d8b9cf623..3962379e05 100644 --- a/plugins/Non-IM Contact/src/main.cpp +++ b/plugins/Non-IM Contact/src/main.cpp @@ -28,13 +28,13 @@ INT_PTR doubleClick(WPARAM wParam,LPARAM lParam) { char program[MAX_PATH], params[MAX_PATH]; int shellEXEerror = 0; - char* proto = GetContactProto((MCONTACT)wParam); + char* proto = GetContactProto(wParam); if (proto && !strcmp(proto, MODNAME)) { if (GetKeyState(VK_CONTROL)&0x8000) // ctrl is pressed editContact((WPARAM)(HANDLE)wParam, (LPARAM)NULL); // for later when i add a second double click setting - else if (db_get_static((MCONTACT)wParam, MODNAME, "Program", program) && strcmp(program, "")) + else if (db_get_static(wParam, MODNAME, "Program", program) && strcmp(program, "")) { - if (!db_get_static((MCONTACT)wParam, MODNAME, "ProgramParams", params) ) + if (!db_get_static(wParam, MODNAME, "ProgramParams", params) ) strcpy(params, ""); if (strstr(program, "http://") || strstr(program, "https://")) CallService(MS_UTILS_OPENURL,1,(LPARAM)program); diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp index 3a0f14438f..a7a6bec972 100644 --- a/plugins/Nudge/src/main.cpp +++ b/plugins/Nudge/src/main.cpp @@ -41,7 +41,7 @@ INT_PTR NudgeShowMenu(WPARAM wParam,LPARAM lParam) INT_PTR NudgeSend(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; char *protoName = GetContactProto(hContact); int diff = time(NULL) - db_get_dw(hContact, "Nudge", "LastSent", time(NULL) - 30); if (diff < GlobalNudge.sendTimeSec) { @@ -81,7 +81,7 @@ void OpenContactList() int NudgeReceived(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; char *protoName = GetContactProto(hContact); DWORD currentTimestamp = time(NULL); diff --git a/plugins/Nudge/src/shake.cpp b/plugins/Nudge/src/shake.cpp index 3f6ff396bc..946768fd44 100644 --- a/plugins/Nudge/src/shake.cpp +++ b/plugins/Nudge/src/shake.cpp @@ -50,7 +50,7 @@ INT_PTR ShakeChat(WPARAM wParam, LPARAM lParam) MessageWindowInputData mwid; mwd.cbSize = sizeof(MessageWindowData); - mwd.hContact = Nudge_GethContact((MCONTACT)wParam); + mwd.hContact = Nudge_GethContact(wParam); mwd.uFlags = MSG_WINDOW_UFLAG_MSG_BOTH; mwid.cbSize = sizeof(MessageWindowInputData); diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp index 23f1a8359b..5400e88502 100644 --- a/plugins/PasteIt/src/PasteIt.cpp +++ b/plugins/PasteIt/src/PasteIt.cpp @@ -212,7 +212,7 @@ void PasteIt(MCONTACT hContact, int mode) int TabsrmmButtonPressed(WPARAM wParam, LPARAM lParam) { CustomButtonClickData *cbc = (CustomButtonClickData *)lParam; - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if (!strcmp(cbc->pszModule, MODULE) && cbc->dwButtonId == 1 && hContact) { @@ -274,7 +274,7 @@ int PrebuildContactMenu(WPARAM wParam, LPARAM lParam) { bool bIsContact = false; - char *szProto = GetContactProto((MCONTACT)wParam); + char *szProto = GetContactProto(wParam); if (szProto && (INT_PTR)szProto != CALLSERVICE_NOTFOUND) bIsContact = (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM) != 0; @@ -287,7 +287,7 @@ INT_PTR ContactMenuService(WPARAM wParam, LPARAM lParam) if(lParam >= DEF_PAGES_START) Options::instance->SetDefWeb(lParam - DEF_PAGES_START); else { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; PasteIt(hContact, lParam); } return 0; diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp index 6a9a5a9b8b..608d0394dd 100644 --- a/plugins/Popup/src/popup_wnd2.cpp +++ b/plugins/Popup/src/popup_wnd2.cpp @@ -1078,7 +1078,7 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara break; case UM_AVATARCHANGED: - if ((MCONTACT)wParam == m_hContact) + if (wParam == m_hContact) { m_avatar->invalidate(); update(); @@ -1498,7 +1498,7 @@ LRESULT CALLBACK MenuHostWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM { case UM_SHOWMENU: { - hContact = (MCONTACT)lParam; + hContact = lParam; POINT pt = {0}; HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT,(WPARAM)hContact,0); GetCursorPos(&pt); diff --git a/plugins/Popup/src/srmm_menu.cpp b/plugins/Popup/src/srmm_menu.cpp index 5daf4ce463..64fe37d1ba 100644 --- a/plugins/Popup/src/srmm_menu.cpp +++ b/plugins/Popup/src/srmm_menu.cpp @@ -73,7 +73,7 @@ static int SrmmMenu_ProcessIconClick(WPARAM wParam, LPARAM lParam) if (lstrcmpA(sicd->szModule, MODULNAME)) return 0; - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if (!hContact) return 0; diff --git a/plugins/QuickReplies/src/events.cpp b/plugins/QuickReplies/src/events.cpp index e697f861e5..f570d52306 100644 --- a/plugins/QuickReplies/src/events.cpp +++ b/plugins/QuickReplies/src/events.cpp @@ -117,7 +117,7 @@ int OnButtonPressed(WPARAM wParam, LPARAM lParam) if (dbv.ptszVal == NULL) replyList.push_back(_T("")); else - replyList.push_back((TCHAR*)variables_parsedup(dbv.ptszVal, 0, (MCONTACT)wParam)); + replyList.push_back((TCHAR*)variables_parsedup(dbv.ptszVal, 0, wParam)); if (_tcscmp(dbv.ptszVal, _T("---"))) AppendMenu((HMENU)hMenu, MF_STRING, i + 1, replyList[i].c_str()); diff --git a/plugins/Rate/src/main.cpp b/plugins/Rate/src/main.cpp index ad5b33bb17..a1622e3879 100644 --- a/plugins/Rate/src/main.cpp +++ b/plugins/Rate/src/main.cpp @@ -117,7 +117,7 @@ int onContactSettingChanged(WPARAM wParam,LPARAM lParam) DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam; if (wParam != NULL && !lstrcmpA(cws->szModule,"CList") && !lstrcmpA(cws->szSetting,"Rate")) - setExtraIcon((MCONTACT)wParam, cws->value.type == DBVT_DELETED ? 0 : cws->value.bVal); + setExtraIcon(wParam, cws->value.type == DBVT_DELETED ? 0 : cws->value.bVal); return 0; } diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp index ed51d25a20..ae096f95e3 100644 --- a/plugins/RecentContacts/src/RecentContacts.cpp +++ b/plugins/RecentContacts/src/RecentContacts.cpp @@ -484,7 +484,7 @@ static int OnPrebuildContactMenu (WPARAM wParam, LPARAM lParam) CLISTMENUITEM clmi = { sizeof(clmi) }; clmi.flags = CMIM_NAME | CMIF_TCHAR; - if ( db_get_b((MCONTACT)wParam, dbLastUC_ModuleName, dbLastUC_IgnoreContact, 0) == 0) + if ( db_get_b(wParam, dbLastUC_ModuleName, dbLastUC_IgnoreContact, 0) == 0) clmi.ptszName = TranslateT("Ignore Contact"); else clmi.ptszName = TranslateT("Show Contact"); @@ -515,7 +515,7 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam) INT_PTR ToggleIgnore (WPARAM wParam, LPARAM lParam) { if (wParam != NULL) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; int state = db_get_b(hContact, dbLastUC_ModuleName, dbLastUC_IgnoreContact, 0) == 0 ? 1 : 0 ; db_set_b(hContact, dbLastUC_ModuleName, dbLastUC_IgnoreContact, state); return state; diff --git a/plugins/SMS/src/SMS_svc.cpp b/plugins/SMS/src/SMS_svc.cpp index 6c9951e3ff..09578a6dd7 100644 --- a/plugins/SMS/src/SMS_svc.cpp +++ b/plugins/SMS/src/SMS_svc.cpp @@ -54,7 +54,7 @@ int LoadModules(void) int SmsRebuildContactMenu(WPARAM wParam,LPARAM lParam) { - Menu_ShowItem(ssSMSSettings.hContactMenuItems[0], GetContactPhonesCount((MCONTACT)wParam)); + Menu_ShowItem(ssSMSSettings.hContactMenuItems[0], GetContactPhonesCount(wParam)); return 0; } @@ -65,11 +65,11 @@ int SendSMSMenuCommand(WPARAM wParam,LPARAM lParam) // user clicked on the "SMS Message" on one of the users if (wParam) { - hwndSendSms = SendSMSWindowIsOtherInstanceHContact((MCONTACT)wParam); + hwndSendSms = SendSMSWindowIsOtherInstanceHContact(wParam); if (hwndSendSms) SetFocus(hwndSendSms); else - hwndSendSms = SendSMSWindowAdd((MCONTACT)wParam); + hwndSendSms = SendSMSWindowAdd(wParam); } // user clicked on the "SMS Send" in the Main Menu else{ diff --git a/plugins/SMS/src/receive.cpp b/plugins/SMS/src/receive.cpp index 0e619ea6c2..855123d961 100644 --- a/plugins/SMS/src/receive.cpp +++ b/plugins/SMS/src/receive.cpp @@ -211,7 +211,7 @@ int handleNewMessage(WPARAM wParam, LPARAM lParam) { char szServiceFunction[MAX_PATH], *pszServiceFunctionName; TCHAR szToolTip[MAX_PATH]; - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; HANDLE hDbEvent = (HANDLE)lParam; DBEVENTINFO dbei = { sizeof(dbei) }; diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index 2c7755f21c..6584212f9f 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -1093,7 +1093,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP break; case DM_CLISTSETTINGSCHANGED: - if ((MCONTACT)wParam == dat->windowData.hContact) { + if (wParam == dat->windowData.hContact) { if (dat->windowData.hContact && dat->szProto) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam; char idbuf[128]; @@ -1353,7 +1353,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP case DM_REMAKELOG: dat->lastEventType = -1; - if (wParam == 0 || (MCONTACT)wParam == dat->windowData.hContact) + if (wParam == 0 || wParam == dat->windowData.hContact) StreamInEvents(hwndDlg, dat->hDbEventFirst, -1, 0); InvalidateRect(GetDlgItem(hwndDlg, IDC_LOG), NULL, FALSE); @@ -1390,7 +1390,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP break; case HM_DBEVENTADDED: - if ((MCONTACT)wParam == dat->windowData.hContact) { + if (wParam == dat->windowData.hContact) { HANDLE hDbEvent = (HANDLE)lParam; DBEVENTINFO dbei = { sizeof(dbei) }; db_event_get(hDbEvent, &dbei); diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index ffc1f0c14a..fb812e2589 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -96,7 +96,7 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam) if (dbei.eventType == EVENTTYPE_MESSAGE && (dbei.flags & DBEF_READ)) return 0; - HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam); + HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, wParam); if (hwnd) SendMessage(hwnd, HM_DBEVENTADDED, wParam, lParam); @@ -108,9 +108,9 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam) if (hwnd == NULL) { /* new message */ SkinPlaySound("AlertMsg"); - if (IsAutoPopup((MCONTACT)wParam)) { + if (IsAutoPopup(wParam)) { NewMessageWindowLParam newData = { 0 }; - newData.hContact = (MCONTACT)wParam; + newData.hContact = wParam; HWND hParent = GetParentWindow(newData.hContact, FALSE); newData.flags = NMWLP_INCOMING; CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_MSG), hParent, DlgProcMessage, (LPARAM)&newData); @@ -123,7 +123,7 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam) CLISTEVENT cle = { sizeof(cle) }; cle.flags = CLEF_TCHAR; - cle.hContact = (MCONTACT)wParam; + cle.hContact = wParam; cle.hDbEvent = (HANDLE)lParam; cle.hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE); cle.pszService = "SRMsg/ReadMessage"; @@ -137,14 +137,14 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam) static INT_PTR SendMessageCommandW(WPARAM wParam, LPARAM lParam) { /* does the MCONTACT's protocol support IM messages? */ - char *szProto = GetContactProto((MCONTACT)wParam); + char *szProto = GetContactProto(wParam); if (szProto == NULL) return 1; /* unknown contact */ if (!CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND) return 1; - HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam); + HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, wParam); if (hwnd != NULL) { if (lParam) { HWND hEdit = GetDlgItem(hwnd, IDC_MESSAGE); @@ -155,7 +155,7 @@ static INT_PTR SendMessageCommandW(WPARAM wParam, LPARAM lParam) } else { NewMessageWindowLParam newData = { 0 }; - newData.hContact = (MCONTACT)wParam; + newData.hContact = wParam; newData.szInitialText = (const char *) lParam; newData.isWchar = 1; HWND hParent = GetParentWindow(newData.hContact, FALSE); @@ -166,7 +166,7 @@ static INT_PTR SendMessageCommandW(WPARAM wParam, LPARAM lParam) static INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam) { - char *szProto = GetContactProto((MCONTACT)wParam); + char *szProto = GetContactProto(wParam); //logInfo("Show message window for: %s (%s)", CallService(MS_CLIST_GETCONTACTDISPLAYNAME, wParam, 0), szProto); if (szProto) { /* does the MCONTACT's protocol support IM messages? */ @@ -176,7 +176,7 @@ static INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam) else /* unknown contact */ return 1; - HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam); + HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, wParam); if (hwnd != NULL) { if (lParam) { HWND hEdit = GetDlgItem(hwnd, IDC_MESSAGE); @@ -187,7 +187,7 @@ static INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam) } else { NewMessageWindowLParam newData = { 0 }; - newData.hContact = (MCONTACT)wParam; + newData.hContact = wParam; newData.szInitialText = (const char *)lParam; HWND hParent = GetParentWindow(newData.hContact, FALSE); CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_MSG), hParent, DlgProcMessage, (LPARAM)& newData); @@ -210,7 +210,7 @@ static int TypingMessage(WPARAM wParam, LPARAM lParam) SkinPlaySound((lParam) ? "TNStart" : "TNStop"); - HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam); + HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, wParam); if (hwnd) SendMessage(hwnd, DM_TYPING, 0, lParam); else if (lParam && (g_dat.flags2 & SMF2_SHOWTYPINGTRAY)) { @@ -231,7 +231,7 @@ static int TypingMessage(WPARAM wParam, LPARAM lParam) CLISTEVENT cle = {0}; cle.cbSize = sizeof(cle); - cle.hContact = (MCONTACT)wParam; + cle.hContact = wParam; cle.hDbEvent = (HANDLE)1; cle.flags = CLEF_ONLYAFEW | CLEF_TCHAR; cle.hIcon = GetCachedIcon("scriver_TYPING"); @@ -247,7 +247,7 @@ static int TypingMessage(WPARAM wParam, LPARAM lParam) static int MessageSettingChanged(WPARAM wParam, LPARAM lParam) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam; - char *szProto = GetContactProto((MCONTACT)wParam); + char *szProto = GetContactProto(wParam); if (lstrcmpA(cws->szModule, "CList") && (szProto == NULL || lstrcmpA(cws->szModule, szProto))) return 0; WindowList_Broadcast(g_dat.hMessageWindowList, DM_CLISTSETTINGSCHANGED, wParam, lParam); @@ -257,7 +257,7 @@ static int MessageSettingChanged(WPARAM wParam, LPARAM lParam) static int ContactDeleted(WPARAM wParam, LPARAM lParam) { HWND hwnd; - if ((hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam))) + if ((hwnd = WindowList_Find(g_dat.hMessageWindowList, wParam))) SendMessage(hwnd, WM_CLOSE, 0, 0); return 0; } @@ -338,9 +338,9 @@ static INT_PTR GetWindowData(WPARAM wParam, LPARAM lParam) static INT_PTR SetStatusText(WPARAM wParam, LPARAM lParam) { - HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam); + HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, wParam); if (hwnd == NULL) - hwnd = SM_FindWindowByContact((MCONTACT)wParam); + hwnd = SM_FindWindowByContact(wParam); if (hwnd == NULL) return 1; @@ -354,7 +354,7 @@ static INT_PTR SetStatusText(WPARAM wParam, LPARAM lParam) static int PrebuildContactMenu(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if (hContact == 0) return 0; @@ -376,7 +376,7 @@ static int AvatarChanged(WPARAM wParam, LPARAM lParam) if (wParam == 0) // protocol picture has changed... WindowList_Broadcast(g_dat.hMessageWindowList, DM_AVATARCHANGED, wParam, lParam); else { - HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam); + HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, wParam); SendMessage(hwnd, DM_AVATARCHANGED, wParam, lParam); } return 0; @@ -407,9 +407,9 @@ void ChangeStatusIcons() int StatusIconPressed(WPARAM wParam, LPARAM lParam) { StatusIconClickData *sicd = (StatusIconClickData *) lParam; - HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam); + HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, wParam); if (hwnd == NULL) - hwnd = SM_FindWindowByContact((MCONTACT)wParam); + hwnd = SM_FindWindowByContact(wParam); if (hwnd != NULL) { if (!strcmp(SRMMMOD, sicd->szModule)) { diff --git a/plugins/Scriver/src/msgwindow.cpp b/plugins/Scriver/src/msgwindow.cpp index e079d7e7af..f51ea244eb 100644 --- a/plugins/Scriver/src/msgwindow.cpp +++ b/plugins/Scriver/src/msgwindow.cpp @@ -1207,7 +1207,7 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR return TRUE; case CM_ADDCHILD: - AddChild(dat, (HWND)wParam, (MCONTACT)lParam); + AddChild(dat, (HWND)wParam, lParam); return TRUE; case CM_ACTIVATECHILD: diff --git a/plugins/Scriver/src/statusicon.cpp b/plugins/Scriver/src/statusicon.cpp index 65af9ce66e..dd370470e7 100644 --- a/plugins/Scriver/src/statusicon.cpp +++ b/plugins/Scriver/src/statusicon.cpp @@ -61,7 +61,7 @@ void CheckStatusIconClick(MCONTACT hContact, HWND hwndFrom, POINT pt, RECT r, in static int OnSrmmIconChanged(WPARAM wParam, LPARAM) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if (hContact == NULL) WindowList_Broadcast(g_dat.hParentWindowList, DM_STATUSICONCHANGE, 0, 0); else { diff --git a/plugins/SecureIM/src/svcs_clist.cpp b/plugins/SecureIM/src/svcs_clist.cpp index e7640d2477..7af74df185 100644 --- a/plugins/SecureIM/src/svcs_clist.cpp +++ b/plugins/SecureIM/src/svcs_clist.cpp @@ -3,7 +3,7 @@ int __cdecl onContactSettingChanged(WPARAM wParam,LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam; if (!hContact || strcmp(cws->szSetting,"Status")) return 0; @@ -37,7 +37,7 @@ int __cdecl onContactSettingChanged(WPARAM wParam,LPARAM lParam) { // lParam=0 int __cdecl onContactAdded(WPARAM wParam,LPARAM lParam) { - addContact((MCONTACT)wParam); + addContact(wParam); return 0; } @@ -46,7 +46,7 @@ int __cdecl onContactAdded(WPARAM wParam,LPARAM lParam) // lParam=0 int __cdecl onContactDeleted(WPARAM wParam,LPARAM lParam) { - delContact((MCONTACT)wParam); + delContact(wParam); return 0; } @@ -59,15 +59,15 @@ int __cdecl onExtraImageListRebuilding(WPARAM, LPARAM) int __cdecl onExtraImageApplying(WPARAM wParam, LPARAM) { - if (isSecureProtocol((MCONTACT)wParam)) - ExtraIcon_SetIcon(g_hCLIcon, (MCONTACT)wParam, mode2clicon(isContactSecured((MCONTACT)wParam), 1)); + if (isSecureProtocol(wParam)) + ExtraIcon_SetIcon(g_hCLIcon, wParam, mode2clicon(isContactSecured(wParam), 1)); return 0; } int __cdecl onRebuildContactMenu(WPARAM wParam,LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; BOOL bMC = isProtoMetaContacts(hContact); if (bMC ) hContact = getMostOnline(hContact); // âîçüìåì òîò, ÷åðåç êîòîðûé ïîéäåò ñîîáùåíèå pUinKey ptr = getUinKey(hContact); diff --git a/plugins/SecureIM/src/svcs_menu.cpp b/plugins/SecureIM/src/svcs_menu.cpp index c50c7c7f09..ece52aa842 100644 --- a/plugins/SecureIM/src/svcs_menu.cpp +++ b/plugins/SecureIM/src/svcs_menu.cpp @@ -3,19 +3,19 @@ INT_PTR __cdecl Service_IsContactSecured(WPARAM wParam, LPARAM lParam) { - return (isContactSecured((MCONTACT)wParam)&SECURED) || isContactPGP((MCONTACT)wParam) || isContactGPG((MCONTACT)wParam); + return (isContactSecured(wParam)&SECURED) || isContactPGP(wParam) || isContactGPG(wParam); } INT_PTR __cdecl Service_CreateIM(WPARAM wParam,LPARAM lParam) { - CallContactService((MCONTACT)wParam, PSS_MESSAGE, PREF_METANODB, (LPARAM)SIG_INIT); + CallContactService(wParam, PSS_MESSAGE, PREF_METANODB, (LPARAM)SIG_INIT); return 1; } INT_PTR __cdecl Service_DisableIM(WPARAM wParam,LPARAM lParam) { - CallContactService((MCONTACT)wParam, PSS_MESSAGE, PREF_METANODB, (LPARAM)SIG_DEIN); + CallContactService(wParam, PSS_MESSAGE, PREF_METANODB, (LPARAM)SIG_DEIN); return 1; } @@ -25,7 +25,7 @@ INT_PTR __cdecl Service_Status(WPARAM wParam, LPARAM lParam) case STATUS_DISABLED: case STATUS_ENABLED: case STATUS_ALWAYSTRY: - pUinKey ptr = getUinKey((MCONTACT)wParam); + pUinKey ptr = getUinKey(wParam); if (ptr) { ptr->status=ptr->tstatus=(BYTE)lParam; if (ptr->status == STATUS_ENABLED) db_unset(ptr->hContact, MODULENAME, "StatusID"); @@ -55,15 +55,15 @@ INT_PTR __cdecl Service_StatusTry(WPARAM wParam, LPARAM lParam) INT_PTR __cdecl Service_PGPdelKey(WPARAM wParam, LPARAM lParam) { if (bPGPloaded) { - db_unset((MCONTACT)wParam, MODULENAME, "pgp"); - db_unset((MCONTACT)wParam, MODULENAME, "pgp_mode"); - db_unset((MCONTACT)wParam, MODULENAME, "pgp_abbr"); + db_unset(wParam, MODULENAME, "pgp"); + db_unset(wParam, MODULENAME, "pgp_mode"); + db_unset(wParam, MODULENAME, "pgp_abbr"); } { - pUinKey ptr = getUinKey((MCONTACT)wParam); + pUinKey ptr = getUinKey(wParam); cpp_delete_context(ptr->cntx); ptr->cntx=0; } - ShowStatusIconNotify((MCONTACT)wParam); + ShowStatusIconNotify(wParam); return 1; } @@ -75,10 +75,10 @@ INT_PTR __cdecl Service_PGPsetKey(WPARAM wParam, LPARAM lParam) char szKeyID[128]; szKeyID[0]='\0'; PVOID KeyID = pgp_select_keyid(GetForegroundWindow(),szKeyID); if (szKeyID[0]) { - db_unset((MCONTACT)wParam, MODULENAME, "pgp"); - db_set_blob((MCONTACT)wParam, MODULENAME, "pgp", KeyID, pgp_size_keyid()); - db_set_b((MCONTACT)wParam, MODULENAME, "pgp_mode", 0); - db_set_s((MCONTACT)wParam, MODULENAME, "pgp_abbr", szKeyID); + db_unset(wParam, MODULENAME, "pgp"); + db_set_blob(wParam, MODULENAME, "pgp", KeyID, pgp_size_keyid()); + db_set_b(wParam, MODULENAME, "pgp_mode", 0); + db_set_s(wParam, MODULENAME, "pgp_abbr", szKeyID); del = false; } } @@ -87,10 +87,10 @@ INT_PTR __cdecl Service_PGPsetKey(WPARAM wParam, LPARAM lParam) if (ShowSelectKeyDlg(0,KeyPath)) { char *publ = LoadKeys(KeyPath,false); if (publ) { - db_unset((MCONTACT)wParam, MODULENAME, "pgp"); - db_set_s((MCONTACT)wParam, MODULENAME, "pgp", publ); - db_set_b((MCONTACT)wParam, MODULENAME, "pgp_mode", 1); - db_set_s((MCONTACT)wParam, MODULENAME, "pgp_abbr", "(binary)"); + db_unset(wParam, MODULENAME, "pgp"); + db_set_s(wParam, MODULENAME, "pgp", publ); + db_set_b(wParam, MODULENAME, "pgp_mode", 1); + db_set_s(wParam, MODULENAME, "pgp_abbr", "(binary)"); mir_free(publ); del = false; } @@ -101,22 +101,22 @@ INT_PTR __cdecl Service_PGPsetKey(WPARAM wParam, LPARAM lParam) if (del) Service_PGPdelKey(wParam,lParam); else { - pUinKey ptr = getUinKey((MCONTACT)wParam); + pUinKey ptr = getUinKey(wParam); cpp_delete_context(ptr->cntx); ptr->cntx=0; } - ShowStatusIconNotify((MCONTACT)wParam); + ShowStatusIconNotify(wParam); return 1; } INT_PTR __cdecl Service_GPGdelKey(WPARAM wParam, LPARAM lParam) { if (bGPGloaded) - db_unset((MCONTACT)wParam, MODULENAME, "gpg"); + db_unset(wParam, MODULENAME, "gpg"); { - pUinKey ptr = getUinKey((MCONTACT)wParam); + pUinKey ptr = getUinKey(wParam); cpp_delete_context(ptr->cntx); ptr->cntx=0; } - ShowStatusIconNotify((MCONTACT)wParam); + ShowStatusIconNotify(wParam); return 1; } @@ -127,28 +127,28 @@ INT_PTR __cdecl Service_GPGsetKey(WPARAM wParam, LPARAM lParam) char szKeyID[128]; szKeyID[0]='\0'; gpg_select_keyid(GetForegroundWindow(),szKeyID); if (szKeyID[0]) { - db_set_s((MCONTACT)wParam, MODULENAME, "gpg", szKeyID); + db_set_s(wParam, MODULENAME, "gpg", szKeyID); del = false; } } if (del) Service_GPGdelKey(wParam,lParam); else { - pUinKey ptr = getUinKey((MCONTACT)wParam); + pUinKey ptr = getUinKey(wParam); cpp_delete_context(ptr->cntx); ptr->cntx=0; } - ShowStatusIconNotify((MCONTACT)wParam); + ShowStatusIconNotify(wParam); return 1; } INT_PTR __cdecl Service_Mode(WPARAM wParam, LPARAM lParam) { - pUinKey ptr = getUinKey((MCONTACT)wParam); + pUinKey ptr = getUinKey(wParam); switch(--lParam) { case MODE_NATIVE: case MODE_RSAAES: - if (isContactSecured((MCONTACT)wParam)&SECURED) { + if (isContactSecured(wParam)&SECURED) { msgbox(NULL, sim111, MODULENAME, MB_OK); return 0; } @@ -165,9 +165,9 @@ INT_PTR __cdecl Service_Mode(WPARAM wParam, LPARAM lParam) ptr->keyLoaded = 0; } ptr->mode=(BYTE)lParam; - db_set_b((MCONTACT)wParam, MODULENAME, "mode", (BYTE)lParam); + db_set_b(wParam, MODULENAME, "mode", (BYTE)lParam); } - ShowStatusIcon((MCONTACT)wParam); + ShowStatusIcon(wParam); break; } diff --git a/plugins/SecureIM/src/svcs_srmm.cpp b/plugins/SecureIM/src/svcs_srmm.cpp index 9c2aa2c7f5..5abc86a7e1 100644 --- a/plugins/SecureIM/src/svcs_srmm.cpp +++ b/plugins/SecureIM/src/svcs_srmm.cpp @@ -11,7 +11,7 @@ int __cdecl onWindowEvent(WPARAM, LPARAM lParam) int __cdecl onIconPressed(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if (isProtoMetaContacts(hContact)) hContact = getMostOnline(hContact); // âîçüìåì òîò, ÷åðåç êîòîðûé ïîéäåò ñîîáùåíèå diff --git a/plugins/SendScreenshotPlus/src/Main.cpp b/plugins/SendScreenshotPlus/src/Main.cpp index 2801e4ae5d..3c3028c77f 100644 --- a/plugins/SendScreenshotPlus/src/Main.cpp +++ b/plugins/SendScreenshotPlus/src/Main.cpp @@ -239,7 +239,7 @@ INT_PTR service_OpenCaptureDialog(WPARAM wParam, LPARAM lParam){ delete frmMain; return -1; } - frmMain->Init(pszPath, (MCONTACT)wParam); + frmMain->Init(pszPath, wParam); mir_free(pszPath); if(lParam==0xFFFF){ frmMain->SetTargetWindow(NULL); @@ -276,7 +276,7 @@ INT_PTR service_EditBitmap(WPARAM wParam, LPARAM lParam) { // lParam = (HANDLE)contact (can be null) INT_PTR service_Send2ImageShack(WPARAM wParam, LPARAM lParam) { LPSTR result = NULL; - CSendImageShack* cSend = new CSendImageShack(NULL, (MCONTACT)lParam, false); + CSendImageShack* cSend = new CSendImageShack(NULL, lParam, false); cSend->m_pszFile = mir_a2t((char*)wParam); cSend->m_bDeleteAfterSend = FALSE; if (lParam != NULL) { diff --git a/plugins/SimpleAR/src/Main.cpp b/plugins/SimpleAR/src/Main.cpp index befcce33d7..9e2d3b3759 100644 --- a/plugins/SimpleAR/src/Main.cpp +++ b/plugins/SimpleAR/src/Main.cpp @@ -183,7 +183,7 @@ TCHAR* StrReplace (TCHAR* Search, TCHAR* Replace, TCHAR* Resource) INT addEvent(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; HANDLE hDBEvent = (HANDLE)lParam; BOOL fEnabled = db_get_b(NULL, protocolname, KEY_ENABLED, 1); diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp index 2104b0e192..f0ff0661f4 100644 --- a/plugins/SimpleStatusMsg/src/awaymsg.cpp +++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp @@ -97,7 +97,7 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP dat = (AwayMsgDlgData*)mir_alloc(sizeof(AwayMsgDlgData)); SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat); - dat->hContact = (MCONTACT)lParam; + dat->hContact = lParam; dat->hSeq = (HANDLE)CallContactService(dat->hContact, PSS_GETAWAYMSG, 0, 0); dat->hAwayMsgEvent = dat->hSeq ? HookEventMessage(ME_PROTO_ACK, hwndDlg, HM_AWAYMSG) : NULL; WindowList_Add(hWindowList, hwndDlg, dat->hContact); @@ -126,7 +126,7 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadSkinnedProtoIcon(szProto, dwStatus)); EnableWindow(GetDlgItem(hwndDlg, IDC_COPY), FALSE); } - Utils_RestoreWindowPosition(hwndDlg, (MCONTACT)lParam, "SRAway", "AwayMsgDlg"); + Utils_RestoreWindowPosition(hwndDlg, lParam, "SRAway", "AwayMsgDlg"); return TRUE; case HM_AWAYMSG: @@ -203,7 +203,7 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP static INT_PTR GetMessageCommand(WPARAM wParam, LPARAM) { - if (HWND hwnd = WindowList_Find(hWindowList, (MCONTACT)wParam)) + if (HWND hwnd = WindowList_Find(hWindowList, wParam)) { SetForegroundWindow(hwnd); SetFocus(hwnd); @@ -227,7 +227,7 @@ static INT_PTR CALLBACK CopyAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP dat = (AwayMsgDlgData*)mir_alloc(sizeof(AwayMsgDlgData)); SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat); - dat->hContact = (MCONTACT)lParam; + dat->hContact = lParam; dat->hSeq = (HANDLE)CallContactService(dat->hContact, PSS_GETAWAYMSG, 0, 0); dat->hAwayMsgEvent = dat->hSeq ? HookEventMessage(ME_PROTO_ACK, hwndDlg, HM_AWAYMSG) : NULL; WindowList_Add(hWindowList2, hwndDlg, dat->hContact); @@ -301,7 +301,7 @@ static INT_PTR CALLBACK CopyAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP static INT_PTR CopyAwayMsgCommand(WPARAM wParam, LPARAM) { - if (HWND hwnd = WindowList_Find(hWindowList2, (MCONTACT)wParam)) + if (HWND hwnd = WindowList_Find(hWindowList2, wParam)) { SetForegroundWindow(hwnd); SetFocus(hwnd); @@ -330,7 +330,7 @@ static char *StrFindURL(char *pszStr) static INT_PTR GoToURLMsgCommand(WPARAM wParam, LPARAM lParam) { - ptrA szMsg(db_get_sa((MCONTACT)wParam, "CList", "StatusMsg")); + ptrA szMsg(db_get_sa(wParam, "CList", "StatusMsg")); char *szURL = StrFindURL(szMsg); if (szURL != NULL) @@ -354,8 +354,8 @@ static INT_PTR GoToURLMsgCommand(WPARAM wParam, LPARAM lParam) static int AwayMsgPreBuildMenu(WPARAM wParam, LPARAM lParam) { TCHAR str[128]; - char *szProto = GetContactProto((MCONTACT)wParam); - int iHidden = szProto ? db_get_b((MCONTACT)wParam, szProto, "ChatRoom", 0) : 0; + char *szProto = GetContactProto(wParam); + int iHidden = szProto ? db_get_b(wParam, szProto, "ChatRoom", 0) : 0; int iStatus; CLISTMENUITEM clmi = { sizeof(clmi) }; @@ -363,7 +363,7 @@ static int AwayMsgPreBuildMenu(WPARAM wParam, LPARAM lParam) clmi.flags = CMIM_FLAGS | CMIF_HIDDEN | CMIF_TCHAR; if (!iHidden) { iHidden = 1; - iStatus = db_get_w((MCONTACT)wParam, szProto, "Status", ID_STATUS_OFFLINE); + iStatus = db_get_w(wParam, szProto, "Status", ID_STATUS_OFFLINE); if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1,0) & PF1_MODEMSGRECV) { if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_3,0) & Proto_Status2Flag(iStatus == ID_STATUS_OFFLINE ? ID_STATUS_INVISIBLE : iStatus)) { iHidden = 0; @@ -377,7 +377,7 @@ static int AwayMsgPreBuildMenu(WPARAM wParam, LPARAM lParam) Menu_ModifyItem(hAwayMsgMenuItem, &clmi); Skin_ReleaseIcon(clmi.hIcon); - ptrA szMsg(db_get_sa((MCONTACT)wParam, "CList", "StatusMsg")); + ptrA szMsg(db_get_sa(wParam, "CList", "StatusMsg")); clmi.flags = CMIM_FLAGS | CMIF_HIDDEN | CMIF_TCHAR; if (!iHidden && szMsg != NULL) { diff --git a/plugins/SmileyAdd/src/dlgboxsubclass.cpp b/plugins/SmileyAdd/src/dlgboxsubclass.cpp index 426998964a..8f59add325 100644 --- a/plugins/SmileyAdd/src/dlgboxsubclass.cpp +++ b/plugins/SmileyAdd/src/dlgboxsubclass.cpp @@ -267,7 +267,7 @@ int UpdateSrmmDlg(WPARAM wParam, LPARAM /* lParam */) { WaitForSingleObject(g_hMutex, 2000); for (int i=0; i < g_MsgWndList.getCount(); ++i) { - if (wParam == 0 || g_MsgWndList[i]->hContact == (MCONTACT)wParam) { + if (wParam == 0 || g_MsgWndList[i]->hContact == wParam) { SendMessage(g_MsgWndList[i]->hwnd, WM_SETREDRAW, FALSE, 0); SendMessage(g_MsgWndList[i]->hwnd, DM_OPTIONSAPPLIED, 0, 0); SendMessage(g_MsgWndList[i]->hwnd, WM_SETREDRAW, TRUE, 0); diff --git a/plugins/SmileyAdd/src/services.cpp b/plugins/SmileyAdd/src/services.cpp index 66a5af8009..84062d5de1 100644 --- a/plugins/SmileyAdd/src/services.cpp +++ b/plugins/SmileyAdd/src/services.cpp @@ -356,7 +356,7 @@ INT_PTR RegisterPack(WPARAM, LPARAM lParam) INT_PTR CustomCatMenu(WPARAM wParam, LPARAM lParam) { - const MCONTACT hContact = (MCONTACT)wParam; + const MCONTACT hContact = wParam; if (lParam != 0) { SmileyCategoryType* smct = g_SmileyCategories.GetSmileyCategory((unsigned)lParam - 3); @@ -382,7 +382,7 @@ int RebuildContactMenu(WPARAM wParam, LPARAM) { SmileyCategoryListType::SmileyCategoryVectorType& smc = *g_SmileyCategories.GetSmileyCategoryList(); - char* protnam = GetContactProto((MCONTACT)wParam); + char* protnam = GetContactProto(wParam); bool haveMenu = IsSmileyProto(protnam); if (haveMenu && opt.UseOneForAll) { unsigned cnt = 0; @@ -399,7 +399,7 @@ int RebuildContactMenu(WPARAM wParam, LPARAM) if (haveMenu) { CMString cat; - opt.ReadContactCategory((MCONTACT)wParam, cat); + opt.ReadContactCategory(wParam, cat); CLISTMENUITEM mi = { sizeof(mi) }; mi.hParentMenu = hContactMenuItem; @@ -540,7 +540,7 @@ int AccountListChanged(WPARAM wParam, LPARAM lParam) int DbSettingChanged(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; DBCONTACTWRITESETTING* cws = (DBCONTACTWRITESETTING*)lParam; if (hContact == NULL) return 0; diff --git a/plugins/Spamotron/src/spamotron.cpp b/plugins/Spamotron/src/spamotron.cpp index c3e32f01d6..f913d52078 100644 --- a/plugins/Spamotron/src/spamotron.cpp +++ b/plugins/Spamotron/src/spamotron.cpp @@ -50,7 +50,7 @@ int OnDBEventAdded(WPARAM wParam, LPARAM lParam) int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; DBEVENTINFO *dbei = (DBEVENTINFO *)lParam; char *msgblob; POPUPDATA ppdp = {0}; diff --git a/plugins/SpellChecker/src/utils.cpp b/plugins/SpellChecker/src/utils.cpp index 31c092e5be..c57261cc1a 100644 --- a/plugins/SpellChecker/src/utils.cpp +++ b/plugins/SpellChecker/src/utils.cpp @@ -1406,7 +1406,7 @@ int IconPressed(WPARAM wParam, LPARAM lParam) if (sicd == NULL || strcmp(sicd->szModule, MODULE_NAME) != 0) return 0; - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if (hContact == NULL) return 0; diff --git a/plugins/StartupSilence/src/main.cpp b/plugins/StartupSilence/src/main.cpp index 98ab78e238..4578f5b1b5 100644 --- a/plugins/StartupSilence/src/main.cpp +++ b/plugins/StartupSilence/src/main.cpp @@ -136,7 +136,7 @@ int DisablePopup(WPARAM wParam, LPARAM lParam) || ((DefPopup == 1 && DefEnabled == 1) && timer !=2) ) //also filtered only: We do not run next lines every time //if "Filtered only..." is unchecked ---> { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if (hContact != NULL) { char* cp = GetContactProto(hContact); diff --git a/plugins/StopSpamMod/src/stopspam.cpp b/plugins/StopSpamMod/src/stopspam.cpp index 7890bf6ab7..3849ef8379 100755 --- a/plugins/StopSpamMod/src/stopspam.cpp +++ b/plugins/StopSpamMod/src/stopspam.cpp @@ -26,7 +26,7 @@ MIRANDA_HOOK_EVENT(ME_DB_CONTACT_ADDED, w, l) MIRANDA_HOOK_EVENT(ME_DB_EVENT_ADDED, wParam, lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; HANDLE hDbEvent = (HANDLE)lParam; DBEVENTINFO dbei = { sizeof(dbei) }; diff --git a/plugins/StopSpamPlus/src/services.cpp b/plugins/StopSpamPlus/src/services.cpp index 578ff5f3b6..917393d4a8 100644 --- a/plugins/StopSpamPlus/src/services.cpp +++ b/plugins/StopSpamPlus/src/services.cpp @@ -2,7 +2,7 @@ INT_PTR IsContactPassed(WPARAM wParam, LPARAM /*lParam*/) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; std::string proto = GetContactProto(hContact); if ( !plSets->ProtoDisabled( proto.c_str())) diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp index e3f277319e..0215f7dc1d 100644 --- a/plugins/TabSRMM/src/buttonsbar.cpp +++ b/plugins/TabSRMM/src/buttonsbar.cpp @@ -350,7 +350,7 @@ static INT_PTR CB_GetButtonState(WPARAM wParam, LPARAM lParam) if (!realbutton) return 1; - HWND hwndDlg = M.FindWindow((MCONTACT)wParam); + HWND hwndDlg = M.FindWindow(wParam); if(!hwndDlg) return 1; HWND hwndBtn = GetDlgItem(hwndDlg, tempCID); @@ -385,7 +385,7 @@ static INT_PTR CB_SetButtonState(WPARAM wParam, LPARAM lParam) if (!realbutton) return 1; - HWND hwndDlg = M.FindWindow((MCONTACT)wParam); + HWND hwndDlg = M.FindWindow(wParam); if(!hwndDlg) return 1; diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index f51d760d92..b4dbc18193 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -1197,15 +1197,15 @@ panel_found: dat = (TWindowData*)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA); } else { - HWND hwnd = M.FindWindow((MCONTACT)wParam); + HWND hwnd = M.FindWindow(wParam); if (hwnd == 0) { - SESSION_INFO *si = SM_FindSessionByHCONTACT((MCONTACT)wParam); + SESSION_INFO *si = SM_FindSessionByHCONTACT(wParam); if (si) { SendMessage(si->hWnd, GC_UPDATETITLE, 0, 0); return 0; } } - hContact = (MCONTACT)wParam; + hContact = wParam; if (hwnd && hContact) dat = (TWindowData*)GetWindowLongPtr(hwnd, GWLP_USERDATA); } diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index cebd17df30..d607e38931 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -1626,7 +1626,7 @@ void TSAPI DM_EventAdded(TWindowData *dat, WPARAM wParam, LPARAM lParam) SendMessage(hwndDlg, DM_ADDDIVIDER, 0, 0); } } - tabSRMM_ShowPopup((MCONTACT)wParam, hDbEvent, dbei.eventType, m_pContainer->fHidden ? 0 : 1, m_pContainer, hwndDlg, dat->cache->getActiveProto(), dat); + tabSRMM_ShowPopup(wParam, hDbEvent, dbei.eventType, m_pContainer->fHidden ? 0 : 1, m_pContainer, hwndDlg, dat->cache->getActiveProto(), dat); if (IsWindowVisible(m_pContainer->hwnd)) m_pContainer->fHidden = false; } @@ -1895,7 +1895,7 @@ static HANDLE hHookIconPressedEvt; static int OnSrmmIconChanged(WPARAM wParam, LPARAM) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if (hContact == NULL) M.BroadcastMessage(DM_STATUSICONCHANGE, 0, 0); else { diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index 15e32170e8..1422425ce2 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -402,11 +402,11 @@ int CGlobals::DBSettingChanged(WPARAM wParam, LPARAM lParam) CContactCache* c = 0; bool fChanged = false, fNickChanged = false, fExtendedStatusChange = false; - hwnd = M.FindWindow((MCONTACT)wParam); + hwnd = M.FindWindow(wParam); if (hwnd == 0 && wParam != 0) { // we are not interested in this event if there is no open message window/tab if (!strcmp(setting, "Status") || !strcmp(setting, "MyHandle") || !strcmp(setting, "Nick") || !strcmp(cws->szModule, SRMSGMOD_T)) { - c = CContactCache::getContactCache((MCONTACT)wParam); + c = CContactCache::getContactCache(wParam); if (c) { fChanged = c->updateStatus(); if (strcmp(setting, "Status")) @@ -424,7 +424,7 @@ int CGlobals::DBSettingChanged(WPARAM wParam, LPARAM lParam) } if (wParam) { - c = CContactCache::getContactCache((MCONTACT)wParam); + c = CContactCache::getContactCache(wParam); if (c) { szProto = c->getProto(); if (!strcmp(cws->szModule, SRMSGMOD_T)) { // catch own relevant settings @@ -500,7 +500,7 @@ int CGlobals::DBSettingChanged(WPARAM wParam, LPARAM lParam) int CGlobals::DBContactDeleted(WPARAM wParam, LPARAM lParam) { if (wParam) { - CContactCache *c = CContactCache::getContactCache((MCONTACT)wParam); + CContactCache *c = CContactCache::getContactCache(wParam); if (c) c->deletedHandler(); } @@ -515,7 +515,7 @@ int CGlobals::DBContactDeleted(WPARAM wParam, LPARAM lParam) int CGlobals::MetaContactEvent(WPARAM wParam, LPARAM lParam) { if (wParam) { - CContactCache *c = CContactCache::getContactCache((MCONTACT)wParam); + CContactCache *c = CContactCache::getContactCache(wParam); if (c) { c->updateMeta(true); if (c->getHwnd()) { diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp index ff4a710b64..8b9b05d388 100644 --- a/plugins/TabSRMM/src/hotkeyhandler.cpp +++ b/plugins/TabSRMM/src/hotkeyhandler.cpp @@ -372,7 +372,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP * if lParam == NULL, don't consider clist events, just open the message tab */ if (lParam == 0) - HandleMenuEntryFromhContact((MCONTACT)wParam); + HandleMenuEntryFromhContact(wParam); else { CLISTEVENT *cle = (CLISTEVENT *)CallService(MS_CLIST_GETEVENT, wParam, 0); if (cle) { @@ -382,13 +382,13 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP } } // still, we got that message posted.. the event may be waiting in tabSRMMs tray... - else HandleMenuEntryFromhContact((MCONTACT)wParam); + else HandleMenuEntryFromhContact(wParam); } break; case DM_DOCREATETAB: { - HWND hWnd = M.FindWindow((MCONTACT)lParam); + HWND hWnd = M.FindWindow(lParam); if (hWnd && IsWindow(hWnd)) { TContainerData *pContainer = 0; SendMessage(hWnd, DM_QUERYCONTAINER, 0, (LPARAM)&pContainer); @@ -399,7 +399,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP else SendMessage(hWnd, WM_CLOSE, 0, 1); - CreateNewTabForContact((TContainerData*)wParam, (MCONTACT)lParam, 0, NULL, TRUE, TRUE, FALSE, 0); + CreateNewTabForContact((TContainerData*)wParam, lParam, 0, NULL, TRUE, TRUE, FALSE, 0); } } } @@ -441,13 +441,13 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP */ case DM_REMOVECLISTEVENT: CallService(MS_CLIST_REMOVEEVENT, wParam, lParam); - db_event_markRead((MCONTACT)wParam, (HANDLE)lParam); + db_event_markRead(wParam, (HANDLE)lParam); return 0; case DM_SETLOCALE: { HKL hkl = (HKL)lParam; - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; HWND hWnd = M.FindWindow(hContact); if (hWnd) { diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp index 7c81027490..8b069edb8b 100644 --- a/plugins/TabSRMM/src/mim.cpp +++ b/plugins/TabSRMM/src/mim.cpp @@ -335,7 +335,7 @@ int CMimAPI::TypingMessage(WPARAM wParam, LPARAM lParam) int issplit = 1, foundWin = 0, preTyping = 0; BOOL fShowOnClist = TRUE; - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if (hContact) { if ((hwnd = M.FindWindow(hContact)) && M.GetByte(SRMSGMOD, SRMSGSET_SHOWTYPING, SRMSGDEFSET_SHOWTYPING)) preTyping = SendMessage(hwnd, DM_TYPING, 0, lParam); @@ -407,7 +407,7 @@ int CMimAPI::TypingMessage(WPARAM wParam, LPARAM lParam) } if (fShowOnClist) { CLISTEVENT cle = { sizeof(cle) }; - cle.hContact = (MCONTACT)wParam; + cle.hContact = wParam; cle.hDbEvent = (HANDLE)1; cle.flags = CLEF_ONLYAFEW | CLEF_TCHAR; cle.hIcon = PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING]; @@ -468,7 +468,7 @@ int CMimAPI::ProtoAck(WPARAM wParam, LPARAM lParam) int CMimAPI::PrebuildContactMenu(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if (hContact == NULL) return NULL; @@ -497,7 +497,7 @@ int CMimAPI::PrebuildContactMenu(WPARAM wParam, LPARAM lParam) int CMimAPI::DispatchNewEvent(WPARAM wParam, LPARAM lParam) { if (wParam) { - HWND h = M.FindWindow((MCONTACT)wParam); + HWND h = M.FindWindow(wParam); if (h) PostMessage(h, HM_DBEVENTADDED, wParam, lParam); // was SENDMESSAGE !!! XXX } @@ -522,7 +522,7 @@ int CMimAPI::MessageEventAdded(WPARAM wParam, LPARAM lParam) DBEVENTINFO dbei = { sizeof(dbei) }; db_event_get(hDbEvent, &dbei); - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; HWND hwnd = M.FindWindow(hContact); BOOL isCustomEvent = IsCustomEvent(dbei.eventType); diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 4789769410..9ab3fa73ff 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -2547,7 +2547,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP case HM_DBEVENTADDED: if (!dat) return 0; - if ((MCONTACT)wParam != dat->hContact) + if (wParam != dat->hContact) return 0; if (dat->hContact == NULL) return 0; diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index e6b2fe0ea7..a64a8661b4 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -133,7 +133,7 @@ static INT_PTR SetStatusText(WPARAM wParam, LPARAM lParam) { TContainerData *pContainer; - HWND hwnd = M.FindWindow((MCONTACT)wParam); + HWND hwnd = M.FindWindow(wParam); if (hwnd != NULL) { TWindowData *dat = (TWindowData*)GetWindowLongPtr(hwnd, GWLP_USERDATA); if (dat == NULL || (pContainer = dat->pContainer) == NULL) @@ -150,7 +150,7 @@ static INT_PTR SetStatusText(WPARAM wParam, LPARAM lParam) return 1; } else { - SESSION_INFO *si = SM_FindSessionByHCONTACT((MCONTACT)wParam); + SESSION_INFO *si = SM_FindSessionByHCONTACT(wParam); if (si == NULL || si->hWnd == 0 || (pContainer = si->pContainer) == NULL || pContainer->hwndActive != si->hWnd) return 1; } @@ -166,7 +166,7 @@ static INT_PTR SetStatusText(WPARAM wParam, LPARAM lParam) static INT_PTR SetUserPrefs(WPARAM wParam, LPARAM) { - HWND hWnd = WindowList_Find(PluginConfig.hUserPrefsWindowList, (MCONTACT)wParam); + HWND hWnd = WindowList_Find(PluginConfig.hUserPrefsWindowList, wParam); if (hWnd) { SetForegroundWindow(hWnd); // already open, bring it to front return 0; @@ -197,7 +197,7 @@ static INT_PTR GetMessageWindowFlags(WPARAM wParam, LPARAM lParam) HWND hwndTarget = (HWND)lParam; if (hwndTarget == 0) - hwndTarget = M.FindWindow((MCONTACT)wParam); + hwndTarget = M.FindWindow(wParam); if (hwndTarget == 0) return 0; @@ -234,7 +234,7 @@ INT_PTR MessageWindowOpened(WPARAM wParam, LPARAM lParam) TContainerData *pContainer = NULL; if (wParam) - hwnd = M.FindWindow((MCONTACT)wParam); + hwnd = M.FindWindow(wParam); else if (lParam) hwnd = (HWND) lParam; else @@ -296,7 +296,7 @@ static INT_PTR ReadMessageCommand(WPARAM, LPARAM lParam) INT_PTR SendMessageCommand_W(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; TNewWindowData newData = { 0 }; int isSplit = 1; @@ -355,7 +355,7 @@ INT_PTR SendMessageCommand_W(WPARAM wParam, LPARAM lParam) INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; TNewWindowData newData = { 0 }; int isSplit = 1; @@ -391,7 +391,7 @@ INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam) SendMessage(hwnd, DM_ACTIVATEME, 0, 0); // ask the message window about its parent... } else { TCHAR szName[CONTAINER_NAMELEN + 1]; - GetContainerNameForContact((MCONTACT)wParam, szName, CONTAINER_NAMELEN); + GetContainerNameForContact(wParam, szName, CONTAINER_NAMELEN); TContainerData *pContainer = FindContainerByName(szName); if (pContainer == NULL) pContainer = CreateContainer(szName, FALSE, hContact); @@ -465,7 +465,7 @@ int MyAvatarChanged(WPARAM wParam, LPARAM lParam) int AvatarChanged(WPARAM wParam, LPARAM lParam) { avatarCacheEntry *ace = (avatarCacheEntry *)lParam; - HWND hwnd = M.FindWindow((MCONTACT)wParam); + HWND hwnd = M.FindWindow(wParam); if (wParam == 0) { // protocol picture has changed... M.BroadcastMessage(DM_PROTOAVATARCHANGED, wParam, lParam); diff --git a/plugins/TabSRMM/src/sendlater.cpp b/plugins/TabSRMM/src/sendlater.cpp index 38ab2fc16f..f93c65ce53 100644 --- a/plugins/TabSRMM/src/sendlater.cpp +++ b/plugins/TabSRMM/src/sendlater.cpp @@ -310,7 +310,7 @@ void CSendLater::processContacts() */ int CSendLater::addJob(const char *szSetting, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)lParam; + MCONTACT hContact = lParam; DBVARIANT dbv = {0}; char *szOrig_Utf = 0; diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp index 33b12efd28..6652ece4ad 100644 --- a/plugins/TabSRMM/src/typingnotify.cpp +++ b/plugins/TabSRMM/src/typingnotify.cpp @@ -363,7 +363,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA } ppd.lchIcon = PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING]; - ppd.lchContact = (MCONTACT)wParam; + ppd.lchContact = wParam; ppd.PluginWindowProc = NULL; ppd.PluginData = NULL; PUAddPopupT(&ppd); diff --git a/plugins/TabSRMM/src/userprefs.cpp b/plugins/TabSRMM/src/userprefs.cpp index 5c3389748d..0d9bc82499 100644 --- a/plugins/TabSRMM/src/userprefs.cpp +++ b/plugins/TabSRMM/src/userprefs.cpp @@ -63,7 +63,7 @@ static INT_PTR CALLBACK DlgProcUserPrefs(HWND hwndDlg, UINT msg, WPARAM wParam, case WM_INITDIALOG: { DWORD sCodePage; int i; - hContact = (MCONTACT)lParam; + hContact = lParam; DWORD maxhist = M.GetDword(hContact, "maxhist", 0); BYTE bIEView = M.GetByte(hContact, "ieview", 0); BYTE bHPP = M.GetByte(hContact, "hpplog", 0); @@ -365,7 +365,7 @@ static INT_PTR CALLBACK DlgProcUserPrefsLogOptions(HWND hwndDlg, UINT msg, WPARA MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); switch (msg) { case WM_INITDIALOG: - hContact = (MCONTACT)lParam; + hContact = lParam; TranslateDialogDefault(hwndDlg); SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)hContact); SendMessage(hwndDlg, WM_COMMAND, WM_USER + 200, 0); @@ -464,7 +464,7 @@ INT_PTR CALLBACK DlgProcUserPrefsFrame(HWND hwndDlg, UINT msg, WPARAM wParam, LP case WM_INITDIALOG: TranslateDialogDefault(hwndDlg); - hContact = (MCONTACT)lParam; + hContact = lParam; SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)hContact); WindowList_Add(PluginConfig.hUserPrefsWindowList, hwndDlg, hContact); diff --git a/plugins/TipperYM/src/message_pump.cpp b/plugins/TipperYM/src/message_pump.cpp index 0bf9936be4..d5917579cb 100644 --- a/plugins/TipperYM/src/message_pump.cpp +++ b/plugins/TipperYM/src/message_pump.cpp @@ -340,7 +340,7 @@ int ProtoAck(WPARAM wParam, LPARAM lParam) int AvatarChanged(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; PostMPMessage(MUM_GOTAVATAR, (WPARAM)hContact, 0); return 0; } diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp index 92566cd72e..dc460c5527 100644 --- a/plugins/TipperYM/src/popwin.cpp +++ b/plugins/TipperYM/src/popwin.cpp @@ -976,7 +976,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa break; case PUM_SETSTATUSTEXT: - if (pwd && (MCONTACT)wParam == pwd->hContact) { + if (pwd && wParam == pwd->hContact) { db_set_ts(pwd->hContact, MODULE, "TempStatusMsg", (TCHAR *)lParam); pwd->bIsPainted = false; pwd->bNeedRefresh = true; @@ -988,7 +988,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa return TRUE; case PUM_SHOWXSTATUS: - if (pwd && (MCONTACT)wParam == pwd->hContact) { + if (pwd && wParam == pwd->hContact) { // in case we have retrieve xstatus pwd->bIsPainted = false; SendMessage(hwnd, PUM_REFRESH_VALUES, TRUE, 0); @@ -997,7 +997,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa return TRUE; case PUM_SETAVATAR: - if (pwd && (MCONTACT)wParam == pwd->hContact) { + if (pwd && wParam == pwd->hContact) { pwd->bIsPainted = false; SendMessage(hwnd, PUM_GETHEIGHT, 0, 0); SendMessage(hwnd, PUM_CALCPOS, 0, 0); diff --git a/plugins/TipperYM/src/tipper.cpp b/plugins/TipperYM/src/tipper.cpp index 52ea8a876f..e49d0de5c5 100644 --- a/plugins/TipperYM/src/tipper.cpp +++ b/plugins/TipperYM/src/tipper.cpp @@ -113,7 +113,7 @@ int EventDeleted(WPARAM wParam, LPARAM lParam) DBEVENTINFO dbei = { sizeof(dbei) }; if (!db_event_get((HANDLE)lParam, &dbei)) if (dbei.eventType == EVENTTYPE_MESSAGE) - db_unset((MCONTACT)wParam, MODULE, "LastCountTS"); + db_unset(wParam, MODULE, "LastCountTS"); return 0; } diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp index 75210c8dec..daba6e6b4c 100644 --- a/plugins/TooltipNotify/src/TooltipNotify.cpp +++ b/plugins/TooltipNotify/src/TooltipNotify.cpp @@ -162,7 +162,7 @@ int CTooltipNotify::ProtoContactIsTyping(WPARAM wParam, LPARAM lParam) { STooltipData *pTooltipData = new STooltipData; pTooltipData->uiTimeout = lParam*1000; - pTooltipData->hContact = (MCONTACT)wParam; + pTooltipData->hContact = wParam; pTooltipData->iStatus = ID_TTNTF_STATUS_TYPING; EndNotifyAll(); @@ -211,7 +211,7 @@ int CTooltipNotify::ProtoAck(WPARAM wParam, LPARAM lParam) int CTooltipNotify::ContactSettingChanged(WPARAM wParam, LPARAM lParam) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam; - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if(hContact==NULL) return 0; bool idle = false; diff --git a/plugins/UserInfoEx/src/Flags/svc_flags.cpp b/plugins/UserInfoEx/src/Flags/svc_flags.cpp index c27e8a576d..1dbe3cbad7 100644 --- a/plugins/UserInfoEx/src/Flags/svc_flags.cpp +++ b/plugins/UserInfoEx/src/Flags/svc_flags.cpp @@ -44,18 +44,18 @@ static LIST gMsgWndList(10, HandleKeySortT); static INT_PTR ServiceDetectContactOriginCountry(WPARAM wParam,LPARAM lParam) { WORD countryNumber; - char *pszProto = GetContactProto((MCONTACT)wParam); + char *pszProto = GetContactProto(wParam); /* UserinfoEx */ - if (countryNumber = db_get_w((MCONTACT)wParam, USERINFO, SET_CONTACT_ORIGIN_COUNTRY, 0)) + if (countryNumber = db_get_w(wParam, USERINFO, SET_CONTACT_ORIGIN_COUNTRY, 0)) return countryNumber; - if (countryNumber = db_get_w((MCONTACT)wParam, USERINFO, SET_CONTACT_COUNTRY, 0)) + if (countryNumber = db_get_w(wParam, USERINFO, SET_CONTACT_COUNTRY, 0)) return countryNumber; - if (countryNumber = db_get_w((MCONTACT)wParam, USERINFO, SET_CONTACT_COMPANY_COUNTRY, 0)) + if (countryNumber = db_get_w(wParam, USERINFO, SET_CONTACT_COMPANY_COUNTRY, 0)) return countryNumber; /* fallback proto settings */ - if (countryNumber = db_get_w((MCONTACT)wParam, pszProto, "Country", 0)) + if (countryNumber = db_get_w(wParam, pszProto, "Country", 0)) return countryNumber; - if (countryNumber = db_get_w((MCONTACT)wParam, pszProto, "CompanyCountry", 0)) + if (countryNumber = db_get_w(wParam, pszProto, "CompanyCountry", 0)) return countryNumber; return (INT_PTR)0xFFFF; @@ -69,7 +69,7 @@ static void CALLBACK SetExtraImage(LPARAM lParam) { /* get contact's country */ int countryNumber = ServiceDetectContactOriginCountry(lParam, 0); - ExtraIcon_SetIcon(hExtraIconSvc, (MCONTACT)lParam, (countryNumber != 0xFFFF || g_bUseUnknownFlag) ? LoadFlagHandle(countryNumber) : NULL); + ExtraIcon_SetIcon(hExtraIconSvc, lParam, (countryNumber != 0xFFFF || g_bUseUnknownFlag) ? LoadFlagHandle(countryNumber) : NULL); } static int OnCListApplyIcons(WPARAM wParam, LPARAM) diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp index a8ec59ab5c..9cf0dd26bc 100644 --- a/plugins/UserInfoEx/src/dlg_propsheet.cpp +++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp @@ -253,7 +253,7 @@ static INT_PTR ShowDialog(WPARAM wParam, LPARAM lParam) myGlobals.WantAeroAdaption = db_get_b(NULL, MODNAME, SET_PROPSHEET_AEROADAPTION, TRUE); // allow only one dialog per user - if (HWND hWnd = WindowList_Find(ghWindowList, (MCONTACT)wParam)) { + if (HWND hWnd = WindowList_Find(ghWindowList, wParam)) { SetForegroundWindow(hWnd); SetFocus(hWnd); return 0; @@ -285,7 +285,7 @@ static INT_PTR ShowDialog(WPARAM wParam, LPARAM lParam) ImageList_AddIcon(psh._hImages, hDefIcon); // init contact - psh._hContact = (MCONTACT)wParam; + psh._hContact = wParam; if (psh._hContact == NULL) { // mark owner icons as initiated bInitIcons |= INIT_ICONS_OWNER; @@ -294,7 +294,7 @@ static INT_PTR ShowDialog(WPARAM wParam, LPARAM lParam) } else { // get contact's protocol - psh._pszPrefix = psh._pszProto = DB::Contact::Proto((MCONTACT)wParam); + psh._pszPrefix = psh._pszProto = DB::Contact::Proto(wParam); if (psh._pszProto == NULL) { MsgErr(NULL, LPGENT("Could not find contact's protocol. Maybe it is not active!")); return 1; @@ -313,12 +313,12 @@ static INT_PTR ShowDialog(WPARAM wParam, LPARAM lParam) // metacontacts sub pages if (bScanMetaSubContacts) { - int numSubs = DB::MetaContact::SubCount((MCONTACT)wParam); + int numSubs = DB::MetaContact::SubCount(wParam); psh._dwFlags &= ~PSF_PROTOPAGESONLY_INIT; psh._dwFlags |= PSF_PROTOPAGESONLY; for (int i = 0; i < numSubs; i++) { - psh._hContact = DB::MetaContact::Sub((MCONTACT)wParam, i); + psh._hContact = DB::MetaContact::Sub(wParam, i); psh._nSubContact = i; if (psh._hContact) { psh._pszProto = DB::Contact::Proto(psh._hContact); @@ -326,7 +326,7 @@ static INT_PTR ShowDialog(WPARAM wParam, LPARAM lParam) NotifyEventHooks(ghDetailsInitEvent, (WPARAM)&psh, (LPARAM)psh._hContact); } } - psh._hContact = (MCONTACT)wParam; + psh._hContact = wParam; } // sort the pages by the position read from database @@ -409,7 +409,7 @@ static INT_PTR AddPage(WPARAM wParam, LPARAM lParam) **/ static int OnDeleteContact(WPARAM wParam, LPARAM lParam) { - HWND hWnd = WindowList_Find(ghWindowList, (MCONTACT)wParam); + HWND hWnd = WindowList_Find(ghWindowList, wParam); if (hWnd != NULL) DestroyWindow(hWnd); return 0; @@ -1356,7 +1356,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar **/ case HM_SETTING_CHANGED: if (!(pPs->dwFlags & PSF_LOCKED)) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; DBCONTACTWRITESETTING *pdbcws = (DBCONTACTWRITESETTING*)lParam; if (hContact != pPs->hContact) { diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp index 50f0aba261..40e20e4606 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp @@ -233,7 +233,7 @@ INT_PTR svcExIm_ContactExport_Service(WPARAM wParam, LPARAM lParam) { ExImParam ExIm; ZeroMemory(&ExIm, sizeof(ExIm)); - ExIm.hContact = (MCONTACT)wParam; + ExIm.hContact = wParam; ExIm.Typ = EXIM_CONTACT; return SvcExImport_Export(&ExIm, (HWND)lParam); } @@ -242,7 +242,7 @@ INT_PTR svcExIm_ContactImport_Service(WPARAM wParam, LPARAM lParam) { ExImParam ExIm; ZeroMemory(&ExIm, sizeof(ExIm)); - ExIm.hContact = (MCONTACT)wParam; + ExIm.hContact = wParam; ExIm.Typ = EXIM_CONTACT; return SvcExImport_Import(&ExIm, (HWND)lParam); } diff --git a/plugins/UserInfoEx/src/psp_contact.cpp b/plugins/UserInfoEx/src/psp_contact.cpp index 0bce7739ae..c01c6c6257 100644 --- a/plugins/UserInfoEx/src/psp_contact.cpp +++ b/plugins/UserInfoEx/src/psp_contact.cpp @@ -41,7 +41,7 @@ INT_PTR CALLBACK PSPProcContactHome(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM if (pCtrlList) { TCHAR szAddr[MAX_PATH]; - MCONTACT hContact = (MCONTACT)lParam; + MCONTACT hContact = lParam; LPIDSTRLIST pList; UINT nList; @@ -196,7 +196,7 @@ INT_PTR CALLBACK PSPProcContactWork(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM if (pCtrlList) { TCHAR szAddr[MAX_PATH]; - MCONTACT hContact = (MCONTACT)lParam; + MCONTACT hContact = lParam; LPIDSTRLIST pList; UINT nList; diff --git a/plugins/UserInfoEx/src/svc_contactinfo.cpp b/plugins/UserInfoEx/src/svc_contactinfo.cpp index aaa4c816e2..7e98c90852 100644 --- a/plugins/UserInfoEx/src/svc_contactinfo.cpp +++ b/plugins/UserInfoEx/src/svc_contactinfo.cpp @@ -705,7 +705,7 @@ INT_PTR GetContactInfo(WPARAM wParam, LPARAM lParam) static INT_PTR GetContactSettingStrExService(WPARAM wParam, LPARAM lParam) { DBCONTACTGETSETTING *cgs = (DBCONTACTGETSETTING*)lParam; - return DB::Setting::GetEx((MCONTACT)wParam, USERINFO, + return DB::Setting::GetEx(wParam, USERINFO, cgs->szModule, cgs->szSetting, cgs->pValue, cgs->pValue->type); } diff --git a/plugins/UserInfoEx/src/svc_email.cpp b/plugins/UserInfoEx/src/svc_email.cpp index 3888dd7ba9..eb366250f3 100644 --- a/plugins/UserInfoEx/src/svc_email.cpp +++ b/plugins/UserInfoEx/src/svc_email.cpp @@ -84,7 +84,7 @@ static INT_PTR MenuCommand(WPARAM wParam,LPARAM lParam) __try { - val = Get((MCONTACT)wParam); + val = Get(wParam); if (val) { LPSTR szUrl; INT_PTR len; @@ -126,8 +126,8 @@ static INT_PTR MenuCommand(WPARAM wParam,LPARAM lParam) static int OnCListApplyIcons(WPARAM wParam, LPARAM lParam) { - LPSTR val = Get((MCONTACT)wParam); - ExtraIcon_SetIcon(ghExtraIconSvc, (MCONTACT)wParam, (val) ? ICO_BTN_EMAIL : 0); + LPSTR val = Get(wParam); + ExtraIcon_SetIcon(ghExtraIconSvc, wParam, (val) ? ICO_BTN_EMAIL : 0); mir_free(val); return 0; } @@ -163,7 +163,7 @@ static int OnContactSettingChanged(MCONTACT hContact, DBCONTACTWRITESETTING* pdb static int OnPreBuildMenu(WPARAM wParam, LPARAM lParam) { - LPSTR val = Get((MCONTACT)wParam); + LPSTR val = Get(wParam); Menu_ShowItem(ghMenuItem, val != NULL); mir_free(val); return 0; diff --git a/plugins/UserInfoEx/src/svc_homepage.cpp b/plugins/UserInfoEx/src/svc_homepage.cpp index d5a1d8d5fd..63c6f6afb2 100644 --- a/plugins/UserInfoEx/src/svc_homepage.cpp +++ b/plugins/UserInfoEx/src/svc_homepage.cpp @@ -68,7 +68,7 @@ static LPSTR Get(MCONTACT hContact) static INT_PTR MenuCommand(WPARAM wParam, LPARAM lParam) { - LPSTR szUrl = Get((MCONTACT)wParam); + LPSTR szUrl = Get(wParam); if (szUrl) { CallService(MS_UTILS_OPENURL, 1, (LPARAM)szUrl); mir_free(szUrl); @@ -127,7 +127,7 @@ static int OnContactSettingChanged(MCONTACT hContact, DBCONTACTWRITESETTING* pdb static int OnPreBuildMenu(WPARAM wParam, LPARAM lParam) { - LPSTR val = Get((MCONTACT)wParam); + LPSTR val = Get(wParam); Menu_ShowItem(ghMenuItem, val != 0); mir_free(val); return 0; diff --git a/plugins/UserInfoEx/src/svc_refreshci.cpp b/plugins/UserInfoEx/src/svc_refreshci.cpp index e2022e5982..31195555a1 100644 --- a/plugins/UserInfoEx/src/svc_refreshci.cpp +++ b/plugins/UserInfoEx/src/svc_refreshci.cpp @@ -840,13 +840,13 @@ static int OnContactAdded(WPARAM wParam, LPARAM lParam) { try { - DWORD dwStmp = db_get_dw((MCONTACT)wParam, USERINFO, SET_CONTACT_ADDEDTIME, 0); + DWORD dwStmp = db_get_dw(wParam, USERINFO, SET_CONTACT_ADDEDTIME, 0); if (!dwStmp) { MTime mt; mt.GetLocalTime(); - mt.DBWriteStamp((MCONTACT)wParam, USERINFO, SET_CONTACT_ADDEDTIME); + mt.DBWriteStamp(wParam, USERINFO, SET_CONTACT_ADDEDTIME); // create updater, if not yet exists if (!ContactUpdater) @@ -858,7 +858,7 @@ static int OnContactAdded(WPARAM wParam, LPARAM lParam) ContactUpdater->AddIfDontHave( (ContactUpdater->Size() > 0) ? max(ContactUpdater->Get(ContactUpdater->Size() - 1)->check_time + 15000, 4000) - : 4000, (MCONTACT)wParam); + : 4000, wParam); } } catch(...) diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp index ca075925d0..200ded8715 100644 --- a/plugins/UserInfoEx/src/svc_reminder.cpp +++ b/plugins/UserInfoEx/src/svc_reminder.cpp @@ -727,7 +727,7 @@ static INT_PTR CheckService(WPARAM, LPARAM) static INT_PTR BackupBirthdayService(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; MAnnivDate mdb; if (hContact) { diff --git a/plugins/UserInfoEx/src/svc_timezone.cpp b/plugins/UserInfoEx/src/svc_timezone.cpp index f9341d1543..e1027f4b6a 100644 --- a/plugins/UserInfoEx/src/svc_timezone.cpp +++ b/plugins/UserInfoEx/src/svc_timezone.cpp @@ -41,7 +41,7 @@ INT_PTR GetContactTimeZoneInformation(WPARAM wParam,LPARAM lParam) { //use new core tz interface LPTIME_ZONE_INFORMATION pTimeZoneInformation = (LPTIME_ZONE_INFORMATION)lParam; - (*pTimeZoneInformation) = *tmi.getTzi(tmi.createByContact((MCONTACT)wParam, 0)); + (*pTimeZoneInformation) = *tmi.getTzi(tmi.createByContact(wParam, 0)); return (pTimeZoneInformation == NULL); } @@ -58,7 +58,7 @@ INT_PTR GetContactLocalTime(WPARAM wParam, LPARAM lParam) { //use new core tz interface LPSYSTEMTIME pSystemTime = (LPSYSTEMTIME)lParam; - return (INT_PTR)tmi.getTimeZoneTimeByContact((MCONTACT)wParam, pSystemTime); + return (INT_PTR)tmi.getTimeZoneTimeByContact(wParam, pSystemTime); } /*********************************************************************************************************** diff --git a/plugins/UserInfoEx/src/svc_timezone_old.cpp b/plugins/UserInfoEx/src/svc_timezone_old.cpp index 1bb5a202a8..6eb85542aa 100644 --- a/plugins/UserInfoEx/src/svc_timezone_old.cpp +++ b/plugins/UserInfoEx/src/svc_timezone_old.cpp @@ -561,7 +561,7 @@ INT_PTR GetContactTimeZoneInformation_old(WPARAM wParam,LPARAM lParam) CTimeZone *pTimeZone; TIME_ZONE_INFORMATION* pTimeZoneInformation = (TIME_ZONE_INFORMATION*)lParam; - pTimeZone = GetContactTimeZone((MCONTACT)wParam); + pTimeZone = GetContactTimeZone(wParam); if (pTimeZone && pTimeZoneInformation) (*pTimeZoneInformation) = *pTimeZone; @@ -580,7 +580,7 @@ INT_PTR GetContactTimeZoneInformation_old(WPARAM wParam,LPARAM lParam) INT_PTR GetContactLocalTime_old(WPARAM wParam, LPARAM lParam) { MTime now; - now.GetLocalTime((MCONTACT)wParam); + now.GetLocalTime(wParam); LPSYSTEMTIME pSystemTime = (LPSYSTEMTIME)lParam; *pSystemTime = now.SystemTime(); diff --git a/plugins/Variables/src/contact.cpp b/plugins/Variables/src/contact.cpp index 0f0ad17159..244f0fcfc0 100644 --- a/plugins/Variables/src/contact.cpp +++ b/plugins/Variables/src/contact.cpp @@ -353,7 +353,7 @@ int getContactFromString(CONTACTSINFO *ci) static int contactSettingChanged(WPARAM wParam, LPARAM lParam) { DBCONTACTWRITESETTING *dbw = (DBCONTACTWRITESETTING*)lParam; - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; mir_cslock lck(csContactCache); for (int i=0; i < cacheSize; i++) { diff --git a/plugins/Variables/src/help.cpp b/plugins/Variables/src/help.cpp index a5900761ee..65e2c4453b 100644 --- a/plugins/Variables/src/help.cpp +++ b/plugins/Variables/src/help.cpp @@ -140,7 +140,7 @@ static INT_PTR CALLBACK clistDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM case VARM_SETSUBJECT: { LPARAM res = 0; - MCONTACT hItem, hContact = (MCONTACT)wParam; + MCONTACT hItem, hContact = wParam; log_debugA("VARM_SETSUBJECT: %u", hContact); if (hContact == INVALID_CONTACT_ID) { TCHAR *tszContact = db_get_tsa(NULL, MODULENAME, SETTING_SUBJECT); diff --git a/plugins/Weather/src/weather_contacts.cpp b/plugins/Weather/src/weather_contacts.cpp index f52f5d13eb..8ced00bf78 100644 --- a/plugins/Weather/src/weather_contacts.cpp +++ b/plugins/Weather/src/weather_contacts.cpp @@ -43,7 +43,7 @@ INT_PTR ViewLog(WPARAM wParam, LPARAM lParam) { // see if the log path is set DBVARIANT dbv; - if (!db_get_ts((MCONTACT)wParam, WEATHERPROTONAME, "Log", &dbv)) { + if (!db_get_ts(wParam, WEATHERPROTONAME, "Log", &dbv)) { if (dbv.pszVal[0] != 0) ShellExecute((HWND)lParam, _T("open"), dbv.ptszVal, _T(""), _T(""), SW_SHOW); db_free(&dbv); @@ -59,10 +59,10 @@ INT_PTR ViewLog(WPARAM wParam, LPARAM lParam) INT_PTR LoadForecast(WPARAM wParam, LPARAM lParam) { TCHAR id[256], loc2[256]; - GetStationID((MCONTACT)wParam, id, SIZEOF(id)); + GetStationID(wParam, id, SIZEOF(id)); if (id[0] != 0) { // check if the complte forecast URL is set. If it is not, display warning and quit - if (DBGetStaticString((MCONTACT)wParam, WEATHERPROTONAME, "InfoURL", loc2, SIZEOF(loc2)) || loc2[0] == 0) { + if (DBGetStaticString(wParam, WEATHERPROTONAME, "InfoURL", loc2, SIZEOF(loc2)) || loc2[0] == 0) { MessageBox(NULL, TranslateT("The URL for complete forcast have not been set. You can set it from the Edit Settings dialog."), TranslateT("Weather Protocol"), MB_ICONINFORMATION); return 1; @@ -78,10 +78,10 @@ INT_PTR LoadForecast(WPARAM wParam, LPARAM lParam) INT_PTR WeatherMap(WPARAM wParam, LPARAM lParam) { TCHAR id[256], loc2[256]; - GetStationID((MCONTACT)wParam, id, SIZEOF(id)); + GetStationID(wParam, id, SIZEOF(id)); if (id[0] != 0) { // check if the weather map URL is set. If it is not, display warning and quit - if (DBGetStaticString((MCONTACT)wParam, WEATHERPROTONAME, "MapURL", loc2, SIZEOF(loc2)) || loc2[0] == 0) { + if (DBGetStaticString(wParam, WEATHERPROTONAME, "MapURL", loc2, SIZEOF(loc2)) || loc2[0] == 0) { MessageBox(NULL, TranslateT("The URL for weather map have not been set. You can set it from the Edit Settings dialog."), TranslateT("Weather Protocol"), MB_ICONINFORMATION); return 1; } @@ -99,7 +99,7 @@ INT_PTR WeatherMap(WPARAM wParam, LPARAM lParam) // wParam = current contact INT_PTR EditSettings(WPARAM wParam, LPARAM lParam) { - HWND hEditDlg = WindowList_Find(hWindowList, (MCONTACT)wParam); + HWND hEditDlg = WindowList_Find(hWindowList, wParam); // search the dialog list to prevent multiple instance of dialog for the same contact if (hEditDlg != NULL) { @@ -109,7 +109,7 @@ INT_PTR EditSettings(WPARAM wParam, LPARAM lParam) } else { // if the dialog box is not opened, open a new one - if (IsMyContact((MCONTACT)wParam)) + if (IsMyContact(wParam)) CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_EDIT), NULL, DlgProcChange, (LPARAM)wParam); } @@ -142,7 +142,7 @@ INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa TranslateDialogDefault(hwndDlg); wndData = ( CntSetWndDataType* )mir_alloc(sizeof(CntSetWndDataType)); - wndData->hContact = hContact = (MCONTACT)lParam; + wndData->hContact = hContact = lParam; wndData->hRename = LoadSkinnedIcon(SKINICON_OTHER_RENAME); wndData->hUserDetail = LoadSkinnedIcon(SKINICON_OTHER_USERDETAILS); wndData->hFile = LoadSkinnedIcon(SKINICON_EVENT_FILE); @@ -430,14 +430,14 @@ INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa // wParam = deleted contact int ContactDeleted(WPARAM wParam, LPARAM lParam) { - if (!IsMyContact((MCONTACT)wParam)) + if (!IsMyContact(wParam)) return 0; - removeWindow((MCONTACT)wParam); + removeWindow(wParam); // exit this function if it is not default station DBVARIANT dbv; - if (!db_get_ts((MCONTACT)wParam, WEATHERPROTONAME, "ID", &dbv)) { + if (!db_get_ts(wParam, WEATHERPROTONAME, "ID", &dbv)) { if ( _tcscmp(dbv.ptszVal, opt.Default)) { db_free(&dbv); return 0; diff --git a/plugins/Weather/src/weather_conv.cpp b/plugins/Weather/src/weather_conv.cpp index 129c36eb2b..c375c9d95f 100644 --- a/plugins/Weather/src/weather_conv.cpp +++ b/plugins/Weather/src/weather_conv.cpp @@ -572,7 +572,7 @@ TCHAR* GetDisplay(WEATHERINFO *w, const TCHAR *dis, TCHAR* str) TCHAR svcReturnText[MAX_TEXT_SIZE]; INT_PTR GetDisplaySvcFunc(WPARAM wParam, LPARAM lParam) { - WEATHERINFO winfo = LoadWeatherInfo((MCONTACT)wParam); + WEATHERINFO winfo = LoadWeatherInfo(wParam); return (INT_PTR)GetDisplay(&winfo, (TCHAR*)lParam, svcReturnText); } diff --git a/plugins/Weather/src/weather_mwin.cpp b/plugins/Weather/src/weather_mwin.cpp index 75f32395be..d63114cfe0 100644 --- a/plugins/Weather/src/weather_mwin.cpp +++ b/plugins/Weather/src/weather_mwin.cpp @@ -294,11 +294,11 @@ void UpdateMwinData(MCONTACT hContact) INT_PTR Mwin_MenuClicked(WPARAM wParam,LPARAM lParam) { - BOOL addwnd = WindowList_Find(hMwinWindowList, (MCONTACT)wParam) == NULL; + BOOL addwnd = WindowList_Find(hMwinWindowList, wParam) == NULL; if (addwnd) - addWindow((MCONTACT)wParam); + addWindow(wParam); else - removeWindow((MCONTACT)wParam); + removeWindow(wParam); return 0; } diff --git a/plugins/Weather/src/weather_popup.cpp b/plugins/Weather/src/weather_popup.cpp index d1477eee2e..58b2ac4da9 100644 --- a/plugins/Weather/src/weather_popup.cpp +++ b/plugins/Weather/src/weather_popup.cpp @@ -36,13 +36,13 @@ int WeatherPopup(WPARAM wParam, LPARAM lParam) { // determine if the popup should display or not if (opt.UsePopup && opt.UpdatePopup && (!opt.PopupOnChange || (BOOL)lParam) && - !db_get_b((MCONTACT)wParam, WEATHERPROTONAME, "DPopUp", 0)) + !db_get_b(wParam, WEATHERPROTONAME, "DPopUp", 0)) { - WEATHERINFO winfo = LoadWeatherInfo((MCONTACT)wParam); + WEATHERINFO winfo = LoadWeatherInfo(wParam); // setup the popup POPUPDATAT ppd = { 0 }; - ppd.lchContact = (MCONTACT)wParam; + ppd.lchContact = wParam; ppd.PluginData = ppd.lchIcon = LoadSkinnedProtoIcon(WEATHERPROTONAME, winfo.status); GetDisplay(&winfo, opt.pTitle, ppd.lptzContactName); GetDisplay(&winfo, opt.pText, ppd.lptzText); diff --git a/plugins/Weather/src/weather_update.cpp b/plugins/Weather/src/weather_update.cpp index 3736b1a87f..40a383b735 100644 --- a/plugins/Weather/src/weather_update.cpp +++ b/plugins/Weather/src/weather_update.cpp @@ -300,9 +300,9 @@ void UpdateAll(BOOL AutoUpdate, BOOL RemoveData) // wParam = handle for the weather station that is going to be updated INT_PTR UpdateSingleStation(WPARAM wParam, LPARAM lParam) { - if (IsMyContact((MCONTACT)wParam)) { + if (IsMyContact(wParam)) { // add the station to the end of the update queue - UpdateListAdd((MCONTACT)wParam); + UpdateListAdd(wParam); // if it is not updating, then start the update thread process // if it is updating, the stations just added to the queue will get @@ -318,10 +318,10 @@ INT_PTR UpdateSingleStation(WPARAM wParam, LPARAM lParam) // wParam = handle for the weather station that is going to be updated INT_PTR UpdateSingleRemove(WPARAM wParam, LPARAM lParam) { - if (IsMyContact((MCONTACT)wParam)) { + if (IsMyContact(wParam)) { // add the station to the end of the update queue, and also remove old data - DBDataManage((MCONTACT)wParam, WDBM_REMOVE, 0, 0); - UpdateListAdd((MCONTACT)wParam); + DBDataManage(wParam, WDBM_REMOVE, 0, 0); + UpdateListAdd(wParam); // if it is not updating, then start the update thread process // if it is updating, the stations just added to the queue will get updated by the already-running process diff --git a/plugins/Weather/src/weather_userinfo.cpp b/plugins/Weather/src/weather_userinfo.cpp index d6e3f1b64e..3817599b3a 100644 --- a/plugins/Weather/src/weather_userinfo.cpp +++ b/plugins/Weather/src/weather_userinfo.cpp @@ -46,7 +46,7 @@ int UserInfoInit(WPARAM wParam, LPARAM lParam) } else { // check if it is a weather contact - if (IsMyContact((MCONTACT)lParam)) { + if (IsMyContact(lParam)) { // register the contact info page odp.pszTemplate = MAKEINTRESOURCEA(IDD_USERINFO); odp.pfnDlgProc = DlgProcUIPage; @@ -70,10 +70,10 @@ INT_PTR CALLBACK DlgProcUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa TranslateDialogDefault(hwndDlg); SendMessage(GetDlgItem(hwndDlg,IDC_MOREDETAIL), BUTTONSETASFLATBTN, TRUE, 0); // save the contact handle for later use - hContact = (MCONTACT)lParam; + hContact = lParam; SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)hContact); // load weather info for the contact - w = LoadWeatherInfo((MCONTACT)lParam); + w = LoadWeatherInfo(lParam); SetDlgItemText(hwndDlg, IDC_INFO1, GetDisplay(&w, TranslateT("Current condition for %n"), str)); SendDlgItemMessage(hwndDlg, IDC_INFOICON, STM_SETICON, @@ -163,7 +163,7 @@ INT_PTR CALLBACK DlgProcMoreData(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l switch (msg) { case WM_INITDIALOG: // save the contact handle for later use - hContact = (MCONTACT)lParam; + hContact = lParam; SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)hContact); SendDlgItemMessage(hwndDlg, IDC_MTEXT, EM_AUTOURLDETECT, (WPARAM) TRUE, 0); @@ -354,8 +354,8 @@ void LoadBriefInfoText(HWND hwndDlg, MCONTACT hContact) int BriefInfo(WPARAM wParam, LPARAM lParam) { // make sure that the contact is actually a weather one - if (IsMyContact((MCONTACT)wParam)) { - HWND hMoreDataDlg = WindowList_Find(hDataWindowList, (MCONTACT)wParam); + if (IsMyContact(wParam)) { + HWND hMoreDataDlg = WindowList_Find(hDataWindowList, wParam); if (hMoreDataDlg != NULL) { SetForegroundWindow(hMoreDataDlg); SetFocus(hMoreDataDlg); diff --git a/plugins/WebView/src/webview.cpp b/plugins/WebView/src/webview.cpp index 46d70533f1..19fdc8e55d 100644 --- a/plugins/WebView/src/webview.cpp +++ b/plugins/WebView/src/webview.cpp @@ -176,7 +176,7 @@ void InitialiseGlobals(void) /*****************************************************************************/ int Doubleclick(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; char *szProto = GetContactProto(hContact); if ( lstrcmpA(MODULENAME, szProto)) return 0; @@ -371,7 +371,7 @@ int ModulesLoaded(WPARAM, LPARAM) /*****************************************************************************/ INT_PTR DataWndMenuCommand(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; HWND hwndDlg = WindowList_Find(hWindowList, hContact); if (hwndDlg != NULL) { DestroyWindow(hwndDlg); @@ -455,7 +455,7 @@ int OnTopMenuCommand(WPARAM wParam, LPARAM lParam, MCONTACT singlecontact) /*****************************************************************************/ INT_PTR WebsiteMenuCommand(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; ptrT url( db_get_tsa(hContact, MODULENAME, "URL")); if (url) CallService(MS_UTILS_OPENURL, OUF_TCHAR, (LPARAM)url); @@ -474,14 +474,14 @@ int UpdateMenuCommand(WPARAM wParam, LPARAM lParam, MCONTACT singlecontact) /*****************************************************************************/ int ContactMenuItemUpdateData(WPARAM wParam, LPARAM lParam) { - UpdateMenuCommand(wParam, lParam, (MCONTACT)wParam); + UpdateMenuCommand(wParam, lParam, wParam); return 0; } /*****************************************************************************/ INT_PTR CntOptionsMenuCommand(WPARAM wParam, LPARAM) { - HWND hwndDlg = WindowList_Find(hWindowList, (MCONTACT)wParam); + HWND hwndDlg = WindowList_Find(hWindowList, wParam); if (hwndDlg) { DestroyWindow(hwndDlg); return 0; diff --git a/plugins/WebView/src/webview_alerts.cpp b/plugins/WebView/src/webview_alerts.cpp index 946856a3ab..2c363a0c30 100644 --- a/plugins/WebView/src/webview_alerts.cpp +++ b/plugins/WebView/src/webview_alerts.cpp @@ -44,7 +44,7 @@ int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) if ( db_get_b(NULL, MODULENAME, LCLK_WEB_PGE_KEY, 0)) { CallService(MS_UTILS_OPENURL, OUF_TCHAR, (LPARAM)url); PUDeletePopup(hWnd); - db_set_w((MCONTACT)wParam, MODULENAME, "Status", ID_STATUS_ONLINE); + db_set_w(wParam, MODULENAME, "Status", ID_STATUS_ONLINE); } // dismiss if ( db_get_b(NULL, MODULENAME, LCLK_DISMISS_KEY, 1)) @@ -65,7 +65,7 @@ int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) if ( db_get_b(NULL, MODULENAME, RCLK_WEB_PGE_KEY, 1)) { CallService(MS_UTILS_OPENURL, OUF_TCHAR, (LPARAM)url); PUDeletePopup(hWnd); - db_set_w((MCONTACT)wParam, MODULENAME, "Status", ID_STATUS_ONLINE); + db_set_w(wParam, MODULENAME, "Status", ID_STATUS_ONLINE); } // dismiss if ( db_get_b(NULL, MODULENAME, RCLK_DISMISS_KEY, 0)) @@ -115,13 +115,13 @@ int WPopupAlert(WPARAM wParam, LPARAM lParam) if( ((HANDLE)wParam) != NULL) { DBVARIANT dbv; - db_get_ts((MCONTACT)wParam, MODULENAME, PRESERVE_NAME_KEY, &dbv); + db_get_ts(wParam, MODULENAME, PRESERVE_NAME_KEY, &dbv); lstrcpyn(ppd.lptzContactName, dbv.ptszVal, SIZEOF(ppd.lptzContactName)); db_free(&dbv); } else lstrcpy(ppd.lptzContactName, _A2T(MODULENAME)); - ppd.lchContact = (MCONTACT)wParam; + ppd.lchContact = wParam; ppd.lchIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_SITE)); TCHAR *displaytext = (TCHAR*)lParam; @@ -158,7 +158,7 @@ int PopupAlert(WPARAM wParam, LPARAM lParam) POPUPDATA ppd = { 0 }; if (((HANDLE)wParam) != NULL) { DBVARIANT dbv; - if ( !db_get_s((MCONTACT)wParam, MODULENAME, PRESERVE_NAME_KEY, &dbv)) { + if ( !db_get_s(wParam, MODULENAME, PRESERVE_NAME_KEY, &dbv)) { lstrcpynA(ppd.lptzContactName, dbv.pszVal, SIZEOF(ppd.lptzContactName)); db_free(&dbv); } @@ -166,7 +166,7 @@ int PopupAlert(WPARAM wParam, LPARAM lParam) if (ppd.lptzContactName[0] == 0) strncpy_s(ppd.lptzContactName, SIZEOF(ppd.lptzContactName), MODULENAME, _TRUNCATE); - ppd.lchContact = (MCONTACT)wParam; + ppd.lchContact = wParam; ppd.lchIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_SITE)); char *displaytext = (char*)lParam; @@ -205,7 +205,7 @@ int OSDAlert(WPARAM wParam, LPARAM lParam) if (((HANDLE)wParam) != NULL) { DBVARIANT dbv; - if ( !db_get_s((MCONTACT)wParam, MODULENAME, PRESERVE_NAME_KEY, &dbv)) { + if ( !db_get_s(wParam, MODULENAME, PRESERVE_NAME_KEY, &dbv)) { strncpy_s(contactname, SIZEOF(contactname), dbv.pszVal, _TRUNCATE); db_free(&dbv); } @@ -225,7 +225,7 @@ int OSDAlert(WPARAM wParam, LPARAM lParam) /*****************************************************************************/ int ErrorMsgs(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; TCHAR newdisplaytext[2000], *displaytext = (TCHAR*)lParam; if ( db_get_b(NULL, MODULENAME, SUPPRESS_ERR_KEY, 0)) @@ -814,7 +814,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn /*****************************************************************************/ int DataWndAlertCommand(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if ( WindowList_Find(hWindowList, hContact)) return 0; diff --git a/plugins/WebView/src/webview_datawnd.cpp b/plugins/WebView/src/webview_datawnd.cpp index 1f13631e52..e9d7ae144c 100644 --- a/plugins/WebView/src/webview_datawnd.cpp +++ b/plugins/WebView/src/webview_datawnd.cpp @@ -155,7 +155,7 @@ INT_PTR CALLBACK DlgProcDisplayData(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA case WM_INITDIALOG: TranslateDialogDefault(hwndDlg); { - MCONTACT hContact2 = (MCONTACT)lParam; + MCONTACT hContact2 = lParam; SetWindowLong(hwndDlg, GWLP_USERDATA, (LONG) hContact2); WindowList_Add(hWindowList, hwndDlg, hContact2); @@ -339,7 +339,7 @@ INT_PTR CALLBACK DlgProcDisplayData(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA case IDC_OPEN_URL: GetDlgItemText(hwndDlg, IDC_OPEN_URL, url, SIZEOF(url)); CallService(MS_UTILS_OPENURL, OUF_TCHAR, (LPARAM)url); - db_set_w((MCONTACT)wParam, MODULENAME, "Status", ID_STATUS_ONLINE); + db_set_w(wParam, MODULENAME, "Status", ID_STATUS_ONLINE); break; case IDC_UPDATE_BUTTON: diff --git a/plugins/WebView/src/webview_opts.cpp b/plugins/WebView/src/webview_opts.cpp index 168ac8c2b4..14f776003b 100644 --- a/plugins/WebView/src/webview_opts.cpp +++ b/plugins/WebView/src/webview_opts.cpp @@ -285,7 +285,7 @@ INT_PTR CALLBACK DlgProcAlertOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l case WM_INITDIALOG: test = 0; TranslateDialogDefault(hwndDlg); - hContact = (MCONTACT)lParam; + hContact = lParam; SetWindowLong(hwndDlg, GWLP_USERDATA, (LONG) hContact); diff --git a/plugins/WebView/src/webview_services.cpp b/plugins/WebView/src/webview_services.cpp index 94b28249d2..7c73059b64 100644 --- a/plugins/WebView/src/webview_services.cpp +++ b/plugins/WebView/src/webview_services.cpp @@ -32,7 +32,7 @@ static char szInvalidChars[] = { '\\', '/', ':', '*', '?', '\"', '<', '>', '|' } int DBSettingChanged(WPARAM wParam, LPARAM lParam) { // We can't upload changes to NULL contact - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if (hContact == NULL) return 0; @@ -111,7 +111,7 @@ int DBSettingChanged(WPARAM wParam, LPARAM lParam) /*****************************************************************************/ int SiteDeleted(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if (lstrcmpA(GetContactProto(hContact), MODULENAME)) return 0; @@ -167,7 +167,7 @@ INT_PTR PingWebsiteMenuCommand(WPARAM wParam, LPARAM lParam) return 0; } - ptrT url( db_get_tsa((MCONTACT)wParam, MODULENAME, "URL")); + ptrT url( db_get_tsa(wParam, MODULENAME, "URL")); if (url == NULL) return 0; @@ -188,7 +188,7 @@ INT_PTR PingWebsiteMenuCommand(WPARAM wParam, LPARAM lParam) /*****************************************************************************/ INT_PTR StpPrcssMenuCommand(WPARAM wParam, LPARAM) { - db_set_b((MCONTACT)wParam, MODULENAME, STOP_KEY, 1); + db_set_b(wParam, MODULENAME, STOP_KEY, 1); return 0; } diff --git a/plugins/WhenWasIt/src/dlg_handlers.cpp b/plugins/WhenWasIt/src/dlg_handlers.cpp index ff123eed26..4a3f6d31bf 100644 --- a/plugins/WhenWasIt/src/dlg_handlers.cpp +++ b/plugins/WhenWasIt/src/dlg_handlers.cpp @@ -398,7 +398,7 @@ INT_PTR CALLBACK DlgProcAddBirthday(HWND hWnd, UINT msg, WPARAM wParam, LPARAM l TranslateDialogDefault(hWnd); SetWindowLongPtr(hWnd, GWLP_USERDATA, lParam); { - MCONTACT hContact = (MCONTACT)lParam; + MCONTACT hContact = lParam; WindowList_Add(hAddBirthdayWndsList, hWnd, hContact); Utils_RestoreWindowPositionNoSize(hWnd,hContact,ModuleName,"BirthdayWnd"); } @@ -746,7 +746,7 @@ INT_PTR CALLBACK DlgProcBirthdays(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPa case WWIM_UPDATE_BIRTHDAY: {//wParam = hContact HWND hList = GetDlgItem(hWnd, IDC_BIRTHDAYS_LIST); - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; int i; int count = ListView_GetItemCount(hList); //int bShowCurrentAge = db_get_b(NULL, ModuleName, "ShowCurrentAge", 0); diff --git a/plugins/WhenWasIt/src/hooked_events.cpp b/plugins/WhenWasIt/src/hooked_events.cpp index 94f2f3a355..e245862d39 100644 --- a/plugins/WhenWasIt/src/hooked_events.cpp +++ b/plugins/WhenWasIt/src/hooked_events.cpp @@ -68,7 +68,7 @@ static int OnContactSettingChanged(WPARAM wParam, LPARAM lParam) DBCONTACTWRITESETTING *dw = (DBCONTACTWRITESETTING *) lParam; DBVARIANT dv = dw->value; if ((strcmp(dw->szModule, DUMMY_MODULE) == 0) && (strcmp(dw->szSetting, DUMMY_SETTING) == 0)) - RefreshContactListIcons((MCONTACT)wParam); + RefreshContactListIcons(wParam); return 0; } diff --git a/plugins/WhenWasIt/src/services.cpp b/plugins/WhenWasIt/src/services.cpp index 79dd45688f..7843247755 100644 --- a/plugins/WhenWasIt/src/services.cpp +++ b/plugins/WhenWasIt/src/services.cpp @@ -169,7 +169,7 @@ INT_PTR ShowListService(WPARAM wParam, LPARAM lParam) INT_PTR AddBirthdayService(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; HWND hWnd = WindowList_Find(hAddBirthdayWndsList, hContact); if ( !hWnd) { hWnd = CreateDialogParam(hInstance, MAKEINTRESOURCE(IDD_ADD_BIRTHDAY), NULL, DlgProcAddBirthday, (LPARAM) hContact); diff --git a/plugins/XSoundNotify/src/dialog.cpp b/plugins/XSoundNotify/src/dialog.cpp index 206d4be1c4..e83a3df7bd 100644 --- a/plugins/XSoundNotify/src/dialog.cpp +++ b/plugins/XSoundNotify/src/dialog.cpp @@ -15,7 +15,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP case WM_INITDIALOG: { TranslateDialogDefault(hwndDlg); - MCONTACT hContact = (MCONTACT)lParam; + MCONTACT hContact = lParam; SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam); WindowList_Add(hChangeSoundDlgList, hwndDlg, hContact); Utils_RestoreWindowPositionNoSize(hwndDlg, hContact, SETTINGSNAME, "ChangeSoundDlg"); @@ -204,7 +204,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP INT_PTR ShowDialog(WPARAM wParam, LPARAM lParam) { - HWND hChangeSoundDlg = WindowList_Find(hChangeSoundDlgList, (MCONTACT)wParam); + HWND hChangeSoundDlg = WindowList_Find(hChangeSoundDlgList, wParam); if (!hChangeSoundDlg) { hChangeSoundDlg = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_CONTACTS), 0, DlgProcContactsOptions, (LPARAM)wParam); ShowWindow(hChangeSoundDlg, SW_SHOW); diff --git a/plugins/XSoundNotify/src/xsn_main.cpp b/plugins/XSoundNotify/src/xsn_main.cpp index 44acde8a95..14c2f69c11 100644 --- a/plugins/XSoundNotify/src/xsn_main.cpp +++ b/plugins/XSoundNotify/src/xsn_main.cpp @@ -113,9 +113,9 @@ static int ProcessEvent(WPARAM wParam, LPARAM lParam) if (!isReceiveMessage(HANDLE(lParam))) return 0; - isIgnoreSound = db_get_b((MCONTACT)wParam, SETTINGSNAME, SETTINGSIGNOREKEY, 0); + isIgnoreSound = db_get_b(wParam, SETTINGSNAME, SETTINGSIGNOREKEY, 0); DBVARIANT dbv; - if ( !isIgnoreSound && !db_get_ts((MCONTACT)wParam, SETTINGSNAME, SETTINGSKEY, &dbv)) { + if ( !isIgnoreSound && !db_get_ts(wParam, SETTINGSNAME, SETTINGSKEY, &dbv)) { TCHAR PlaySoundPath[MAX_PATH] = {0}; PathToAbsoluteT(dbv.ptszVal, PlaySoundPath); SkinPlaySoundFile(PlaySoundPath); @@ -154,7 +154,7 @@ static int OnLoadInit(WPARAM wParam, LPARAM lParam) static int PrebuildContactMenu(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; if (hContact) { char* szProto = GetContactProto(hContact); PROTOACCOUNT *pa = ProtoGetAccount(szProto); diff --git a/plugins/YAMN/src/services.cpp b/plugins/YAMN/src/services.cpp index 2caa8811d9..f0b7fa348f 100644 --- a/plugins/YAMN/src/services.cpp +++ b/plugins/YAMN/src/services.cpp @@ -65,12 +65,12 @@ static int Service_ContactDoubleclicked(WPARAM wParam, LPARAM lParam) static INT_PTR ContactApplication(WPARAM wParam, LPARAM lParam) { - char *szProto = GetContactProto((MCONTACT)wParam); + char *szProto = GetContactProto(wParam); if ( lstrcmpA(szProto, YAMN_DBMODULE)) return 0; DBVARIANT dbv; - if ( db_get((MCONTACT)wParam, YAMN_DBMODULE, "Id", &dbv)) + if ( db_get(wParam, YAMN_DBMODULE, "Id", &dbv)) return 0; HACCOUNT ActualAccount = (HACCOUNT) CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)dbv.pszVal); @@ -168,7 +168,7 @@ static INT_PTR AccountMailCheck(WPARAM wParam, LPARAM lParam) static INT_PTR ContactMailCheck(WPARAM wParam, LPARAM lParam) { - char *szProto = GetContactProto((MCONTACT)wParam); + char *szProto = GetContactProto(wParam); if ( lstrcmpA(szProto, YAMN_DBMODULE)) return 0; @@ -227,12 +227,12 @@ void MainMenuAccountClicked(WPARAM wParam, LPARAM lParam) /*static*/ void ContactDoubleclicked(WPARAM wParam, LPARAM lParam) { - char *szProto = GetContactProto((MCONTACT)wParam); + char *szProto = GetContactProto(wParam); if ( lstrcmpA(szProto, YAMN_DBMODULE)) return; DBVARIANT dbv; - if ( db_get((MCONTACT)wParam, YAMN_DBMODULE, "Id", &dbv)) + if ( db_get(wParam, YAMN_DBMODULE, "Id", &dbv)) return; HACCOUNT ActualAccount = (HACCOUNT) CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)dbv.pszVal); diff --git a/plugins/YARelay/src/main.cpp b/plugins/YARelay/src/main.cpp index ac57f304e8..6cacf14429 100644 --- a/plugins/YARelay/src/main.cpp +++ b/plugins/YARelay/src/main.cpp @@ -89,7 +89,7 @@ int ProtoAck(WPARAM wparam,LPARAM lparam) */ static int MessageEventAdded(WPARAM wParam, LPARAM lParam) { - MCONTACT hContact = (MCONTACT)wParam; + MCONTACT hContact = wParam; HANDLE hDBEvent = (HANDLE)lParam; // is the message sender accepted for forwarding diff --git a/plugins/wbOSD/src/events.cpp b/plugins/wbOSD/src/events.cpp index e2db340bc8..47411f8f92 100644 --- a/plugins/wbOSD/src/events.cpp +++ b/plugins/wbOSD/src/events.cpp @@ -196,7 +196,7 @@ int HookedNewEvent(WPARAM wParam, LPARAM lParam) TCHAR buffer[512]; mir_sntprintf(buffer, SIZEOF(buffer), buf, c1, c2); - ShowOSD(buffer, 0, db_get_dw(NULL,THIS_MODULE, "clr_msg", DEFAULT_CLRMSG), (MCONTACT)wParam); + ShowOSD(buffer, 0, db_get_dw(NULL,THIS_MODULE, "clr_msg", DEFAULT_CLRMSG), wParam); mir_free( c1 ); mir_free( c2 ); -- cgit v1.2.3