From e48bae4c6ccf1003916b3960f30816ce8aaa955b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 31 May 2015 21:02:26 +0000 Subject: - additional operator LPARAM() for _A2T & _T2A; - we don't need StrConvA anymore; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@13952 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/AVS/src/image_utils.cpp | 2 +- plugins/AddContactPlus/src/addcontact.cpp | 2 +- plugins/Alarms/src/frame.cpp | 15 +++++++-------- plugins/AutoShutdown/src/shutdownsvc.cpp | 2 +- plugins/BASS_interface/src/Main.cpp | 2 +- plugins/Clist_modern/src/modern_clcutils.cpp | 4 ++-- plugins/Clist_nicer/src/clc.cpp | 6 +++--- plugins/Clist_nicer/src/clui.cpp | 2 +- plugins/ContactsPlus/src/send.cpp | 2 +- plugins/DbEditorPP/src/copymodule.cpp | 2 +- plugins/Db_autobackups/src/options.cpp | 2 +- plugins/HTTPServer/src/GuiElements.cpp | 2 +- plugins/HistoryLinkListPlus/src/linklist_dlg.cpp | 4 ++-- plugins/HistoryLinkListPlus/src/linklist_fct.cpp | 4 ++-- plugins/IgnoreState/src/options.cpp | 2 +- plugins/KeyboardNotify/src/options.cpp | 2 +- plugins/LotusNotify/src/LotusNotify.cpp | 5 +---- plugins/MirandaG15/src/CConfig.cpp | 2 +- plugins/MyDetails/src/frame.cpp | 8 ++++---- plugins/NotesAndReminders/src/notes.cpp | 4 ++-- plugins/NotesAndReminders/src/reminders.cpp | 14 +++++++------- plugins/PasteIt/src/PasteIt.cpp | 2 +- plugins/Popup/src/common.h | 5 ++--- plugins/Popup/src/services.cpp | 2 +- plugins/RecentContacts/src/RecentContacts.cpp | 4 ++-- plugins/Scriver/src/utils.cpp | 6 +++--- plugins/SecureIM/src/options.cpp | 6 +++--- plugins/SecureIM/src/svcs_proto.cpp | 8 ++++---- plugins/Sessions/Src/Utils.cpp | 4 ++-- plugins/ShellExt/src/shlcom.cpp | 2 +- plugins/SimpleStatusMsg/src/msgbox.cpp | 4 ++-- plugins/SimpleStatusMsg/src/options.cpp | 4 ++-- plugins/SmileyAdd/src/smileys.cpp | 4 ++-- plugins/StatusChange/src/main.cpp | 4 ++-- .../StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp | 2 +- plugins/TabSRMM/src/chat/options.cpp | 2 +- plugins/TabSRMM/src/generic_msghandlers.cpp | 2 +- plugins/TabSRMM/src/msgdialog.cpp | 2 +- plugins/TipperYM/src/bitmap_func.cpp | 2 +- plugins/WinterSpeak/src/DialogConfigEngine.cpp | 2 +- 40 files changed, 75 insertions(+), 80 deletions(-) (limited to 'plugins') diff --git a/plugins/AVS/src/image_utils.cpp b/plugins/AVS/src/image_utils.cpp index f546a252e2..9ab45c6516 100644 --- a/plugins/AVS/src/image_utils.cpp +++ b/plugins/AVS/src/image_utils.cpp @@ -555,7 +555,7 @@ int SaveAvatar(const char *protocol, const TCHAR *tszFileName) { INT_PTR result = CallProtoService(protocol, PS_SETMYAVATART, 0, (LPARAM)tszFileName); if (result == CALLSERVICE_NOTFOUND) - result = CallProtoService(protocol, PS_SETMYAVATAR, 0, (LPARAM)(char*)_T2A(tszFileName)); + result = CallProtoService(protocol, PS_SETMYAVATAR, 0, _T2A(tszFileName)); return result; } diff --git a/plugins/AddContactPlus/src/addcontact.cpp b/plugins/AddContactPlus/src/addcontact.cpp index 4e285068a1..b2e0741f56 100644 --- a/plugins/AddContactPlus/src/addcontact.cpp +++ b/plugins/AddContactPlus/src/addcontact.cpp @@ -304,7 +304,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM) } if (GetAsyncKeyState(VK_CONTROL)) - CallService(MS_MSG_SENDMESSAGE, hContact, (LPARAM)(const char*)NULL); + CallService(MS_MSG_SENDMESSAGE, hContact, NULL); } // fall through case IDCANCEL: diff --git a/plugins/Alarms/src/frame.cpp b/plugins/Alarms/src/frame.cpp index 18659fec9c..621ac75fd6 100644 --- a/plugins/Alarms/src/frame.cpp +++ b/plugins/Alarms/src/frame.cpp @@ -195,7 +195,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar if (GetUpdateRect(hwnd, &r, FALSE)) { PAINTSTRUCT ps; HDC hdc = BeginPaint(hwnd, &ps); - SendMessage(hwnd, WM_PRINTCLIENT, (WPARAM)hdc, (LPARAM)(PRF_CLIENT | PRF_CHILDREN)); + SendMessage(hwnd, WM_PRINTCLIENT, (WPARAM)hdc, PRF_CLIENT | PRF_CHILDREN); EndPaint(hwnd, &ps); } } @@ -209,10 +209,9 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar if (IsWindowVisible(hwnd)) { SendMessage(hwnd, WMU_SIZE_LIST, 0, 0); - if (frame_id != -1) { - //CallService(MS_CLIST_FRAMES_UPDATEFRAME, (WPARAM)frame_id, (LPARAM)(FU_TBREDRAW | FU_FMREDRAW)); - CallService(MS_CLIST_FRAMES_UPDATEFRAME, (WPARAM)frame_id, (LPARAM)FU_TBREDRAW); - } + if (frame_id != -1) + CallService(MS_CLIST_FRAMES_UPDATEFRAME, (WPARAM)frame_id, FU_TBREDRAW); + InvalidateRect(hwnd, 0, TRUE); } break; @@ -239,8 +238,8 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar SetWindowPos(GetParent(hwnd), 0, 0, 0, rp_window.right - rp_window.left, height, SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE); } else if (ServiceExists(MS_CLIST_FRAMES_ADDFRAME) && frame_id != -1) { - CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS, MAKEWPARAM(FO_HEIGHT, frame_id), (LPARAM)(count * itemheight)); - CallService(MS_CLIST_FRAMES_UPDATEFRAME, (WPARAM)frame_id, (LPARAM)(FU_TBREDRAW | FU_FMREDRAW | FU_FMPOS)); + CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS, MAKEWPARAM(FO_HEIGHT, frame_id), count * itemheight); + CallService(MS_CLIST_FRAMES_UPDATEFRAME, (WPARAM)frame_id, FU_TBREDRAW | FU_FMREDRAW | FU_FMPOS); } } @@ -267,7 +266,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar // we have reminders - show if not linked to clist or if clist is visible if ((!options.hide_with_clist && FrameIsFloating()) || IsWindowVisible((HWND)CallService(MS_CLUI_GETHWND, 0, 0))) { CallService(MS_CLIST_FRAMES_SHFRAME, (WPARAM)frame_id, 0); - CallService(MS_CLIST_FRAMES_UPDATEFRAME, (WPARAM)frame_id, (LPARAM)(FU_FMREDRAW | FU_FMPOS)); + CallService(MS_CLIST_FRAMES_UPDATEFRAME, (WPARAM)frame_id, FU_FMREDRAW | FU_FMPOS); } } } diff --git a/plugins/AutoShutdown/src/shutdownsvc.cpp b/plugins/AutoShutdown/src/shutdownsvc.cpp index 3de69ba4d2..a4aafa2763 100644 --- a/plugins/AutoShutdown/src/shutdownsvc.cpp +++ b/plugins/AutoShutdown/src/shutdownsvc.cpp @@ -425,7 +425,7 @@ INT_PTR ServiceShutdown(WPARAM wParam,LPARAM lParam) NotifyEventHooks(hEventShutdown,wParam,lParam); /* show dialog */ if (lParam && db_get_b(NULL,"AutoShutdown","ShowConfirmDlg",SETTING_SHOWCONFIRMDLG_DEFAULT)) - if (CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_SHUTDOWNNOW), NULL, ShutdownDlgProc, (LPARAM)(BYTE)wParam) != NULL) + if (CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_SHUTDOWNNOW), NULL, ShutdownDlgProc, (BYTE)wParam) != NULL) return 0; /* show error */ diff --git a/plugins/BASS_interface/src/Main.cpp b/plugins/BASS_interface/src/Main.cpp index e9adaf117d..79b6349ba5 100644 --- a/plugins/BASS_interface/src/Main.cpp +++ b/plugins/BASS_interface/src/Main.cpp @@ -194,7 +194,7 @@ INT_PTR CALLBACK OptionsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara SendDlgItemMessage(hwndDlg, IDC_OUTDEVICE, CB_SETCURSEL, 0, 0); db_get_ts(NULL, ModuleName, OPT_OUTDEVICE, &dbv); for (int i = 1; BASS_GetDeviceInfo(i + newBass, &info); i++) { - SendDlgItemMessage(hwndDlg, IDC_OUTDEVICE, CB_ADDSTRING, 0, (LPARAM)(TCHAR*)_A2T(info.name)); + SendDlgItemMessage(hwndDlg, IDC_OUTDEVICE, CB_ADDSTRING, 0, _A2T(info.name)); if (!mir_tstrcmp(dbv.ptszVal, _A2T(info.name))) SendDlgItemMessage(hwndDlg, IDC_OUTDEVICE, CB_SETCURSEL, i, 0); } diff --git a/plugins/Clist_modern/src/modern_clcutils.cpp b/plugins/Clist_modern/src/modern_clcutils.cpp index 6fd85d6d35..33734e5199 100644 --- a/plugins/Clist_modern/src/modern_clcutils.cpp +++ b/plugins/Clist_modern/src/modern_clcutils.cpp @@ -332,7 +332,7 @@ void cliBeginRenameSelection(HWND hwnd, ClcData *dat) mir_subclassWindow(dat->hwndRenameEdit, RenameEditSubclassProc); SendMessage(dat->hwndRenameEdit, WM_SETFONT, (WPARAM)(contact->type == CLCIT_GROUP ? dat->fontModernInfo[FONTID_OPENGROUPS].hFont : dat->fontModernInfo[FONTID_CONTACTS].hFont), 0); SendMessage(dat->hwndRenameEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN | EC_USEFONTINFO, 0); - SendMessage(dat->hwndRenameEdit, EM_SETSEL, 0, (LPARAM)(-1)); + SendMessage(dat->hwndRenameEdit, EM_SETSEL, 0, -1); r.top = 1; r.bottom = h - 1; @@ -341,7 +341,7 @@ void cliBeginRenameSelection(HWND hwnd, ClcData *dat) //ES_MULTILINE - SendMessage(dat->hwndRenameEdit, EM_SETRECT, 0, (LPARAM)(&r)); + SendMessage(dat->hwndRenameEdit, EM_SETRECT, 0, (LPARAM)&r); CLUI_ShowWindowMod(dat->hwndRenameEdit, SW_SHOW); SetWindowPos(dat->hwndRenameEdit, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp index 3900e1770b..0316c8170c 100644 --- a/plugins/Clist_nicer/src/clc.cpp +++ b/plugins/Clist_nicer/src/clc.cpp @@ -377,7 +377,7 @@ LBL_Def: } dat->needsResort = TRUE; PostMessage(hwnd, INTM_SORTCLC, 0, recalcScrollBar); - PostMessage(hwnd, INTM_INVALIDATE, 0, (LPARAM)(contactRemoved ? 0 : wParam)); + PostMessage(hwnd, INTM_INVALIDATE, 0, contactRemoved ? 0 : wParam); if (recalcScrollBar) pcli->pfnRecalcScrollBar(hwnd, dat); } @@ -479,7 +479,7 @@ LBL_Def: szProto = contact->proto; } GetCachedStatusMsg(p, szProto); - PostMessage(hwnd, INTM_INVALIDATE, 0, (LPARAM)(contact ? contact->hContact : 0)); + PostMessage(hwnd, INTM_INVALIDATE, 0, contact ? contact->hContact : 0); } goto LBL_Def; @@ -591,7 +591,7 @@ LBL_Def: } GetCachedStatusMsg(p, szProto); - PostMessage(hwnd, INTM_INVALIDATE, 0, (LPARAM)(contact ? contact->hContact : 0)); + PostMessage(hwnd, INTM_INVALIDATE, 0, contact ? contact->hContact : 0); } goto LBL_Def; diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index c066d54371..2b2fe4328b 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -1489,7 +1489,7 @@ skipbg: return 0; } } - else if (CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam), MPCF_MAINMENU), (LPARAM)(HANDLE)NULL)) + else if (CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam), MPCF_MAINMENU), NULL)) return 0; buttons_done: diff --git a/plugins/ContactsPlus/src/send.cpp b/plugins/ContactsPlus/src/send.cpp index 40c87bad81..ae074322ea 100644 --- a/plugins/ContactsPlus/src/send.cpp +++ b/plugins/ContactsPlus/src/send.cpp @@ -93,7 +93,7 @@ void TSendContactsData::ShowErrorDlg(HWND hwndDlg, char* szMsg, bool bAllowRetry ShowWindow(hwndDlg, SW_SHOWNORMAL); EnableWindow(hwndDlg, FALSE); if (!hError) { - hError = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_MSGSENDERROR), hwndDlg, ErrorDlgProc, (LPARAM)(LPTSTR)_A2T(szMsg)); + hError = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_MSGSENDERROR), hwndDlg, ErrorDlgProc, _A2T(szMsg)); if (!bAllowRetry) EnableDlgItem(hError, IDOK, FALSE); // do not allow again - fatal, could not be better } diff --git a/plugins/DbEditorPP/src/copymodule.cpp b/plugins/DbEditorPP/src/copymodule.cpp index 03630c496b..ed84119b4b 100644 --- a/plugins/DbEditorPP/src/copymodule.cpp +++ b/plugins/DbEditorPP/src/copymodule.cpp @@ -83,7 +83,7 @@ INT_PTR CALLBACK copyModDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara SendDlgItemMessageW(hwnd, IDC_CONTACTS, CB_SETITEMDATA, index, hContact); } - index = (int)SendDlgItemMessage(hwnd, IDC_CONTACTS, CB_INSERTSTRING, 0, (LPARAM)(char*)Translate("Settings")); + index = (int)SendDlgItemMessage(hwnd, IDC_CONTACTS, CB_INSERTSTRING, 0, (LPARAM)Translate("Settings")); SendDlgItemMessage(hwnd, IDC_CONTACTS, CB_SETITEMDATA, index, 0); SendDlgItemMessage(hwnd, IDC_CONTACTS, CB_SETCURSEL, index, 0); diff --git a/plugins/Db_autobackups/src/options.cpp b/plugins/Db_autobackups/src/options.cpp index 91cdbf8601..f274d346de 100644 --- a/plugins/Db_autobackups/src/options.cpp +++ b/plugins/Db_autobackups/src/options.cpp @@ -25,7 +25,7 @@ HWND CreateToolTip(HWND hwndParent, LPTSTR ptszText, LPTSTR ptszTitle) GetClientRect(hwndParent, &ti.rect); ti.rect.left = -80; - SendMessage(hwndTT, TTM_ADDTOOL, 0, (LPARAM)(LPTOOLINFO)&ti); + SendMessage(hwndTT, TTM_ADDTOOL, 0, (LPARAM)&ti); SendMessage(hwndTT, TTM_SETTITLE, 1, (LPARAM)ptszTitle); SendMessage(hwndTT, TTM_SETMAXTIPWIDTH, 0, (LPARAM)650); diff --git a/plugins/HTTPServer/src/GuiElements.cpp b/plugins/HTTPServer/src/GuiElements.cpp index b2b67837ee..ea28a2ba26 100644 --- a/plugins/HTTPServer/src/GuiElements.cpp +++ b/plugins/HTTPServer/src/GuiElements.cpp @@ -280,7 +280,7 @@ UINT_PTR CALLBACK ShareNewFileDialogHook( HWND hWndFileDlg = GetParent(hDlg); *szSelection = '/'; - CommDlg_OpenSave_GetSpec(hWndFileDlg, (LPARAM)(&szSelection[1]), _MAX_PATH); + CommDlg_OpenSave_GetSpec(hWndFileDlg, (LPARAM)&szSelection[1], _MAX_PATH); HWND hFileName = GetDlgItem(hWndFileDlg, edt1); char pszFileName[MAX_PATH]; diff --git a/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp b/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp index 07da9e4f59..cb9f69c8f3 100644 --- a/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp +++ b/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp @@ -121,7 +121,7 @@ INT_PTR CALLBACK MainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) link = (LPTSTR)mir_alloc((pENLink->chrg.cpMax - pENLink->chrg.cpMin + 2) * sizeof(TCHAR)); if (link == NULL) break; - SendDlgItemMessage(hDlg, IDC_MAIN, EM_EXSETSEL, 0, (LPARAM)(&pENLink->chrg)); + SendDlgItemMessage(hDlg, IDC_MAIN, EM_EXSETSEL, 0, (LPARAM)&pENLink->chrg); SendDlgItemMessage(hDlg, IDC_MAIN, EM_GETSELTEXT, 0, (LPARAM)link); if (_tcsstr(link, _T("mailto:")) != NULL) { ShellExecute(HWND_TOP, NULL, link, NULL, NULL, SW_SHOWNORMAL); @@ -150,7 +150,7 @@ INT_PTR CALLBACK MainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) link = (LPTSTR)mir_alloc((pENLink->chrg.cpMax - pENLink->chrg.cpMin + 2) * sizeof(TCHAR)); if (link == NULL) break; - SendDlgItemMessage(hDlg, IDC_MAIN, EM_EXSETSEL, 0, (LPARAM)(&(pENLink->chrg))); + SendDlgItemMessage(hDlg, IDC_MAIN, EM_EXSETSEL, 0, (LPARAM)&pENLink->chrg); SendDlgItemMessage(hDlg, IDC_MAIN, EM_GETSELTEXT, 0, (LPARAM)link); pt.x = (short)LOWORD(pENLink->lParam); diff --git a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp index fb095b5346..67a1a47e7f 100644 --- a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp +++ b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp @@ -279,7 +279,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc if ( GetDlgItem(hDlg, IDC_MAIN) && GetDlgItem(hDlg, IDC_MESSAGE)) { - SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETEVENTMASK, 0, (LPARAM)(ENM_LINK)); + SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETEVENTMASK, 0, (LPARAM)ENM_LINK); SendDlgItemMessage( hDlg, IDC_MAIN, EM_AUTOURLDETECT, TRUE, 0 ); SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETBKGNDCOLOR, FALSE, colourSet.background); @@ -524,7 +524,7 @@ int WriteOptionExample(HWND hDlg, DWORD InColourSel, DWORD OutColourSel, DWORD B pf.dwMask = PFM_ALIGNMENT; pf.wAlignment = PFA_LEFT; SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_SETPARAFORMAT, FALSE, (LPARAM)&pf); - SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_SETEVENTMASK, 0, (LPARAM)(ENM_LINK)); + SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_SETEVENTMASK, 0, (LPARAM)ENM_LINK); SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_AUTOURLDETECT, TRUE, 0); SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_SETBKGNDCOLOR, FALSE, BGColourSel); SetDlgItemText(hDlg, IDC_OPTIONS_RE, NULL); diff --git a/plugins/IgnoreState/src/options.cpp b/plugins/IgnoreState/src/options.cpp index bf8d5032ef..c22e2df46c 100644 --- a/plugins/IgnoreState/src/options.cpp +++ b/plugins/IgnoreState/src/options.cpp @@ -47,7 +47,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP tvis.hParent = NULL; tvis.hInsertAfter = TVI_LAST; tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_STATE; - tvis.item.lParam = (LPARAM)(ii[i].type); + tvis.item.lParam = ii[i].type; tvis.item.pszText = TranslateTS(ii[i].name); tvis.item.iImage = tvis.item.iSelectedImage = index; HTREEITEM hti = TreeView_InsertItem(hTree, &tvis); diff --git a/plugins/KeyboardNotify/src/options.cpp b/plugins/KeyboardNotify/src/options.cpp index b21f7f8a3b..bacf145aa4 100644 --- a/plugins/KeyboardNotify/src/options.cpp +++ b/plugins/KeyboardNotify/src/options.cpp @@ -562,7 +562,7 @@ INT_PTR CALLBACK DlgProcEffectOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPA CheckDlgButton(hwndDlg, IDC_INTURN, bFlashEffect == FLASH_INTURN ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_INSEQUENCE, bFlashEffect == FLASH_INSEQUENCE ? BST_CHECKED : BST_UNCHECKED); for (i=0; i < 3; i++) { - int index = SendDlgItemMessage(hwndDlg, IDC_SEQORDER, CB_INSERTSTRING, (WPARAM)-1, (LPARAM)(OrderName[i])); + int index = SendDlgItemMessage(hwndDlg, IDC_SEQORDER, CB_INSERTSTRING, -1, (LPARAM)OrderName[i]); if (index != CB_ERR && index != CB_ERRSPACE) SendDlgItemMessage(hwndDlg, IDC_SEQORDER, CB_SETITEMDATA, (WPARAM)index, (LPARAM)i); } diff --git a/plugins/LotusNotify/src/LotusNotify.cpp b/plugins/LotusNotify/src/LotusNotify.cpp index 177730bb9a..4faf246e76 100644 --- a/plugins/LotusNotify/src/LotusNotify.cpp +++ b/plugins/LotusNotify/src/LotusNotify.cpp @@ -1072,10 +1072,7 @@ INT_PTR CALLBACK DlgProcLotusNotifyOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L EnableWindow(GetDlgItem(hwndDlg, IDC_BGCOLOR), settingSetColours!=0); EnableWindow(GetDlgItem(hwndDlg, IDC_FGCOLOR), settingSetColours!=0); - - //SendDlgItemMessage(hwndDlg, IDC_SERVER, CB_SELECTSTRING ,-1,(LPARAM)(LPCSTR)settingServer); - - // initialise and fill listbox + // initialise and fill listbox hwndList = GetDlgItem(hwndDlg, IDC_STATUS); ListView_DeleteAllItems(hwndList); diff --git a/plugins/MirandaG15/src/CConfig.cpp b/plugins/MirandaG15/src/CConfig.cpp index 6309483209..64892272e5 100644 --- a/plugins/MirandaG15/src/CConfig.cpp +++ b/plugins/MirandaG15/src/CConfig.cpp @@ -939,7 +939,7 @@ void CConfig::FillTree(HWND hTree,bool bCList) vector::iterator iter = m_ProtoList.begin(); while(iter != m_ProtoList.end()) { - tvis.item.lParam=(LPARAM)(*iter); + tvis.item.lParam = (LPARAM)(*iter); tvis.item.pszText= (LPTSTR)(*iter)->strName.c_str(); if(!bCList) { diff --git a/plugins/MyDetails/src/frame.cpp b/plugins/MyDetails/src/frame.cpp index b7718e5048..29284ae3f9 100644 --- a/plugins/MyDetails/src/frame.cpp +++ b/plugins/MyDetails/src/frame.cpp @@ -542,8 +542,8 @@ HWND CreateTooltip(HWND hwnd, RECT &rect) ti.rect.bottom = rect.bottom; /* SEND AN ADDTOOL MESSAGE TO THE TOOLTIP CONTROL WINDOW */ - SendMessage(hwndTT, TTM_ADDTOOL, 0, (LPARAM)(LPTOOLINFO)&ti); - SendMessage(hwndTT, TTM_SETDELAYTIME, (WPARAM)(DWORD)TTDT_AUTOPOP, (LPARAM)MAKELONG(24 * 60 * 60 * 1000, 0)); + SendMessage(hwndTT, TTM_ADDTOOL, 0, (LPARAM)&ti); + SendMessage(hwndTT, TTM_SETDELAYTIME, TTDT_AUTOPOP, MAKELONG(24 * 60 * 60 * 1000, 0)); return hwndTT; } @@ -971,8 +971,8 @@ void CalcRectangles(HWND hwnd) else if (IsWindowVisible(hwnd)) { int flags = CallService(MS_CLIST_FRAMES_GETFRAMEOPTIONS, MAKEWPARAM(FO_FLAGS, frame_id), 0); if (flags & F_VISIBLE) { - CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS, MAKEWPARAM(FO_HEIGHT, frame_id), (LPARAM)(size)); - CallService(MS_CLIST_FRAMES_UPDATEFRAME, (WPARAM)frame_id, (LPARAM)(FU_TBREDRAW | FU_FMREDRAW | FU_FMPOS)); + CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS, MAKEWPARAM(FO_HEIGHT, frame_id), size); + CallService(MS_CLIST_FRAMES_UPDATEFRAME, (WPARAM)frame_id, FU_TBREDRAW | FU_FMREDRAW | FU_FMPOS); } } } diff --git a/plugins/NotesAndReminders/src/notes.cpp b/plugins/NotesAndReminders/src/notes.cpp index 9a250b56df..c01e247659 100644 --- a/plugins/NotesAndReminders/src/notes.cpp +++ b/plugins/NotesAndReminders/src/notes.cpp @@ -1463,7 +1463,7 @@ INT_PTR CALLBACK StickyNoteWndProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM l if (id >= IDM_COLORPRESET_BG && id <= IDM_COLORPRESET_BG+SIZEOF(clrPresets)) { SN->BgColor = clrPresets[id-IDM_COLORPRESET_BG].color | 0xff000000; - SendMessage(H, EM_SETBKGNDCOLOR, 0, (LPARAM)(SN->BgColor&0xffffff)); + SendMessage(H, EM_SETBKGNDCOLOR, 0, SN->BgColor & 0xffffff); RedrawWindow(SN->SNHwnd, NULL, NULL, RDW_INVALIDATE|RDW_FRAME|RDW_UPDATENOW); JustSaveNotes(); return FALSE; @@ -1502,7 +1502,7 @@ INT_PTR CALLBACK StickyNoteWndProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM l if (ChooseColor(&cc) && cc.rgbResult != orgclr) { SN->BgColor = cc.rgbResult | 0xff000000; - SendMessage(H, EM_SETBKGNDCOLOR, 0, (LPARAM)(SN->BgColor&0xffffff)); + SendMessage(H, EM_SETBKGNDCOLOR, 0, SN->BgColor&0xffffff); RedrawWindow(SN->SNHwnd, NULL, NULL, RDW_INVALIDATE|RDW_FRAME|RDW_UPDATENOW); JustSaveNotes(); } diff --git a/plugins/NotesAndReminders/src/reminders.cpp b/plugins/NotesAndReminders/src/reminders.cpp index 49a8530db7..719c25afec 100644 --- a/plugins/NotesAndReminders/src/reminders.cpp +++ b/plugins/NotesAndReminders/src/reminders.cpp @@ -1150,7 +1150,7 @@ static void PopulateTimeCombo(HWND Dialog, UINT nIDTime, BOOL bRelative, const S else mir_snprintf(s, SIZEOF(s), "%02d:%02d (%d.%d %s)", (UINT)tm2.wHour, (UINT)tm2.wMinute, dt/60, ((dt%60)*10)/60, lpszHours); n = SendDlgItemMessage(Dialog,nIDTime,CB_ADDSTRING,0,(LPARAM)s); - SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,n, (LPARAM)(dt*60)); + SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,n, dt*60); li.QuadPart += (ULONGLONG)30 * MinutesToFileTime; } @@ -1181,39 +1181,39 @@ static void PopulateTimeOffsetCombo(HWND Dialog, UINT nIDCombo) { mir_snprintf(s, SIZEOF(s), "%d %s", i*5, lpszMinutes); n = SendDlgItemMessage(Dialog,nIDCombo,CB_ADDSTRING,0,(LPARAM)s); - SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,n, (LPARAM)(i*5)); + SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,n, i*5); } // 1 hour mir_snprintf(s, SIZEOF(s), "1 %s", lpszHour); n = SendDlgItemMessage(Dialog,nIDCombo,CB_ADDSTRING,0,(LPARAM)s); - SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,n, (LPARAM)60); + SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA, n, 60); // 2, 4, 8 hours for (i = 2; i <= 8; i+=2) { mir_snprintf(s, SIZEOF(s), "%d %s", i, lpszHours); n = SendDlgItemMessage(Dialog,nIDCombo,CB_ADDSTRING,0,(LPARAM)s); - SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,n, (LPARAM)(i*60)); + SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA, n, i*60); } // 1 day mir_snprintf(s, SIZEOF(s), "1 %s", lpszDay); n = SendDlgItemMessage(Dialog,nIDCombo,CB_ADDSTRING,0,(LPARAM)s); - SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,n, (LPARAM)(24*60)); + SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA, n, 24*60); // 2-4 days for (i = 2; i <= 4; i++) { mir_snprintf(s, SIZEOF(s), "%d %s", i, lpszDays); n = SendDlgItemMessage(Dialog,nIDCombo,CB_ADDSTRING,0,(LPARAM)s); - SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,n, (LPARAM)(i*24*60)); + SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA, n, i*24*60); } // 1 week mir_snprintf(s, SIZEOF(s), "1 %s", lpszWeek); n = SendDlgItemMessage(Dialog,nIDCombo,CB_ADDSTRING,0,(LPARAM)s); - SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,n, (LPARAM)(7*24*60)); + SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA, n, 7*24*60); } // returns non-zero if specified time was inside "missing" hour of daylight saving diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp index 50a7f6f006..64d458b51b 100644 --- a/plugins/PasteIt/src/PasteIt.cpp +++ b/plugins/PasteIt/src/PasteIt.cpp @@ -164,7 +164,7 @@ void PasteIt(MCONTACT hContact, int mode) gce.dwFlags = GCEF_ADDTOLOG; gce.ptszText = mir_a2u_cp(pasteToWeb->szFileLink, CP_ACP); gce.time = time(NULL); - CallService(MS_GC_EVENT, 0, (LPARAM)(GCEVENT *)&gce); + CallService(MS_GC_EVENT, 0, (LPARAM)&gce); mir_free((void*)gce.ptszText); break; } diff --git a/plugins/Popup/src/common.h b/plugins/Popup/src/common.h index 819d9fabe0..df079a3c9d 100644 --- a/plugins/Popup/src/common.h +++ b/plugins/Popup/src/common.h @@ -82,13 +82,12 @@ inline INT_PTR DBGetContactSettingStringX(MCONTACT hContact, const char *ModuleN inline void AddTooltipTranslated(HWND hwndToolTip, HWND hwnd, int id, RECT rc, char *text) { - TOOLINFO ti = { 0 }; ti.cbSize = sizeof(TOOLINFO); ti.hwnd = hwnd; ti.uId = id; - SendMessage(hwndToolTip, TTM_DELTOOL, 0, (LPARAM)(LPTOOLINFO)&ti); + SendMessage(hwndToolTip, TTM_DELTOOL, 0, (LPARAM)&ti); LPTSTR wtext = mir_a2t(text); @@ -98,7 +97,7 @@ inline void AddTooltipTranslated(HWND hwndToolTip, HWND hwnd, int id, RECT rc, c ti.hinst = hInst; ti.lpszText = TranslateTS(wtext); ti.rect = rc; - SendMessage(hwndToolTip, TTM_ADDTOOL, 0, (LPARAM)(LPTOOLINFO)&ti); + SendMessage(hwndToolTip, TTM_ADDTOOL, 0, (LPARAM)&ti); mir_free(wtext); diff --git a/plugins/Popup/src/services.cpp b/plugins/Popup/src/services.cpp index c89388e586..1d54e21027 100644 --- a/plugins/Popup/src/services.cpp +++ b/plugins/Popup/src/services.cpp @@ -263,7 +263,7 @@ INT_PTR Popup_ShowMessageW(WPARAM wParam, LPARAM lParam) default: // No no no... you must give me a good value. return -1; } - return Popup_AddPopup2((WPARAM)&ppd2, (LPARAM)((lParam & 0x80000000) ? APF_NO_HISTORY : 0)); + return Popup_AddPopup2((WPARAM)&ppd2, (lParam & 0x80000000) ? APF_NO_HISTORY : 0); } INT_PTR Popup_ShowMessage(WPARAM wParam, LPARAM lParam) diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp index d67dd92a36..a0251e344c 100644 --- a/plugins/RecentContacts/src/RecentContacts.cpp +++ b/plugins/RecentContacts/src/RecentContacts.cpp @@ -303,7 +303,7 @@ INT_PTR CALLBACK ShowListMainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM pos.szModule = dbLastUC_ModuleName; pos.szNamePrefix = dbLastUC_WindowPosPrefix; - CallService(MS_UTILS_RESTOREWINDOWPOSITION, 0, (LPARAM)(SAVEWINDOWPOS*)&pos); + CallService(MS_UTILS_RESTOREWINDOWPOSITION, 0, (LPARAM)&pos); } SendMessage(hDlg, WM_SIZE, 0, 0); @@ -392,7 +392,7 @@ INT_PTR CALLBACK ShowListMainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM pos.hwnd = hDlg; pos.szModule = dbLastUC_ModuleName; pos.szNamePrefix = dbLastUC_WindowPosPrefix; - CallService(MS_UTILS_SAVEWINDOWPOSITION, 0, (LPARAM)(SAVEWINDOWPOS*)&pos); + CallService(MS_UTILS_SAVEWINDOWPOSITION, 0, (LPARAM)&pos); delete DlgDat->Contacts; delete DlgDat; // Remove entry from Window list diff --git a/plugins/Scriver/src/utils.cpp b/plugins/Scriver/src/utils.cpp index 6d7ae724fe..9b292f7a20 100644 --- a/plugins/Scriver/src/utils.cpp +++ b/plugins/Scriver/src/utils.cpp @@ -455,7 +455,7 @@ HWND CreateToolTip(HWND hwndParent, LPTSTR ptszText, LPTSTR ptszTitle, RECT* rec ti.hinst = g_hInst; ti.lpszText = ptszText; ti.rect = *rect; - SendMessage(hwndTT, TTM_ADDTOOL, 0, (LPARAM)(LPTOOLINFO)&ti); + SendMessage(hwndTT, TTM_ADDTOOL, 0, (LPARAM)&ti); SendMessage(hwndTT, TTM_SETTITLE, TTI_NONE, (LPARAM)ptszTitle); return hwndTT; } @@ -466,7 +466,7 @@ void SetToolTipText(HWND hwndParent, HWND hwndTT, LPTSTR ptszText, LPTSTR ptszTi ti.hinst = g_hInst; ti.hwnd = hwndParent; ti.lpszText = ptszText; - SendMessage(hwndTT, TTM_UPDATETIPTEXT, 0, (LPARAM)(LPTOOLINFO)&ti); + SendMessage(hwndTT, TTM_UPDATETIPTEXT, 0, (LPARAM)&ti); SendMessage(hwndTT, TTM_SETTITLE, TTI_NONE, (LPARAM)ptszTitle); } @@ -476,7 +476,7 @@ void SetToolTipRect(HWND hwndParent, HWND hwndTT, RECT* rect) ti.hinst = g_hInst; ti.hwnd = hwndParent; ti.rect = *rect; - SendMessage(hwndTT, TTM_NEWTOOLRECT, 0, (LPARAM)(LPTOOLINFO)&ti); + SendMessage(hwndTT, TTM_NEWTOOLRECT, 0, (LPARAM)&ti); } /* toolbar-related stuff, to be moved to a separate file */ diff --git a/plugins/SecureIM/src/options.cpp b/plugins/SecureIM/src/options.cpp index 157ac96f8d..cadba31b28 100644 --- a/plugins/SecureIM/src/options.cpp +++ b/plugins/SecureIM/src/options.cpp @@ -471,7 +471,7 @@ INT_PTR CALLBACK DlgProcOptionsGeneral(HWND hDlg, UINT wMsg, WPARAM wParam, LPAR case LVN_COLUMNCLICK: bChangeSortOrder = true; - ListView_Sort(hLV, (LPARAM)(LPNMLISTVIEW(lParam)->iSubItem + 0x01)); + ListView_Sort(hLV, LPNMLISTVIEW(lParam)->iSubItem + 0x01); bChangeSortOrder = false; } break; @@ -735,7 +735,7 @@ INT_PTR CALLBACK DlgProcOptionsPGP(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM l switch (((LPNMHDR)lParam)->code) { case LVN_COLUMNCLICK: bChangeSortOrder = true; - ListView_Sort(hLV, (LPARAM)(LPNMLISTVIEW(lParam)->iSubItem + 0x11)); + ListView_Sort(hLV, LPNMLISTVIEW(lParam)->iSubItem + 0x11); bChangeSortOrder = false; break; } @@ -858,7 +858,7 @@ INT_PTR CALLBACK DlgProcOptionsGPG(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM l case LVN_COLUMNCLICK: bChangeSortOrder = true; - ListView_Sort(hLV, (LPARAM)(LPNMLISTVIEW(lParam)->iSubItem + 0x21)); + ListView_Sort(hLV, LPNMLISTVIEW(lParam)->iSubItem + 0x21); bChangeSortOrder = false; } } diff --git a/plugins/SecureIM/src/svcs_proto.cpp b/plugins/SecureIM/src/svcs_proto.cpp index e1b9d45e13..13a3ee9445 100644 --- a/plugins/SecureIM/src/svcs_proto.cpp +++ b/plugins/SecureIM/src/svcs_proto.cpp @@ -234,7 +234,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam) CallService(MS_PROTO_CHAINSEND, wParam, lParam); // send back cipher message ptrA keyToSend(InitKeyA(ptr, 0)); // calculate public and private key - pccsd->lParam = (LPARAM)(char*)keyToSend; + pccsd->lParam = keyToSend; CallService(MS_PROTO_CHAINSEND, wParam, lParam); // send new key showPopup(sim005, NULL, g_hPOP[POP_PU_DIS], 0); @@ -394,7 +394,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam) Sent_NetLog("onRecvMsg: Sending KEYB %s", keyToSend); pccsd->wParam |= PREF_METANODB; - pccsd->lParam = (LPARAM)keyToSend; + pccsd->lParam = keyToSend; pccsd->szProtoService = PSS_MESSAGE; CallService(MS_PROTO_CHAINSEND, wParam, lParam); } @@ -450,7 +450,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam) // SendMsg handler INT_PTR __cdecl onSendMsg(WPARAM wParam, LPARAM lParam) { - CCSDATA *pccsd = (CCSDATA *)lParam; + CCSDATA *pccsd = (CCSDATA*)lParam; pUinKey ptr = getUinKey(pccsd->hContact); int ssig = getSecureSig((LPCSTR)pccsd->lParam); int stat = getContactStatus(pccsd->hContact); @@ -713,7 +713,7 @@ INT_PTR __cdecl onSendMsg(WPARAM wParam, LPARAM lParam) Sent_NetLog("onSend: encrypted msg '%s'", szNewMsg); pccsd->wParam |= PREF_METANODB; - pccsd->lParam = (LPARAM)(char*)szNewMsg; + pccsd->lParam = szNewMsg; pccsd->szProtoService = PSS_MESSAGE; int ret = CallService(MS_PROTO_CHAINSEND, wParam, lParam); diff --git a/plugins/Sessions/Src/Utils.cpp b/plugins/Sessions/Src/Utils.cpp index 87afd484ab..d0bb1134ea 100644 --- a/plugins/Sessions/Src/Utils.cpp +++ b/plugins/Sessions/Src/Utils.cpp @@ -302,11 +302,11 @@ int LoadSessionToCombobox(HWND hdlg, BOOL mode, int iLimit, char* pszSetting, in if (pszBuffer) { if (!IsMarkedUserDefSession(i + iFirstNum) || mode == 1) { index = SendDlgItemMessage(hdlg, IDC_LIST, CB_ADDSTRING, 0, (LPARAM)pszBuffer); - SendDlgItemMessage(hdlg, IDC_LIST, CB_SETITEMDATA, (WPARAM)index, (LPARAM)(i + iFirstNum)); + SendDlgItemMessage(hdlg, IDC_LIST, CB_SETITEMDATA, (WPARAM)index, i + iFirstNum); } else { SendDlgItemMessage(hdlg, IDC_LIST, CB_INSERTSTRING, 0, (LPARAM)pszBuffer); - SendDlgItemMessage(hdlg, IDC_LIST, CB_SETITEMDATA, 0, (LPARAM)(i + iFirstNum)); + SendDlgItemMessage(hdlg, IDC_LIST, CB_SETITEMDATA, 0, i + iFirstNum); } mir_free(pszBuffer); } diff --git a/plugins/ShellExt/src/shlcom.cpp b/plugins/ShellExt/src/shlcom.cpp index a4442d1460..498fc55d61 100644 --- a/plugins/ShellExt/src/shlcom.cpp +++ b/plugins/ShellExt/src/shlcom.cpp @@ -183,7 +183,7 @@ struct TSlotInfo int __cdecl SortContact(const void *Item1, const void *Item2) { - return CallService(MS_CLIST_CONTACTSCOMPARE, (WPARAM)((TSlotInfo*)Item1)->hContact, (LPARAM)((TSlotInfo*)Item2)->hContact); + return CallService(MS_CLIST_CONTACTSCOMPARE, ((TSlotInfo*)Item1)->hContact, ((TSlotInfo*)Item2)->hContact); } void ipcGetSkinIcons(THeaderIPC *ipch) diff --git a/plugins/SimpleStatusMsg/src/msgbox.cpp b/plugins/SimpleStatusMsg/src/msgbox.cpp index a601350247..87bac02d81 100644 --- a/plugins/SimpleStatusMsg/src/msgbox.cpp +++ b/plugins/SimpleStatusMsg/src/msgbox.cpp @@ -538,9 +538,9 @@ static LRESULT CALLBACK EditBoxSubProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L DWORD start, end; TCHAR *text; int textLen; - SendMessage(hwndDlg, EM_GETSEL, (WPARAM)&end, (LPARAM)(PDWORD)NULL); + SendMessage(hwndDlg, EM_GETSEL, (WPARAM)&end, NULL); SendMessage(hwndDlg, WM_KEYDOWN, VK_LEFT, 0); - SendMessage(hwndDlg, EM_GETSEL, (WPARAM)&start, (LPARAM)(PDWORD)NULL); + SendMessage(hwndDlg, EM_GETSEL, (WPARAM)&start, NULL); textLen = GetWindowTextLength(hwndDlg); text = (TCHAR *)mir_alloc(sizeof(TCHAR) * (textLen + 1)); GetWindowText(hwndDlg, text, textLen + 1); diff --git a/plugins/SimpleStatusMsg/src/options.cpp b/plugins/SimpleStatusMsg/src/options.cpp index deb034e440..99ca669461 100644 --- a/plugins/SimpleStatusMsg/src/options.cpp +++ b/plugins/SimpleStatusMsg/src/options.cpp @@ -63,9 +63,9 @@ static LRESULT CALLBACK OptEditBoxSubProc(HWND hwndDlg, UINT uMsg, WPARAM wParam DWORD start, end; TCHAR *text; int textLen; - SendMessage(hwndDlg, EM_GETSEL, (WPARAM)&end, (LPARAM)(PDWORD)NULL); + SendMessage(hwndDlg, EM_GETSEL, (WPARAM)&end, NULL); SendMessage(hwndDlg, WM_KEYDOWN, VK_LEFT, 0); - SendMessage(hwndDlg, EM_GETSEL, (WPARAM)&start, (LPARAM)(PDWORD)NULL); + SendMessage(hwndDlg, EM_GETSEL, (WPARAM)&start, NULL); textLen = GetWindowTextLength(hwndDlg); text = (TCHAR *)mir_alloc(sizeof(TCHAR) * (textLen + 1)); GetWindowText(hwndDlg, text, textLen + 1); diff --git a/plugins/SmileyAdd/src/smileys.cpp b/plugins/SmileyAdd/src/smileys.cpp index 70004c2454..559e0baa6a 100644 --- a/plugins/SmileyAdd/src/smileys.cpp +++ b/plugins/SmileyAdd/src/smileys.cpp @@ -474,7 +474,7 @@ bool SmileyPackType::LoadSmileyFileMSL(CMString& tbuf, bool onlyInfo, CMString& static const TCHAR errmsg[] = LPGENT("Smiley #%u in file %s for smiley pack %s not found."); TCHAR msgtxt[1024]; mir_sntprintf(msgtxt, SIZEOF(msgtxt), TranslateTS(errmsg), smnum, resname.c_str(), modpath.c_str()); - CallService(MS_NETLIB_LOG,(WPARAM) hNetlibUser, (LPARAM)(char*)T2A_SM(msgtxt)); + CallService(MS_NETLIB_LOG, (WPARAM)hNetlibUser, _T2A(msgtxt)); errorFound = true; } smnum++; @@ -1045,7 +1045,7 @@ SmileyLookup::SmileyLookup(const CMString& str, const bool regexs, const int ind } if (!m_valid) - CallService(MS_NETLIB_LOG, (WPARAM)hNetlibUser, (LPARAM)(char*)T2A_SM(msgtxt)); + CallService(MS_NETLIB_LOG, (WPARAM)hNetlibUser, _T2A(msgtxt)); } else { m_text = str; diff --git a/plugins/StatusChange/src/main.cpp b/plugins/StatusChange/src/main.cpp index 55d017c908..eab4b1bdf2 100644 --- a/plugins/StatusChange/src/main.cpp +++ b/plugins/StatusChange/src/main.cpp @@ -95,7 +95,7 @@ static int StatusChangeGetMessage(WPARAM wParam, LPARAM hDbEvent) if (((DWORD)(dbe.flags & ((DWORD)DBEF_SENT))) == ((DWORD)(DBEF_SENT))) { if (send) { // change status - CallProtoService(dbe.szModule, PS_SETSTATUS, (LPARAM)(Options.ChangeTo), 0); + CallProtoService(dbe.szModule, PS_SETSTATUS, (LPARAM)Options.ChangeTo, 0); } } @@ -103,7 +103,7 @@ static int StatusChangeGetMessage(WPARAM wParam, LPARAM hDbEvent) else { if (read) { // change status - CallProtoService(dbe.szModule, PS_SETSTATUS, (LPARAM)(Options.ChangeTo), 0); + CallProtoService(dbe.szModule, PS_SETSTATUS, (LPARAM)Options.ChangeTo, 0); } } diff --git a/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp b/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp index 761c3913f3..c96098bc38 100644 --- a/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp +++ b/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp @@ -231,7 +231,7 @@ static int changeState(TAAAProtoSetting &setting, STATES newState) log_debugA("%s state change: %s -> %s", setting.szName, status2descr(setting.oldState), status2descr(setting.curState)); - NotifyEventHooks(hStateChangedEvent, 0, (LPARAM)(AUTOAWAYSETTING*)&setting); + NotifyEventHooks(hStateChangedEvent, 0, (LPARAM)&setting); if (setting.curState != SET_ORGSTATUS && setting.curState != ACTIVE && setting.statusChanged) { /* change the awaymessage */ if (setting.szMsg != NULL) { diff --git a/plugins/TabSRMM/src/chat/options.cpp b/plugins/TabSRMM/src/chat/options.cpp index 5becbc5910..4c28234aa7 100644 --- a/plugins/TabSRMM/src/chat/options.cpp +++ b/plugins/TabSRMM/src/chat/options.cpp @@ -384,7 +384,7 @@ HWND CreateToolTip(HWND hwndParent, LPTSTR ptszText, LPTSTR ptszTitle) GetClientRect(hwndParent, &ti.rect); ti.rect.left = -65; - SendMessage(hwndTT, TTM_ADDTOOL, 0, (LPARAM)(LPTOOLINFO)&ti); + SendMessage(hwndTT, TTM_ADDTOOL, 0, (LPARAM)&ti); SendMessage(hwndTT, TTM_SETTITLE, 1, (LPARAM)ptszTitle); SendMessage(hwndTT, TTM_SETMAXTIPWIDTH, 0, (LPARAM)640); return hwndTT; diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index 7536ab5c76..9bd323e24e 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -146,7 +146,7 @@ void TSAPI DM_InitTip(TWindowData *dat) LRESULT TSAPI DM_GenericHotkeysCheck(MSG *message, TWindowData *dat) { - LRESULT mim_hotkey_check = CallService(MS_HOTKEY_CHECK, (WPARAM)message, (LPARAM)(TABSRMM_HK_SECTION_GENERIC)); + LRESULT mim_hotkey_check = CallService(MS_HOTKEY_CHECK, (WPARAM)message, (LPARAM)TABSRMM_HK_SECTION_GENERIC); HWND hwndDlg = dat->hwnd; switch (mim_hotkey_check) { diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 6472b31a61..a91e8b592d 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -1673,7 +1673,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP } if ((msg == WM_KEYDOWN || msg == WM_SYSKEYDOWN) && !(GetKeyState(VK_RMENU) & 0x8000)) { - LRESULT mim_hotkey_check = CallService(MS_HOTKEY_CHECK, (WPARAM)&message, (LPARAM)(TABSRMM_HK_SECTION_IM)); + LRESULT mim_hotkey_check = CallService(MS_HOTKEY_CHECK, (WPARAM)&message, (LPARAM)TABSRMM_HK_SECTION_IM); if (mim_hotkey_check) dat->fkeyProcessed = true; diff --git a/plugins/TipperYM/src/bitmap_func.cpp b/plugins/TipperYM/src/bitmap_func.cpp index d664f7420a..d6ac2631f2 100644 --- a/plugins/TipperYM/src/bitmap_func.cpp +++ b/plugins/TipperYM/src/bitmap_func.cpp @@ -154,7 +154,7 @@ void CreateFromBitmaps(bool bServiceTip) if (tszFileName && *tszFileName != 0) { FIBITMAP *fib = NULL; if (!skin.bCached) { - FIBITMAP *fibLoad = (FIBITMAP *)CallService(MS_IMG_LOAD, (WPARAM)tszFileName, (LPARAM)(IMGL_TCHAR | IMGL_RETURNDIB)); + FIBITMAP *fibLoad = (FIBITMAP *)CallService(MS_IMG_LOAD, (WPARAM)tszFileName, IMGL_TCHAR | IMGL_RETURNDIB); if (!fibLoad) continue; if (fii->FI_GetBPP(fibLoad) != 32) diff --git a/plugins/WinterSpeak/src/DialogConfigEngine.cpp b/plugins/WinterSpeak/src/DialogConfigEngine.cpp index 1350b4d90e..07a3018118 100644 --- a/plugins/WinterSpeak/src/DialogConfigEngine.cpp +++ b/plugins/WinterSpeak/src/DialogConfigEngine.cpp @@ -109,7 +109,7 @@ void DialogConfigEngine::load(HWND window) std::vector engines = si.getAvailableEngines(); for (unsigned int i = 0; i < engines.size(); ++i) { - SendDlgItemMessage(window, IDC_SELECT_ENGINE, CB_ADDSTRING, 0, (LPARAM)(engines[i].c_str())); + SendDlgItemMessage(window, IDC_SELECT_ENGINE, CB_ADDSTRING, 0, (LPARAM)engines[i].c_str()); } VoiceDesc desc = m_db.getVoiceDesc(); -- cgit v1.2.3