summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-24 12:47:23 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-24 12:47:23 +0000
commit04ea225a48f0fe836361882cb0f78e7b99ee582f (patch)
tree10c284c74489c884cb5888fa32259bde6b5c413a
parent9c8e399b431a9b0995efd24752a47efbe6e84ade (diff)
more useless conversions removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@8254 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--include/m_awaymsg.h2
-rw-r--r--include/m_clist.h24
-rw-r--r--include/m_clui.h14
-rw-r--r--include/m_database.h2
-rw-r--r--include/m_email.h2
-rw-r--r--include/m_file.h2
-rw-r--r--include/m_history.h2
-rw-r--r--include/m_hotkeys.h6
-rw-r--r--include/m_ignore.h6
-rw-r--r--include/m_message.h2
-rw-r--r--include/m_netlib.h2
-rw-r--r--include/m_protocols.h12
-rw-r--r--include/m_protomod.h4
-rw-r--r--include/m_protosvc.h26
-rw-r--r--include/m_url.h2
-rw-r--r--include/m_userinfo.h2
-rw-r--r--include/m_utils.h4
-rw-r--r--plugins/Alarms/src/alarm_win.cpp4
-rw-r--r--plugins/Alarms/src/frame.cpp10
-rw-r--r--plugins/AutoShutdown/src/frame.cpp2
-rw-r--r--plugins/BasicHistory/src/EventList.cpp4
-rw-r--r--plugins/BossKeyPlus/src/Options.cpp2
-rw-r--r--plugins/BuddyPounce/src/dialog.cpp4
-rw-r--r--plugins/Clist_blind/src/clistmenus.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clc.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clui.cpp6
-rw-r--r--plugins/Clist_nicer/src/Coolsb/coolsblib.cpp2
-rw-r--r--plugins/Clist_nicer/src/Coolsb/coolscroll.cpp2
-rw-r--r--plugins/Clist_nicer/src/clistevents.cpp2
-rw-r--r--plugins/Clist_nicer/src/clui.cpp2
-rw-r--r--plugins/ConnectionNotify/src/ConnectionNotify.cpp8
-rw-r--r--plugins/Console/src/Console.cpp6
-rw-r--r--plugins/ContactsPlus/src/main.cpp4
-rw-r--r--plugins/ContactsPlus/src/send.cpp6
-rw-r--r--plugins/DbEditorPP/src/copymodule.cpp2
-rw-r--r--plugins/DbEditorPP/src/exportimport.cpp2
-rw-r--r--plugins/DbEditorPP/src/moduletree.cpp4
-rw-r--r--plugins/Db_autobackups/src/options.cpp4
-rw-r--r--plugins/FTPFileYM/src/dialog.cpp2
-rw-r--r--plugins/FavContacts/src/main.cpp2
-rw-r--r--plugins/HTTPServer/src/GuiElements.cpp4
-rw-r--r--plugins/LotusNotify/src/LotusNotify.cpp6
-rw-r--r--plugins/MirOTR/MirOTR/src/mirotrmenu.cpp2
-rw-r--r--plugins/MirOTR/MirOTR/src/options.cpp2
-rwxr-xr-xplugins/Msg_Export/src/main.cpp2
-rwxr-xr-xplugins/Msg_Export/src/options.cpp2
-rw-r--r--plugins/NewAwaySysMod/src/AwayOpt.cpp6
-rw-r--r--plugins/NewAwaySysMod/src/ContactList.cpp6
-rw-r--r--plugins/NewAwaySysMod/src/SetAwayMsg.cpp2
-rwxr-xr-xplugins/New_GPG/src/main.cpp2
-rw-r--r--plugins/NewsAggregator/Src/Services.cpp2
-rw-r--r--plugins/Non-IM Contact/src/contactinfo.cpp4
-rw-r--r--plugins/Non-IM Contact/src/dialog.cpp6
-rw-r--r--plugins/NotesAndReminders/src/reminders.cpp2
-rw-r--r--plugins/Ping/src/options.cpp8
-rw-r--r--plugins/Ping/src/pingthread.cpp6
-rw-r--r--plugins/Popup/src/popup_wnd2.cpp2
-rw-r--r--plugins/QuickContacts/src/quickcontacts.cpp6
-rw-r--r--plugins/Quotes/src/QuoteInfoDlg.cpp2
-rw-r--r--plugins/Scriver/src/chat/window.cpp4
-rw-r--r--plugins/Scriver/src/msgoptions.cpp6
-rw-r--r--plugins/Scriver/src/msgs.cpp2
-rw-r--r--plugins/Scriver/src/msgwindow.cpp2
-rw-r--r--plugins/SecureIM/src/svcs_clist.cpp4
-rw-r--r--plugins/SeenPlugin/src/history.cpp4
-rw-r--r--plugins/SendScreenshotPlus/src/UAboutForm.cpp2
-rw-r--r--plugins/SendScreenshotPlus/src/UMainForm.cpp2
-rw-r--r--plugins/SimpleStatusMsg/src/awaymsg.cpp2
-rw-r--r--plugins/Spamotron/src/spamotron.cpp2
-rw-r--r--plugins/StatusPlugins/confirmdialog.cpp2
-rw-r--r--plugins/TabSRMM/src/contactcache.cpp2
-rw-r--r--plugins/TabSRMM/src/container.cpp4
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp10
-rw-r--r--plugins/TabSRMM/src/infopanel.cpp2
-rw-r--r--plugins/TabSRMM/src/mim.cpp2
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp4
-rw-r--r--plugins/TabSRMM/src/msgoptions.cpp4
-rw-r--r--plugins/TabSRMM/src/sendlater.cpp4
-rw-r--r--plugins/TabSRMM/src/sendqueue.cpp4
-rw-r--r--plugins/TabSRMM/src/userprefs.cpp4
-rw-r--r--plugins/TabSRMM/src/utils.cpp2
-rw-r--r--plugins/TrafficCounter/src/TrafficCounter.cpp2
-rw-r--r--plugins/Variables/src/help.cpp2
-rw-r--r--plugins/Weather/src/weather_userinfo.cpp2
-rw-r--r--plugins/WebView/src/webview_alerts.cpp2
-rw-r--r--plugins/WhenWasIt/src/dlg_handlers.cpp6
-rw-r--r--plugins/WhoUsesMyFiles/src/wumfplug.cpp4
-rw-r--r--plugins/XSoundNotify/src/options.cpp2
-rw-r--r--plugins/YAMN/src/browser/mailbrowser.cpp12
-rw-r--r--plugins/YAMN/src/proto/pop3/pop3opt.cpp34
-rw-r--r--plugins/YARelay/src/options.cpp16
-rw-r--r--plugins/wbOSD/src/options.cpp4
-rw-r--r--protocols/Gadu-Gadu/src/groupchat.cpp2
-rw-r--r--protocols/JabberG/src/jabber_chat.cpp2
-rw-r--r--protocols/JabberG/src/jabber_disco.cpp4
-rw-r--r--protocols/JabberG/src/jabber_proto.cpp4
-rw-r--r--protocols/JabberG/src/jabber_search.cpp4
-rw-r--r--protocols/JabberG/src/jabber_userinfo.cpp2
-rw-r--r--protocols/JabberG/src/jabber_util.cpp2
-rw-r--r--protocols/MSN/src/msn_commands.cpp2
-rw-r--r--protocols/Skype/src/skype_blocked.cpp26
-rw-r--r--protocols/VKontakte/src/vk_chats.cpp2
-rw-r--r--protocols/Xfire/src/all_statusmsg.cpp4
-rw-r--r--src/core/stdchat/src/window.cpp2
-rw-r--r--src/core/stdmsg/src/msgdialog.cpp2
-rw-r--r--src/modules/chat/clist.cpp2
-rw-r--r--src/modules/clist/clistmenus.cpp2
-rw-r--r--src/modules/clist/genmenu.cpp2
-rw-r--r--src/modules/protocols/protoint.cpp2
109 files changed, 239 insertions, 257 deletions
diff --git a/include/m_awaymsg.h b/include/m_awaymsg.h
index 83d5cbc9f0..78db3428c1 100644
--- a/include/m_awaymsg.h
+++ b/include/m_awaymsg.h
@@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define M_AWAYMSG_H__ 1
//show the away/na/etc message for a contact v0.1.0.1+
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = 0
//returns 0 on success or nonzero on failure
//returns immediately, without waiting for the message to retrieve
diff --git a/include/m_clist.h b/include/m_clist.h
index fcc0534d5c..20025b58dc 100644
--- a/include/m_clist.h
+++ b/include/m_clist.h
@@ -151,7 +151,7 @@ __forceinline HGENMENU Menu_AddMainMenuItem(CLISTMENUITEM *mi)
//add a new item to the user contact menus
//identical to clist/addmainmenuitem except when item is selected the service
-//gets called with wParam = (WPARAM)(HANDLE)hContact
+//gets called with wParam = (MCONTACT)hContact
//pszContactOwner is obeyed.
//popup menus are not supported. pszPopupName and popupPosition are ignored.
//If ctrl is held down when right clicking, the menu position numbers will be
@@ -201,7 +201,7 @@ __forceinline void Menu_ShowItem(HGENMENU hMenuItem, BOOL bShow)
}
//the context menu for a contact is about to be built v0.1.0.1+
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = 0
//modules should use this to change menu items that are specific to the
//contact that has them
@@ -243,7 +243,7 @@ sense to store all this information in memory, etc.
*/
#define ME_CLIST_DOUBLECLICKED "CList/DoubleClicked"
//gets the string that the contact list will use to represent a contact
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = flags
//returns a pointer to the name, will always succeed, even if it needs to
//return "(Unknown Contact)"
@@ -265,7 +265,7 @@ sense to store all this information in memory, etc.
#define MS_CLIST_GETCONTACTDISPLAYNAME "CList/GetContactDisplayName"
// Invalidates the display name cache
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = not used
#define MS_CLIST_INVALIDATEDISPLAYNAME "CList/InvalidateDiplayName"
@@ -318,14 +318,14 @@ typedef struct {
#define MS_CLIST_ADDEVENT "CList/AddEvent"
//removes an event from the contact list's queue
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = (LPARAM)(HANDLE)hDbEvent
//returns 0 if the event was successfully removed, or nonzero if the event
//was not found
#define MS_CLIST_REMOVEEVENT "Clist/RemoveEvent"
//gets the details of an event in the queue v0.1.2.1+
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = iEvent
//returns a CLISTEVENT* on success, NULL on failure
//Returns the iEvent-th event from the queue for hContact, so iEvent = 0 will
@@ -347,7 +347,7 @@ typedef struct {
#define MS_CLIST_MENUDRAWITEM "CList/MenuDrawItem"
//builds the context menu for a specific contact v0.1.1.0+
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = 0
//returns a HMENU identifying the menu. This should be DestroyMenu()ed when
//finished with.
@@ -363,7 +363,7 @@ typedef struct {
#define IMAGE_GROUPSHUT 12
//get the icon that should be associated with a contact v0.1.2.0+
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = 0
//returns an index into the contact list imagelist. See clist/geticonsimagelist
//If the contact is flashing an icon, this function will not return that
@@ -371,7 +371,7 @@ typedef struct {
#define MS_CLIST_GETCONTACTICON "CList/GetContactIcon"
//The icon of a contact in the contact list has changed v0.1.2.0+
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = iconId
//iconId is an offset into the clist's imagelist. See clist/geticonsimagelist
#define ME_CLIST_CONTACTICONCHANGED "CList/ContactIconChanged"
@@ -570,20 +570,20 @@ __forceinline HANDLE Clist_CreateGroup(HANDLE hParent, LPCTSTR ptszGroupName)
#define MS_CLIST_SETHIDEOFFLINE "CList/SetHideOffline"
//do the message processing associated with double clicking a contact v0.1.1.0+
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = 0
//returns 0 on success, nonzero on failure
#define MS_CLIST_CONTACTDOUBLECLICKED "CList/ContactDoubleClicked"
//do the processing for when some files are dropped on a contact v0.1.2.1+
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = (LPARAM)(char**)ppFiles
//returns 0 on success, nonzero on failure
//ppFiles is an array of fully qualified filenames, ending with a NULL.
#define MS_CLIST_CONTACTFILESDROPPED "CList/ContactFilesDropped"
//change the group a contact belongs to v0.1.1.0+
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = (LPARAM)(HANDLE)hGroup
//returns 0 on success, nonzero on failure
//use hGroup = NULL to put the contact in no group
diff --git a/include/m_clui.h b/include/m_clui.h
index 07d9f9b5d8..18e4a33823 100644
--- a/include/m_clui.h
+++ b/include/m_clui.h
@@ -50,14 +50,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define MS_CLUI_GROUPADDED "CLUI/GroupCreated"
//change the icon for a contact
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = iconid
//returns 0 on sucess, nonzero on failure
//iconid is an offset in the image list. see clist/geticonsimagelist
#define MS_CLUI_CONTACTSETICON "CLUI/ContactSetIcon"
//remove a contact from the list
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = 0
//returns 0 on success, nonzero on failure
//this is not necessarily the same as a contact being actually deleted, since
@@ -65,7 +65,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define MS_CLUI_CONTACTDELETED "CLUI/ContactDeleted"
//add a contact to the list
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = iconId
//returns 0 on success, nonzero on failure
//The caller processes the 'hide offline' setting, so the callee should not do
@@ -83,7 +83,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define MS_CLUI_CONTACTADDED "CLUI/ContactAdded"
//rename a contact in the list
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = 0
//returns 0 on success, nonzero on failure
//you should not re-sort the list on this call. A separate resort request will
@@ -135,20 +135,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define MS_CLUI_GETCAPS "CLUI/GetCaps"
//a contact is being dragged outside the main window v0.1.2.0+
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = MAKELPARAM(screenX, screenY)
//return nonzero to make the cursor a 'can drop here', or zero for 'no'
#define ME_CLUI_CONTACTDRAGGING "CLUI/ContactDragging"
//a contact has just been dropped outside the main window v0.1.2.0+
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = MAKELPARAM(screenX, screenY)
//return nonzero if your hook processed this, so no other hooks get it
#define ME_CLUI_CONTACTDROPPED "CLUI/ContactDropped"
//a contact that was being dragged outside the main window has gone back in to
//the main window. v0.1.2.1+
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = 0
//return zero
#define ME_CLUI_CONTACTDRAGSTOP "CLUI/ContactDragStop"
diff --git a/include/m_database.h b/include/m_database.h
index 7f9d4a921d..4e30e42885 100644
--- a/include/m_database.h
+++ b/include/m_database.h
@@ -262,7 +262,7 @@ __forceinline MCONTACT DbGetAuthEventContact(DBEVENTINFO* dbei)
/* DB/Event/GetText (0.7.0+)
Retrieves the event's text
- wParam = (WPARAM)0 (unused)
+ wParam = 0 (unused)
lParam = (LPARAM)(DBEVENTGETTEXT*)egt - pointer to structure with parameters
egt->dbei should be the valid database event read via db_event_get()
egt->datatype = DBVT_WCHAR or DBVT_ASCIIZ or DBVT_TCHAR.
diff --git a/include/m_email.h b/include/m_email.h
index ecbf27cb0c..7eae65a7f2 100644
--- a/include/m_email.h
+++ b/include/m_email.h
@@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define M_EMAIL_H__ 1
//send an e-mail to the specified contact v0.1.0.1+
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = 0
//returns 0 on success or nonzero on failure
//if an error occurs the service will display a message box with the error
diff --git a/include/m_file.h b/include/m_file.h
index ccb39cd66d..0eaf62832b 100644
--- a/include/m_file.h
+++ b/include/m_file.h
@@ -34,7 +34,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// brings up the send file dialog with the specified files already chosen
// returns immediately, without waiting for the send
-// wParam = (WPARAM)(HANDLE)hContact
+// wParam = (MCONTACT)hContact
// lParam = (LPARAM)(const char**)ppFiles
// returns file selection dialog's handle or 0 on error
// returns immediately, without waiting for the send
diff --git a/include/m_history.h b/include/m_history.h
index a0c61f4fb4..7b95237f6a 100644
--- a/include/m_history.h
+++ b/include/m_history.h
@@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define M_HISTORY_H__ 1
//show the History dialog box for a contact
-// wParam = (WPARAM)(HANDLE)hContact
+// wParam = (MCONTACT)hContact
// lParam = 0
//hContact can be NULL to show system messages
#define MS_HISTORY_SHOWCONTACTHISTORY "History/ShowContactHistory"
diff --git a/include/m_hotkeys.h b/include/m_hotkeys.h
index effe9df65b..63843b47bd 100644
--- a/include/m_hotkeys.h
+++ b/include/m_hotkeys.h
@@ -62,7 +62,7 @@ extern int hLangpack;
/* CoreHotkeys/Register service
Registers new hotkey
- wParam = (WPARAM)0
+ wParam = 0
lParam = (LPARAM)(HOTKEYDESC *)hotkey
Returns 0 on failure or hotkey atom id on success
*/
@@ -74,7 +74,7 @@ __forceinline INT_PTR Hotkey_Register(HOTKEYDESC *hk)
/* CoreHotkeys/Unregister service
Unregister existing hotkey
- wParam = (WPARAM)0
+ wParam = 0
lParam = (LPARAM)(char *)pszName
Returns 0 on success or nonzero otherwise
*/
@@ -90,7 +90,7 @@ Returns lParam associated with activated hotkey
/* Subclass/unsubclass edit box to act as hotkey control
wParam = (WPARAM)(HWND)hwndEdit
- lParam = (LPARAM)0
+ lParam = 0
Returns zero on success
You will get notification with LOWORD(wParam) == 0 when users sets hotkey.
diff --git a/include/m_ignore.h b/include/m_ignore.h
index 0c1789a543..b40b9c2290 100644
--- a/include/m_ignore.h
+++ b/include/m_ignore.h
@@ -38,7 +38,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define IGNOREEVENT_TYPINGNOTIFY 7 // 0.7+
//determines if a message type to a contact should be ignored v0.1.0.1+
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = message type, an ignoreevent_ constant
//returns 0 if the message should be shown, or nonzero if it should be ignored
//Use hContact = NULL to retrieve the setting for unknown contacts (not on the
@@ -47,14 +47,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define MS_IGNORE_ISIGNORED "Ignore/IsIgnored"
//ignore future messages from a contact v0.1.0.1+
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = message type, an ignoreevent_ constant
//returns 0 on success or nonzero on failure
//Use hContact = NULL to retrieve the setting for unknown contacts
#define MS_IGNORE_IGNORE "Ignore/Ignore"
//receive future messages from a contact v0.1.0.1+
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = message type, an ignoreevent_ constant
//returns 0 on success or nonzero on failure
//Use hContact = NULL to retrieve the setting for unknown contacts
diff --git a/include/m_message.h b/include/m_message.h
index f5ba26ea07..71ff3f4749 100644
--- a/include/m_message.h
+++ b/include/m_message.h
@@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
extern int hLangpack;
//brings up the send message dialog for a contact
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = (LPARAM)(char*)szText
//returns 0 on success or nonzero on failure
//returns immediately, just after the dialog is shown
diff --git a/include/m_netlib.h b/include/m_netlib.h
index 44d9a55b37..62b3e5c536 100644
--- a/include/m_netlib.h
+++ b/include/m_netlib.h
@@ -622,7 +622,7 @@ typedef struct {
//Shutdown connection
//wParam = (WPARAM)(HANDLE)hConnection
-//lParam = (LPARAM)0
+//lParam = 0
//Returns 0
#define MS_NETLIB_SHUTDOWN "Netlib/Shutdown"
__forceinline void Netlib_Shutdown(HANDLE h) {CallService(MS_NETLIB_SHUTDOWN, (WPARAM)h, 0);}
diff --git a/include/m_protocols.h b/include/m_protocols.h
index 52e6107e08..b29fd4583d 100644
--- a/include/m_protocols.h
+++ b/include/m_protocols.h
@@ -224,7 +224,7 @@ typedef struct {
#define MS_PROTO_ISPROTOCOLLOADED "Proto/IsProtocolLoaded"
//gets the network-level protocol associated with a contact
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = 0
//Returns a char* pointing to the asciiz name of the protocol or NULL if the
//contact has no protocol. There is no need to free() it or anything.
@@ -237,7 +237,7 @@ __forceinline char* GetContactProto(MCONTACT hContact)
}
//determines whether the specified contact has the given protocol in its chain
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = (LPARAM)(const char*)szName
//Returns -1 if it is base protocol, positive number if it is filter and 0 if it doesn't
#define MS_PROTO_ISPROTOONCONTACT "Proto/IsProtoOnContact"
@@ -247,7 +247,7 @@ __forceinline char* GetContactProto(MCONTACT hContact)
//This service is for notifying protocols that the user is typing a message v0.3.3+
//in a message dialog.
//This is typically sent by a message dialog when a user in the clist is typing.
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = (LPARAM)(int)typing state
//NOTE: Only protocols should generally call this service
#define MS_PROTO_SELFISTYPING "Proto/SelfIsTyping"
@@ -256,7 +256,7 @@ __forceinline char* GetContactProto(MCONTACT hContact)
#define PROTOTYPE_CONTACTTYPING_INFINITE 2147483647
//This service is for notifying message dialogs/other plugins of a user typing. v0.3.3+
//This is typically sent by a protocol when a user in the clist is typing.
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = (LPARAM)(int)time (secs)
//NOTE: The time in seconds is used to tell a message dialog (or other plugin)
//how long to display its notification. If time is 0, then notification
@@ -269,7 +269,7 @@ __forceinline char* GetContactProto(MCONTACT hContact)
//ProtoService PSS_USERISTYPING to the contacts protocol *after* verifying
//that the hContact is not NULL and the the user wishes to send notifications
//to this user (checked visibility, individual typing blocking, etc).
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = (LPARAM)(int)typing state
#define ME_PROTO_CONTACTISTYPING "Proto/ContactIsTypingEvent"
@@ -349,7 +349,7 @@ __forceinline int IsAccountEnabled(const PROTOACCOUNT* pa)
//gets the account associated with a contact
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = 0
//Returns a char* pointing to the asciiz name of the protocol or NULL if the
//contact has no protocol. There is no need to mir_free() it or anything.
diff --git a/include/m_protomod.h b/include/m_protomod.h
index fdd07122c6..6b3a485ed8 100644
--- a/include/m_protomod.h
+++ b/include/m_protomod.h
@@ -48,7 +48,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define MS_PROTO_REGISTERMODULE "Proto/RegisterModule"
//adds the specified protocol module to the chain for a contact
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = (LPARAM)(const char*)szName
//returns 0 on success, nonzero on failure
//The module is added in the correct position according to the type given when
@@ -56,7 +56,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define MS_PROTO_ADDTOCONTACT "Proto/AddToContact"
//removes the specified protocol module from the chain for a contact
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = (LPARAM)(const char*)szName
//returns 0 on success, nonzero on failure
#define MS_PROTO_REMOVEFROMCONTACT "Proto/RemoveFromContact"
diff --git a/include/m_protosvc.h b/include/m_protosvc.h
index d083caf1ec..1a5dd3d817 100644
--- a/include/m_protosvc.h
+++ b/include/m_protosvc.h
@@ -450,19 +450,19 @@ typedef struct {
#define PS_FILERESUMEW "/FileResumeW"
//Asks a protocol to join the chatroom from contact v0.8.0+
-//wParam = (WPARAM)(HANDLE)hContact
-//lParam = (LPARAM)0
+//wParam = (MCONTACT)hContact
+//lParam = 0
//Returns 0 on success, nonzero on failure
#define PS_JOINCHAT "/JoinChat"
//Asks a protocol to leave the chatroom from contact v0.8.0+
-//wParam = (WPARAM)(HANDLE)hContact
-//lParam = (LPARAM)0
+//wParam = (MCONTACT)hContact
+//lParam = 0
//Returns 0 on success, nonzero on failure
#define PS_LEAVECHAT "/LeaveChat"
//Asks a protocol to read contact information and translate them (for a lookup fields) v0.8.0+
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = (LPARAM)(DBCONTACTGETSETTING*)&dbcgs
//The flag PF4_INFOSETTINGSVC indicates that a protocol supports this. Basically it should
//do the same as MS_DB_CONTACT_GETSETTING_STR, except that for a lookup settings (e.g. Language)
@@ -506,8 +506,8 @@ typedef struct {
// Get the max allowed length for the user nickname
// Optional, default value is 1024
-// wParam = (WPARAM)0
-// lParam = (LPARAM)0
+// wParam = 0
+// lParam = 0
// return = <= 0 for error, >0 the max length of the nick
#define PS_GETMYNICKNAMEMAXLENGTH "/GetMyNicknameMaxLength"
@@ -521,7 +521,7 @@ typedef struct {
// Get the WAYD message for the user
// wParam = (WPARAM)WAYD_xxx
-// lParam = (LPARAM)0
+// lParam = 0
// Returns the text or NULL if there is none. Remember to mir_free the return value.
#define PS_GETMYWAYD "/GetMyWAYD"
@@ -533,14 +533,14 @@ typedef struct {
// Get the max allowed length that a WAYD message can have
// Optional, default value is 1024
-// wParam = (WPARAM)0
-// lParam = (LPARAM)0
+// wParam = 0
+// lParam = 0
// Returns the max length
#define PS_GETMYWAYDMAXLENGTH "/GetMyWAYDMaxLength"
// Get the unread email message count, optional
-// wParam = (WPARAM)0
-// lParam = (LPARAM)0
+// wParam = 0
+// lParam = 0
// Returns the number of unread emails
#define PS_GETUNREADEMAILCOUNT "/GetUnreadEmailCount"
@@ -666,7 +666,7 @@ typedef struct {
#define PSS_AUTHREQUESTW "/AuthRequestW"
// Send "User is Typing" (user is typing a message to the user) v0.3.3+
-// wParam = (WPARAM)(HANDLE)hContact
+// wParam = (MCONTACT)hContact
// lParam = (LPARAM)(int)typing type - see PROTOTYPE_SELFTYPING_X defines in m_protocols.h
#define PSS_USERISTYPING "/UserIsTyping"
diff --git a/include/m_url.h b/include/m_url.h
index ec39566b31..33bbaaed83 100644
--- a/include/m_url.h
+++ b/include/m_url.h
@@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define M_URL_H__ 1
//bring up the send URL dialog for a user
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = 0
//returns 0 on success or nonzero on failure
//returns immediately, before the url is sent
diff --git a/include/m_userinfo.h b/include/m_userinfo.h
index 1e865480d8..48612ffd13 100644
--- a/include/m_userinfo.h
+++ b/include/m_userinfo.h
@@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "m_options.h"
//show the User Details dialog box
-//wParam = (WPARAM)(HANDLE)hContact
+//wParam = (MCONTACT)hContact
//lParam = 0
#define MS_USERINFO_SHOWDIALOG "UserInfo/ShowDialog"
diff --git a/include/m_utils.h b/include/m_utils.h
index eeaa419094..b6490a447c 100644
--- a/include/m_utils.h
+++ b/include/m_utils.h
@@ -180,11 +180,11 @@ __forceinline INT_PTR WindowList_Remove(HANDLE hList, HWND hwnd) {
// finds a window given the hContact
// wParam = (WPARAM)(HANDLE)hList
-// lParam = (WPARAM)(HANDLE)hContact
+// lParam = (MCONTACT)hContact
// returns the window handle on success, or NULL on failure
#define MS_UTILS_FINDWINDOWINLIST "Utils/FindWindowInList"
__forceinline HWND WindowList_Find(HANDLE hList, MCONTACT hContact) {
- return (HWND)CallService(MS_UTILS_FINDWINDOWINLIST, (WPARAM)hList, (LPARAM)hContact);
+ return (HWND)CallService(MS_UTILS_FINDWINDOWINLIST, (WPARAM)hList, hContact);
}
// sends a message to all windows in a list using SendMessage
diff --git a/plugins/Alarms/src/alarm_win.cpp b/plugins/Alarms/src/alarm_win.cpp
index 301d5aa408..3fb2b2de43 100644
--- a/plugins/Alarms/src/alarm_win.cpp
+++ b/plugins/Alarms/src/alarm_win.cpp
@@ -90,9 +90,9 @@ INT_PTR CALLBACK DlgProcAlarm(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
case WMU_SETFONTS:
// fonts
if (hWindowFont)
- SendMessage(hwndDlg, WM_SETFONT, (WPARAM)hWindowFont, (LPARAM)TRUE);
+ SendMessage(hwndDlg, WM_SETFONT, (WPARAM)hWindowFont, TRUE);
if (hTitleFont)
- SendDlgItemMessage(hwndDlg, IDC_TITLE, WM_SETFONT, (WPARAM)hTitleFont, (LPARAM)TRUE);
+ SendDlgItemMessage(hwndDlg, IDC_TITLE, WM_SETFONT, (WPARAM)hTitleFont, TRUE);
if (hBackgroundBrush) {
SetClassLong(hwndDlg, GCLP_HBRBACKGROUND, (LONG)hBackgroundBrush);
diff --git a/plugins/Alarms/src/frame.cpp b/plugins/Alarms/src/frame.cpp
index 69541fdc21..80501b8619 100644
--- a/plugins/Alarms/src/frame.cpp
+++ b/plugins/Alarms/src/frame.cpp
@@ -295,7 +295,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
int sel = SendMessage(hwnd_list, LB_GETCURSEL, 0, 0),
top = SendMessage(hwnd_list, LB_GETTOPINDEX, 0, 0);
- SendMessage(hwnd_list, WM_SETREDRAW, (WPARAM)FALSE, 0);
+ SendMessage(hwnd_list, WM_SETREDRAW, FALSE, 0);
EnterCriticalSection(&list_cs);
SendMessage(hwnd_list, LB_RESETCONTENT, 0, 0);
@@ -311,7 +311,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
LeaveCriticalSection(&list_cs);
SendMessage(hwnd, WMU_SIZE_LIST, 0, 0);
- SendMessage(hwnd_list, WM_SETREDRAW, (WPARAM)TRUE, 0);
+ SendMessage(hwnd_list, WM_SETREDRAW, TRUE, 0);
if (sel != LB_ERR && sel < index) SendMessage(hwnd_list, LB_SETCURSEL, (WPARAM)sel, 0);
if (top != LB_ERR && top < index) SendMessage(hwnd_list, LB_SETTOPINDEX, (WPARAM)top, 0);
@@ -442,7 +442,7 @@ int ReloadFont(WPARAM wParam, LPARAM lParam)
LOGFONT log_font;
fontColour = CallService(MS_FONT_GET, (WPARAM)&font_id, (LPARAM)&log_font);
hFont = CreateFontIndirect(&log_font);
- SendMessage(hwnd_list, WM_SETFONT, (WPARAM)hFont, (LPARAM)TRUE);
+ SendMessage(hwnd_list, WM_SETFONT, (WPARAM)hFont, TRUE);
DeleteObject(bk_brush);
bk_brush = CreateSolidBrush(db_get_dw(0, "Alarm", "clFrameBack", GetSysColor(COLOR_3DFACE)));
@@ -606,14 +606,14 @@ int CreateFrame()
LOGFONT log_font;
fontColour = CallService(MS_FONT_GET, (WPARAM)&font_id, (LPARAM)&log_font);
hFont = CreateFontIndirect(&log_font);
- SendMessage(hwnd_list, WM_SETFONT, (WPARAM)hFont, (LPARAM)TRUE);
+ SendMessage(hwnd_list, WM_SETFONT, (WPARAM)hFont, TRUE);
HookEvent(ME_FONT_RELOAD, ReloadFont);
// create the brush used for the background in the absence of clist_modern skinning features - match clist
bk_brush = CreateSolidBrush(db_get_dw(0, "Alarm", "clFrameBack", GetSysColor(COLOR_3DFACE)));
- SendMessage(hwnd_list, WM_SETFONT, (WPARAM)hFont, (LPARAM)TRUE);
+ SendMessage(hwnd_list, WM_SETFONT, (WPARAM)hFont, TRUE);
return 0;
}
diff --git a/plugins/AutoShutdown/src/frame.cpp b/plugins/AutoShutdown/src/frame.cpp
index 9c0e8ff9fd..e5626a2418 100644
--- a/plugins/AutoShutdown/src/frame.cpp
+++ b/plugins/AutoShutdown/src/frame.cpp
@@ -152,7 +152,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwndFrame,UINT msg,WPARAM wParam,LPARA
params->hInstance,
NULL);
if (dat->hwndProgress==NULL) return -1; /* creation failed, calls WM_DESTROY */
- SendMessage(dat->hwndProgress,PBM_SETSTEP,(WPARAM)1,0);
+ SendMessage(dat->hwndProgress,PBM_SETSTEP,1,0);
mir_subclassWindow(dat->hwndProgress, ProgressBarSubclassProc);
dat->hwndDesc=CreateWindowEx(WS_EX_NOPARENTNOTIFY,
_T("Static"),
diff --git a/plugins/BasicHistory/src/EventList.cpp b/plugins/BasicHistory/src/EventList.cpp
index 64d37517cb..6335a11e07 100644
--- a/plugins/BasicHistory/src/EventList.cpp
+++ b/plugins/BasicHistory/src/EventList.cpp
@@ -548,7 +548,7 @@ void EventList::MargeMessages(const std::vector<IImport::ExternalMessage>& messa
DBEVENTINFO dbei = { sizeof(dbei) };
dbei.szModule = GetContactProto(hContact);
- CallService(MS_DB_SETSAFETYMODE, (WPARAM)FALSE, 0);
+ CallService(MS_DB_SETSAFETYMODE, FALSE, 0);
for (std::list<EventTempIndex>::iterator it = tempList.begin(); it != tempList.end(); ++it) {
if (it->isExternal) {
IImport::ExternalMessage& msg = importedMessages[it->exIdx];
@@ -567,7 +567,7 @@ void EventList::MargeMessages(const std::vector<IImport::ExternalMessage>& messa
}
}
- CallService(MS_DB_SETSAFETYMODE, (WPARAM)TRUE, 0);
+ CallService(MS_DB_SETSAFETYMODE, TRUE, 0);
std::vector<IImport::ExternalMessage> emessages;
ImportMessages(emessages);
}
diff --git a/plugins/BossKeyPlus/src/Options.cpp b/plugins/BossKeyPlus/src/Options.cpp
index e19d31454b..cbda2e1dd5 100644
--- a/plugins/BossKeyPlus/src/Options.cpp
+++ b/plugins/BossKeyPlus/src/Options.cpp
@@ -224,7 +224,7 @@ INT_PTR CALLBACK AdvOptDlg(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam)
TCHAR szMinutes[4] = {0};
_itot(minutes, szMinutes, 10);
SendDlgItemMessage(hwndDlg,IDC_MAINOPT_TIME,EM_LIMITTEXT,2,0);
- SendDlgItemMessage(hwndDlg, IDC_MAINOPT_SPIN_TIME, UDM_SETRANGE32, (WPARAM)1, (LPARAM)99);
+ SendDlgItemMessage(hwndDlg, IDC_MAINOPT_SPIN_TIME, UDM_SETRANGE32, 1, (LPARAM)99);
SetDlgItemText(hwndDlg, IDC_MAINOPT_TIME, szMinutes);
CheckDlgButton(hwndDlg,IDC_MAINOPT_HIDEIFLOCK,(g_wMaskAdv & OPT_HIDEIFLOCK) ? (BST_CHECKED) : (BST_UNCHECKED));
CheckDlgButton(hwndDlg,IDC_MAINOPT_MENUITEM,(g_wMaskAdv & OPT_MENUITEM) ? (BST_CHECKED) : (BST_UNCHECKED));
diff --git a/plugins/BuddyPounce/src/dialog.cpp b/plugins/BuddyPounce/src/dialog.cpp
index fee3cd0523..429ff3f13c 100644
--- a/plugins/BuddyPounce/src/dialog.cpp
+++ b/plugins/BuddyPounce/src/dialog.cpp
@@ -18,7 +18,7 @@ void populateContacts(MCONTACT BPhContact, HWND hwnd2CB)
TCHAR name[300];
mir_sntprintf(name, SIZEOF(name), _T("%s (%s)"), CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR), _A2T(szProto));
int index = SendMessage(hwnd2CB, CB_ADDSTRING, 0, (LPARAM)name);
- SendMessage(hwnd2CB, CB_SETITEMDATA, index, (LPARAM)hContact);
+ SendMessage(hwnd2CB, CB_SETITEMDATA, index, hContact);
if (BPhContact == hContact)
SendMessage(hwnd2CB, CB_SETCURSEL, index, 0);
}
@@ -610,7 +610,7 @@ INT_PTR CALLBACK PounceSentDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
void CreateMessageAcknowlegedWindow(MCONTACT hContact, int SentSuccess)
{
- HWND hwnd = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_CONFIRMSEND), 0, PounceSentDlgProc, (LPARAM)hContact);
+ HWND hwnd = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_CONFIRMSEND), 0, PounceSentDlgProc, hContact);
TCHAR msg[256];
if (SentSuccess) {
mir_sntprintf(msg, SIZEOF(msg), TranslateT("Message successfully sent to %s"), CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR));
diff --git a/plugins/Clist_blind/src/clistmenus.cpp b/plugins/Clist_blind/src/clistmenus.cpp
index bb5495bfd8..76e8d86bc8 100644
--- a/plugins/Clist_blind/src/clistmenus.cpp
+++ b/plugins/Clist_blind/src/clistmenus.cpp
@@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
INT_PTR CloseAction(WPARAM wParam,LPARAM lParam)
{
- if (CallService(MS_SYSTEM_OKTOEXIT,(WPARAM)0,(LPARAM)0))
+ if (CallService(MS_SYSTEM_OKTOEXIT,0,0))
DestroyWindow(pcli->hwndContactList);
return(0);
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp
index 94553b3c8a..091741963a 100644
--- a/plugins/Clist_modern/src/modern_clc.cpp
+++ b/plugins/Clist_modern/src/modern_clc.cpp
@@ -84,7 +84,7 @@ static int clcHookModulesLoaded(WPARAM wParam, LPARAM lParam)
FoldersGetCustomPathT(hSkinFolder, SkinsFolder, SIZEOF(SkinsFolder), _T(DEFAULT_SKIN_FOLDER));
if ( ServiceExists(MS_MC_DISABLEHIDDENGROUP))
- CallService(MS_MC_DISABLEHIDDENGROUP, (WPARAM)TRUE, 0);
+ CallService(MS_MC_DISABLEHIDDENGROUP, TRUE, 0);
if ( ServiceExists(MS_MC_GETPROTOCOLNAME))
g_szMetaModuleName = (char *)CallService(MS_MC_GETPROTOCOLNAME, 0, 0);
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp
index 23c823c238..af33864e6f 100644
--- a/plugins/Clist_modern/src/modern_clui.cpp
+++ b/plugins/Clist_modern/src/modern_clui.cpp
@@ -150,7 +150,7 @@ int CLUI::OnEvent_ModulesLoaded(WPARAM wParam, LPARAM lParam)
setlocale(LC_ALL, ""); //fix for case insensitive comparing
if ( ServiceExists(MS_MC_DISABLEHIDDENGROUP))
- CallService(MS_MC_DISABLEHIDDENGROUP, (WPARAM)TRUE, 0);
+ CallService(MS_MC_DISABLEHIDDENGROUP, TRUE, 0);
if ( ServiceExists(MS_MC_GETPROTOCOLNAME))
g_szMetaModuleName = (char *)CallService(MS_MC_GETPROTOCOLNAME, 0, 0);
@@ -1844,7 +1844,7 @@ LRESULT CLUI::OnSizingMoving(UINT msg, WPARAM wParam, LPARAM lParam)
if (!g_CluiData.fLayered)
{
g_mutex_bSizing = 1;
- Sync(CLUIFrames_OnClistResize_mod,(WPARAM)m_hWnd,(LPARAM)1);
+ Sync(CLUIFrames_OnClistResize_mod,(WPARAM)m_hWnd,1);
CLUIFrames_ApplyNewSizes(2);
CLUIFrames_ApplyNewSizes(1);
SendMessage(m_hWnd,CLN_LISTSIZECHANGE, 0, 0);
@@ -2056,7 +2056,7 @@ LRESULT CLUI::OnCreateClc(UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*lParam*/ )
{
CreateCLC();
if ( db_get_b( NULL, "CList", "ShowOnStart", SETTING_SHOWONSTART_DEFAULT ))
- cliShowHide((WPARAM) m_hWnd, (LPARAM)TRUE );
+ cliShowHide((WPARAM) m_hWnd, TRUE );
PostMessage( pcli->hwndContactTree, CLM_AUTOREBUILD, 0, 0 );
return FALSE;
}
diff --git a/plugins/Clist_nicer/src/Coolsb/coolsblib.cpp b/plugins/Clist_nicer/src/Coolsb/coolsblib.cpp
index 4fbe772dec..87c426d6dc 100644
--- a/plugins/Clist_nicer/src/Coolsb/coolsblib.cpp
+++ b/plugins/Clist_nicer/src/Coolsb/coolsblib.cpp
@@ -111,7 +111,7 @@ static void RedrawNonClient(HWND hwnd, BOOL fFrameChanged)
DeleteObject(hrgn1);
DeleteObject(hrgn2);*/
- SendMessage(hwnd, WM_NCPAINT, (WPARAM)1, 0);
+ SendMessage(hwnd, WM_NCPAINT, 1, 0);
}
else
{
diff --git a/plugins/Clist_nicer/src/Coolsb/coolscroll.cpp b/plugins/Clist_nicer/src/Coolsb/coolscroll.cpp
index c1547121d9..cb2490ed44 100644
--- a/plugins/Clist_nicer/src/Coolsb/coolscroll.cpp
+++ b/plugins/Clist_nicer/src/Coolsb/coolscroll.cpp
@@ -2432,7 +2432,7 @@ static LRESULT MouseMove(SCROLLWND *sw, HWND hwnd, WPARAM wParam, LPARAM lParam)
//remember what size the USER set the button to
sbut->nSizeReserved = sbut->nSize;
- NCPaint(sw, hwnd, (WPARAM)1, 0);
+ NCPaint(sw, hwnd, 1, 0);
return 0;
}
}
diff --git a/plugins/Clist_nicer/src/clistevents.cpp b/plugins/Clist_nicer/src/clistevents.cpp
index 56ac5500b9..6ac09b985a 100644
--- a/plugins/Clist_nicer/src/clistevents.cpp
+++ b/plugins/Clist_nicer/src/clistevents.cpp
@@ -330,7 +330,7 @@ struct CListEvent* AddEvent(CLISTEVENT *cle)
}
// Removes an event from the contact list's queue
-// wParam=(WPARAM)(HANDLE)hContact
+// wParam=(MCONTACT)hContact
// lParam=(LPARAM)(HANDLE)hDbEvent
// Returns 0 if the event was successfully removed, or nonzero if the event was not found
int RemoveEvent(MCONTACT hContact, HANDLE hDbEvent)
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp
index 763cb363cb..df05b2397d 100644
--- a/plugins/Clist_nicer/src/clui.cpp
+++ b/plugins/Clist_nicer/src/clui.cpp
@@ -723,7 +723,7 @@ static int ServiceParamsOK(ButtonItem *item, WPARAM *wParam, LPARAM *lParam, MCO
if (item->dwFlags & BUTTON_PASSHCONTACTW)
*wParam = hContact;
else if (item->dwFlags & BUTTON_PASSHCONTACTL)
- *lParam = (LPARAM)hContact;
+ *lParam = hContact;
}
return 1;
}
diff --git a/plugins/ConnectionNotify/src/ConnectionNotify.cpp b/plugins/ConnectionNotify/src/ConnectionNotify.cpp
index 474b7cff84..91be0a6a42 100644
--- a/plugins/ConnectionNotify/src/ConnectionNotify.cpp
+++ b/plugins/ConnectionNotify/src/ConnectionNotify.cpp
@@ -649,7 +649,7 @@ INT_PTR SetStatus(WPARAM wParam,LPARAM lParam)
if (wParam == ID_STATUS_OFFLINE)
{
diffstat=0;
- //PostThreadMessage(ConnectionCheckThreadId,WM_QUIT ,(WPARAM)0, (LPARAM)0);
+ //PostThreadMessage(ConnectionCheckThreadId,WM_QUIT ,0, 0);
SetEvent(killCheckThreadEvent);
}
@@ -759,7 +759,7 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA
memcpy(conn,mpd,sizeof(struct CONNECTION));
PUDeletePopup(hWnd);
- PostThreadMessage(FilterOptionsThreadId,WM_ADD_FILTER,(WPARAM)0, (LPARAM)conn);
+ PostThreadMessage(FilterOptionsThreadId,WM_ADD_FILTER,0, (LPARAM)conn);
}
break;
@@ -858,8 +858,8 @@ static int preshutdown(WPARAM,LPARAM)
deleteConnectionsTable(connExceptions);
deleteConnectionsTable(connExceptionsTmp);
- PostThreadMessage(ConnectionCheckThreadId,WM_QUIT ,(WPARAM)0, (LPARAM)0);
- PostThreadMessage(FilterOptionsThreadId,WM_QUIT ,(WPARAM)0, (LPARAM)0);
+ PostThreadMessage(ConnectionCheckThreadId,WM_QUIT ,0, 0);
+ PostThreadMessage(FilterOptionsThreadId,WM_QUIT ,0, 0);
return 0;
}
diff --git a/plugins/Console/src/Console.cpp b/plugins/Console/src/Console.cpp
index 9899814098..3d77fe1225 100644
--- a/plugins/Console/src/Console.cpp
+++ b/plugins/Console/src/Console.cpp
@@ -729,7 +729,7 @@ static INT_PTR CALLBACK ConsoleDlgProc(HWND hwndDlg,UINT message,WPARAM wParam,L
ListView_SetTextColor(lw->hList, col);
if (hfLogFont)
- SendMessage(lw->hList, WM_SETFONT, (WPARAM)hfLogFont, (LPARAM)TRUE);
+ SendMessage(lw->hList, WM_SETFONT, (WPARAM)hfLogFont, TRUE);
}
// hide startup window
@@ -795,7 +795,7 @@ static INT_PTR CALLBACK ConsoleDlgProc(HWND hwndDlg,UINT message,WPARAM wParam,L
lw = (LOGWIN*)lModules.items[i];
ListView_SetTextColor(lw->hList, (COLORREF)lParam);
if (wParam)
- SendMessage(lw->hList, WM_SETFONT, wParam, (LPARAM)TRUE);
+ SendMessage(lw->hList, WM_SETFONT, wParam, TRUE);
}
return TRUE;
}
@@ -810,7 +810,7 @@ static INT_PTR CALLBACK ConsoleDlgProc(HWND hwndDlg,UINT message,WPARAM wParam,L
ListView_SetBkColor(lw->hList, (COLORREF)lParam);
ListView_SetTextBkColor(lw->hList, (COLORREF)lParam);
if (wParam)
- SendMessage(lw->hList, WM_SETFONT, wParam, (LPARAM)TRUE);
+ SendMessage(lw->hList, WM_SETFONT, wParam, TRUE);
}
return TRUE;
}
diff --git a/plugins/ContactsPlus/src/main.cpp b/plugins/ContactsPlus/src/main.cpp
index 549685e941..e4398e6e06 100644
--- a/plugins/ContactsPlus/src/main.cpp
+++ b/plugins/ContactsPlus/src/main.cpp
@@ -122,7 +122,7 @@ static int HookPreBuildContactMenu(WPARAM hContact, LPARAM lParam)
if (szProto && CheckContactsServiceSupport(szProto)) {
// known protocol, protocol supports contacts sending
// check the selected contact if it supports contacts receive
- if (CallProtoService(szProto, PS_GETCAPS, PFLAG_MAXCONTACTSPERPACKET, (LPARAM)hContact))
+ if (CallProtoService(szProto, PS_GETCAPS, PFLAG_MAXCONTACTSPERPACKET, hContact))
bVisible = TRUE;
}
@@ -136,7 +136,7 @@ static int HookModulesLoaded(WPARAM wParam, LPARAM lParam)
char* modules[2] = { 0 };
modules[0] = MODULENAME;
- CallService("DBEditorpp/RegisterModule", (WPARAM)modules, (LPARAM)1);
+ CallService("DBEditorpp/RegisterModule", (WPARAM)modules, 1);
CLISTMENUITEM mi = { sizeof(mi) };
mi.pszName = LPGEN("Contacts");
diff --git a/plugins/ContactsPlus/src/send.cpp b/plugins/ContactsPlus/src/send.cpp
index 6bc4a8e915..899274a305 100644
--- a/plugins/ContactsPlus/src/send.cpp
+++ b/plugins/ContactsPlus/src/send.cpp
@@ -136,7 +136,7 @@ int TSendContactsData::SendContactsPacket(HWND hwndDlg, MCONTACT *phContacts, in
int TSendContactsData::SendContacts(HWND hwndDlg)
{
char *szProto = GetContactProto(hContact);
- int nMaxContacts = CallProtoService(szProto, PS_GETCAPS, PFLAG_MAXCONTACTSPERPACKET, (LPARAM)hContact);
+ int nMaxContacts = CallProtoService(szProto, PS_GETCAPS, PFLAG_MAXCONTACTSPERPACKET, hContact);
if (!nMaxContacts) {
ShowErrorDlg(hwndDlg, "The selected contact does not support receiving contacts.", FALSE);
@@ -222,9 +222,9 @@ static void SetAllContactChecks(HWND hwndList, MCONTACT hReceiver) // doubtful n
return;
if (CallService(MS_CLUI_GETCAPS, 0, 0) & CLUIF_HIDEEMPTYGROUPS && db_get_b(NULL, "CList", "HideEmptyGroups", SETTING_USEGROUPS_DEFAULT))
- SendMessage(hwndList, CLM_SETHIDEEMPTYGROUPS, (WPARAM)TRUE, 0);
+ SendMessage(hwndList, CLM_SETHIDEEMPTYGROUPS, TRUE, 0);
else
- SendMessage(hwndList, CLM_SETHIDEEMPTYGROUPS, (WPARAM)FALSE, 0);
+ SendMessage(hwndList, CLM_SETHIDEEMPTYGROUPS, FALSE, 0);
MCONTACT hItem, hContact = FindFirstClistContact(hwndList, &hItem);
while (hContact) {
diff --git a/plugins/DbEditorPP/src/copymodule.cpp b/plugins/DbEditorPP/src/copymodule.cpp
index 896f953a46..3f9dbfa4f9 100644
--- a/plugins/DbEditorPP/src/copymodule.cpp
+++ b/plugins/DbEditorPP/src/copymodule.cpp
@@ -81,7 +81,7 @@ INT_PTR CALLBACK copyModDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
}
index = SendMessageW(GetDlgItem(hwnd, IDC_CONTACTS), CB_ADDSTRING, 0, (LPARAM)nick);
- SendMessageW(GetDlgItem(hwnd, IDC_CONTACTS), CB_SETITEMDATA, index, (LPARAM)hContact);
+ SendMessageW(GetDlgItem(hwnd, IDC_CONTACTS), CB_SETITEMDATA, index, hContact);
}
index = (int)SendMessage(GetDlgItem(hwnd, IDC_CONTACTS), CB_INSERTSTRING, 0, (LPARAM)(char*)Translate("Settings"));
diff --git a/plugins/DbEditorPP/src/exportimport.cpp b/plugins/DbEditorPP/src/exportimport.cpp
index d15655fffb..4e967c6d70 100644
--- a/plugins/DbEditorPP/src/exportimport.cpp
+++ b/plugins/DbEditorPP/src/exportimport.cpp
@@ -596,7 +596,7 @@ void ImportSettingsMenuItem(MCONTACT hContact)
if (hwnd2importWindow)
DestroyWindow(hwnd2importWindow);
- CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_IMPORT), 0, ImportDlgProc, (LPARAM)hContact);
+ CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_IMPORT), 0, ImportDlgProc, hContact);
}
int Openfile2Import(char *outputFiles)
diff --git a/plugins/DbEditorPP/src/moduletree.cpp b/plugins/DbEditorPP/src/moduletree.cpp
index 1cf43de7b7..0d675682fe 100644
--- a/plugins/DbEditorPP/src/moduletree.cpp
+++ b/plugins/DbEditorPP/src/moduletree.cpp
@@ -852,7 +852,7 @@ void moduleListRightClick(HWND hwnd, WPARAM wParam, LPARAM lParam) // hwnd here
////////////////////////////////////////////////////////////////////// divider
case MENU_ADD_MODULE:
{
- HWND AddModhwnd = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_ADD_MODULE), hwnd, AddModDlgProc, (LPARAM)hContact);
+ HWND AddModhwnd = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_ADD_MODULE), hwnd, AddModDlgProc, hContact);
char msg[1024];
mir_snprintf(msg, SIZEOF(msg), Translate("Add module to contact \"%s\""), module);
SetWindowText(AddModhwnd, module);
@@ -865,7 +865,7 @@ void moduleListRightClick(HWND hwnd, WPARAM wParam, LPARAM lParam) // hwnd here
switch (TrackPopupMenu(hSubMenu, TPM_RETURNCMD, hti.pt.x, hti.pt.y, 0, hwnd, NULL)) {
case MENU_ADD_MODULE:
{
- HWND AddModhwnd = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_ADD_MODULE), hwnd, AddModDlgProc, (LPARAM)hContact);
+ HWND AddModhwnd = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_ADD_MODULE), hwnd, AddModDlgProc, hContact);
char msg[1024];
mir_snprintf(msg, SIZEOF(msg), Translate("Add module to contact \"%s\""), module);
SetWindowText(AddModhwnd, module);
diff --git a/plugins/Db_autobackups/src/options.cpp b/plugins/Db_autobackups/src/options.cpp
index 61dca04df3..fefff1f7b6 100644
--- a/plugins/Db_autobackups/src/options.cpp
+++ b/plugins/Db_autobackups/src/options.cpp
@@ -110,10 +110,10 @@ int SetDlgState(HWND hwndDlg)
CheckDlgButton(hwndDlg, IDC_RAD_PERIODIC, new_options.backup_types & BT_PERIODIC ? BST_CHECKED : BST_UNCHECKED);
}
- SendDlgItemMessage(hwndDlg, SPIN_PERIOD, UDM_SETRANGE32, (WPARAM)1, (LPARAM)60);
+ SendDlgItemMessage(hwndDlg, SPIN_PERIOD, UDM_SETRANGE32, 1, (LPARAM)60);
SetDlgItemText(hwndDlg, IDC_ED_PERIOD, _itot(new_options.period, buff, 10));
- SendDlgItemMessage(hwndDlg, SPIN_NUMBACKUPS, UDM_SETRANGE32, (WPARAM)1, (LPARAM)100);
+ SendDlgItemMessage(hwndDlg, SPIN_NUMBACKUPS, UDM_SETRANGE32, 1, (LPARAM)100);
SetDlgItemText(hwndDlg, IDC_ED_NUMBACKUPS, _itot(new_options.num_backups, buff, 10));
SetDlgItemText(hwndDlg, IDC_ED_FOLDER, new_options.folder);
diff --git a/plugins/FTPFileYM/src/dialog.cpp b/plugins/FTPFileYM/src/dialog.cpp
index 02c602f846..ff2626e520 100644
--- a/plugins/FTPFileYM/src/dialog.cpp
+++ b/plugins/FTPFileYM/src/dialog.cpp
@@ -232,7 +232,7 @@ INT_PTR CALLBACK UploadDialog::UploadDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar
MCONTACT hContact = uDlg->tabs[uDlg->activeTab]->job->hContact;
if (hContact != NULL)
{
- if (CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam),MPCF_CONTACTMENU), (LPARAM)hContact))
+ if (CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam),MPCF_CONTACTMENU), hContact))
break;
}
diff --git a/plugins/FavContacts/src/main.cpp b/plugins/FavContacts/src/main.cpp
index d51299e45c..9bf93c4acf 100644
--- a/plugins/FavContacts/src/main.cpp
+++ b/plugins/FavContacts/src/main.cpp
@@ -777,7 +777,7 @@ static LRESULT CALLBACK MenuHostWndProc(HWND hwnd, UINT message, WPARAM wParam,
SetForegroundWindow(hwndSave);
DestroyMenu(hMenu);
- CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(res, MPCF_CONTACTMENU), (LPARAM)hContact);
+ CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(res, MPCF_CONTACTMENU), hContact);
return TRUE;
}
}
diff --git a/plugins/HTTPServer/src/GuiElements.cpp b/plugins/HTTPServer/src/GuiElements.cpp
index 54adc72e0c..12085df132 100644
--- a/plugins/HTTPServer/src/GuiElements.cpp
+++ b/plugins/HTTPServer/src/GuiElements.cpp
@@ -982,7 +982,7 @@ static INT_PTR CALLBACK DlgProcStatsticView(HWND hwndDlg, UINT msg, WPARAM wPara
/////////////////////////////////////////////////////////////////////
// Member Function : SendLinkToUser
// Type : Global
-// Parameters : wParam - (WPARAM)(HANDLE)hContact
+// Parameters : wParam - (MCONTACT)hContact
// lParam - ?
// Returns : static int
// Description : Send the link to the given contact
@@ -1001,7 +1001,7 @@ void SendLinkToUser(WPARAM wParam, char *pszSrvPath) {
/////////////////////////////////////////////////////////////////////
// Member Function : nShareNewFile
// Type : Global
-// Parameters : wParam - (WPARAM)(HANDLE)hContact
+// Parameters : wParam - (MCONTACT)hContact
// lParam - ?
// Returns : static int
diff --git a/plugins/LotusNotify/src/LotusNotify.cpp b/plugins/LotusNotify/src/LotusNotify.cpp
index 75b6c4e2c5..ae81d15881 100644
--- a/plugins/LotusNotify/src/LotusNotify.cpp
+++ b/plugins/LotusNotify/src/LotusNotify.cpp
@@ -1293,7 +1293,7 @@ INT_PTR CALLBACK DlgProcLotusNotifyOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
}
_tcsncpy_s(settingFilterSender, SIZEOF(settingFilterSender), TEXT(""), SIZEOF(settingFilterSender));
- for(i=0; i<SendDlgItemMessage(hwndDlg, IDC_FILTER_SENDER, CB_GETCOUNT, (WPARAM)0, (LONG)0); i++){
+ for(i=0; i<SendDlgItemMessage(hwndDlg, IDC_FILTER_SENDER, CB_GETCOUNT, 0, (LONG)0); i++){
TCHAR text[512] = TEXT("");
SendDlgItemMessage(hwndDlg,IDC_FILTER_SENDER ,CB_GETLBTEXT,(WPARAM)i,(LONG) (LPSTR)text);
_tcscat_s(settingFilterSender, SIZEOF(settingFilterSender), text);
@@ -1302,7 +1302,7 @@ INT_PTR CALLBACK DlgProcLotusNotifyOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
db_set_ts(NULL, PLUGINNAME, "LNFilterSender", settingFilterSender);
_tcsncpy_s(settingFilterSubject, SIZEOF(settingFilterSubject), TEXT(""),SIZEOF(settingFilterSubject));
- for(i=0; i<SendDlgItemMessage(hwndDlg, IDC_FILTER_SUBJECT, CB_GETCOUNT, (WPARAM)0, (LONG)0); i++){
+ for(i=0; i<SendDlgItemMessage(hwndDlg, IDC_FILTER_SUBJECT, CB_GETCOUNT, 0, (LONG)0); i++){
TCHAR text[512] = TEXT("");
SendDlgItemMessage(hwndDlg,IDC_FILTER_SUBJECT ,CB_GETLBTEXT,(WPARAM)i,(LONG) (LPSTR)text);
_tcscat_s(settingFilterSubject, SIZEOF(settingFilterSubject), text);
@@ -1311,7 +1311,7 @@ INT_PTR CALLBACK DlgProcLotusNotifyOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
db_set_ts(NULL, PLUGINNAME, "LNFilterSubject", settingFilterSubject);
_tcsncpy_s(settingFilterTo, SIZEOF(settingFilterTo), TEXT(""),SIZEOF(settingFilterTo));
- for(i=0; i<SendDlgItemMessage(hwndDlg, IDC_FILTER_TO, CB_GETCOUNT, (WPARAM)0, (LONG)0); i++){
+ for(i=0; i<SendDlgItemMessage(hwndDlg, IDC_FILTER_TO, CB_GETCOUNT, 0, (LONG)0); i++){
TCHAR text[512] = TEXT("");
SendDlgItemMessage(hwndDlg,IDC_FILTER_TO ,CB_GETLBTEXT,(WPARAM)i,(LONG) (LPSTR)text);
_tcscat_s(settingFilterTo, SIZEOF(settingFilterTo), text);
diff --git a/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp b/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp
index 513326712f..65d489d1cc 100644
--- a/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp
+++ b/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp
@@ -65,7 +65,7 @@ INT_PTR MirOTRMenuExecService(WPARAM wParam,LPARAM lParam)
{
if (wParam!=0) {
lpMirOTRMenuExecParam cmep=(lpMirOTRMenuExecParam)wParam;
- //call with wParam=(WPARAM)(HANDLE)hContact
+ //call with wParam=(MCONTACT)hContact
CallService(cmep->szServiceName,lParam,0);
}
return 0;
diff --git a/plugins/MirOTR/MirOTR/src/options.cpp b/plugins/MirOTR/MirOTR/src/options.cpp
index 613178905b..b6792618d5 100644
--- a/plugins/MirOTR/MirOTR/src/options.cpp
+++ b/plugins/MirOTR/MirOTR/src/options.cpp
@@ -564,7 +564,7 @@ static INT_PTR CALLBACK DlgProcMirOTROptsContacts(HWND hwndDlg, UINT msg, WPARAM
{
lvI.iItem = 0;
lvI.iSubItem = 0;
- lvI.lParam = (LPARAM)hContact;
+ lvI.lParam = hContact;
lvI.pszText = (TCHAR*)contact_get_nameT(hContact);
lvI.iItem = ListView_InsertItem(lv , &lvI);
diff --git a/plugins/Msg_Export/src/main.cpp b/plugins/Msg_Export/src/main.cpp
index f05a5fc46b..c2ad1bd270 100755
--- a/plugins/Msg_Export/src/main.cpp
+++ b/plugins/Msg_Export/src/main.cpp
@@ -47,7 +47,7 @@ PLUGININFOEX pluginInfo = {
/////////////////////////////////////////////////////////////////////
// Member Function : ShowExportHistory
// Type : Global
-// Parameters : wParam - (WPARAM)(HANDLE)hContact
+// Parameters : wParam - (MCONTACT)hContact
// lParam - ?
// Returns : static int
// Description : Called when user selects my menu item "Open Exported History"
diff --git a/plugins/Msg_Export/src/options.cpp b/plugins/Msg_Export/src/options.cpp
index f6dfa69f44..6c8041c7d9 100755
--- a/plugins/Msg_Export/src/options.cpp
+++ b/plugins/Msg_Export/src/options.cpp
@@ -685,7 +685,7 @@ static INT_PTR CALLBACK DlgProcMsgExportOpts(HWND hwndDlg, UINT msg, WPARAM wPar
sItem.iItem = nUser;
sItem.iSubItem = 0;
sItem.iImage = db_get_b(hContact,MODULE, "EnableLog", 1);
- sItem.lParam = (LPARAM)hContact;
+ sItem.lParam = hContact;
sTmp = _DBGetString( hContact, MODULE, "FileName", _T(""));
diff --git a/plugins/NewAwaySysMod/src/AwayOpt.cpp b/plugins/NewAwaySysMod/src/AwayOpt.cpp
index fded681ed9..21fb520fb3 100644
--- a/plugins/NewAwaySysMod/src/AwayOpt.cpp
+++ b/plugins/NewAwaySysMod/src/AwayOpt.cpp
@@ -1063,7 +1063,7 @@ static void SetAllContactIcons(HWND hwndList, HANDLE hItemUnknown)
MCONTACT hContact = db_find_first();
do {
- HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
if (hItem) {
char *szProto = GetContactProto(hContact);
int Ignore = CContactSettings(ID_STATUS_ONLINE, hContact).Ignore;
@@ -1132,7 +1132,7 @@ INT_PTR CALLBACK ContactsOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
if (szProto) {
int Flag1 = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0);
if ((Flag1 & PF1_IM) != PF1_IM && !(Flag1 & PF1_INDIVMODEMSG)) // does contact's protocol supports message sending/receiving or individual status messages?
- SendMessage(hwndList, CLM_DELETEITEM, SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0), 0);
+ SendMessage(hwndList, CLM_DELETEITEM, SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0), 0);
}
}
while (hContact = db_find_next(hContact));
@@ -1213,7 +1213,7 @@ INT_PTR CALLBACK ContactsOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CONTACTSDLG_LIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CONTACTSDLG_LIST, CLM_FINDCONTACT, hContact, 0);
if (hItem)
SaveItemState(GetDlgItem(hwndDlg, IDC_CONTACTSDLG_LIST), hContact, hItem);
}
diff --git a/plugins/NewAwaySysMod/src/ContactList.cpp b/plugins/NewAwaySysMod/src/ContactList.cpp
index 0471763944..48248a6764 100644
--- a/plugins/NewAwaySysMod/src/ContactList.cpp
+++ b/plugins/NewAwaySysMod/src/ContactList.cpp
@@ -318,10 +318,10 @@ static LRESULT CALLBACK ContactListSubclassProc(HWND hWnd, UINT Msg, WPARAM wPar
if (hItem) {
MCONTACT hContact = dat->GetItemData(hItem).hContact;
if (IsHContactContact(hContact)) {
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)hContact, 0);
+ HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, hContact, 0);
if (hMenu) {
ClientToScreen(hWnd, &pt);
- CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(TrackPopupMenu(hMenu, TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD, pt.x, pt.y, 0, hWnd, NULL), MPCF_CONTACTMENU), (LPARAM)hContact);
+ CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(TrackPopupMenu(hMenu, TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD, pt.x, pt.y, 0, hWnd, NULL), MPCF_CONTACTMENU), hContact);
DestroyMenu(hMenu);
return 0;
}
@@ -375,7 +375,7 @@ HTREEITEM CCList::AddContact(MCONTACT hContact)
tvIns.item.pszText = pcli->pfnGetContactDisplayName(hContact, 0);
tvIns.hInsertAfter = TVI_ROOT;
tvIns.item.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM;
- tvIns.item.iImage = tvIns.item.iSelectedImage = CallService(MS_CLIST_GETCONTACTICON, (WPARAM)hContact, 0);
+ tvIns.item.iImage = tvIns.item.iSelectedImage = CallService(MS_CLIST_GETCONTACTICON, hContact, 0);
tvIns.item.lParam = Items.AddElem(CCLItemData(hContact));
return TreeView_InsertItem(hTreeView, &tvIns);
}
diff --git a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp
index 8d18acd995..8fbd79cd69 100644
--- a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp
+++ b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp
@@ -795,7 +795,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
WindowTitle += _T(" ");
}
- WindowTitle += (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
+ WindowTitle += (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
if (!IsAnICQProto(GetContactProto(hContact))) {
WindowTitle += _T(" ");
WindowTitle += TranslateT("available autoreply only");
diff --git a/plugins/New_GPG/src/main.cpp b/plugins/New_GPG/src/main.cpp
index 5117e2b418..a7eb35ca46 100755
--- a/plugins/New_GPG/src/main.cpp
+++ b/plugins/New_GPG/src/main.cpp
@@ -1354,7 +1354,7 @@ static INT_PTR CALLBACK DlgProcKeyGenDialog(HWND hwndDlg, UINT msg, WPARAM wPara
SetWindowText(hwndDlg, TranslateT("Key Generation dialog"));
ComboBoxAddStringUtf(GetDlgItem(hwndDlg, IDC_KEY_TYPE), _T("RSA"), 0);
ComboBoxAddStringUtf(GetDlgItem(hwndDlg, IDC_KEY_TYPE), _T("DSA"), 1);
- SendDlgItemMessage(hwndDlg, IDC_KEY_TYPE, CB_SETCURSEL, (WPARAM)1, 0);
+ SendDlgItemMessage(hwndDlg, IDC_KEY_TYPE, CB_SETCURSEL, 1, 0);
SetDlgItemInt(hwndDlg, IDC_KEY_EXPIRE_DATE, 0, 0);
SetDlgItemInt(hwndDlg, IDC_KEY_LENGTH, 4096, 0);
return TRUE;
diff --git a/plugins/NewsAggregator/Src/Services.cpp b/plugins/NewsAggregator/Src/Services.cpp
index c2bdad8212..9f9079d840 100644
--- a/plugins/NewsAggregator/Src/Services.cpp
+++ b/plugins/NewsAggregator/Src/Services.cpp
@@ -174,7 +174,7 @@ INT_PTR ChangeFeed(WPARAM hContact, LPARAM lParam)
{
HWND hChangeFeedDlg = WindowList_Find(hChangeFeedDlgList, hContact);
if (!hChangeFeedDlg) {
- hChangeFeedDlg = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_ADDFEED), NULL, DlgProcChangeFeedMenu, (LPARAM)hContact);
+ hChangeFeedDlg = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_ADDFEED), NULL, DlgProcChangeFeedMenu, hContact);
ShowWindow(hChangeFeedDlg, SW_SHOW);
} else {
SetForegroundWindow(hChangeFeedDlg);
diff --git a/plugins/Non-IM Contact/src/contactinfo.cpp b/plugins/Non-IM Contact/src/contactinfo.cpp
index bb7da6cdd7..bd986fb1c7 100644
--- a/plugins/Non-IM Contact/src/contactinfo.cpp
+++ b/plugins/Non-IM Contact/src/contactinfo.cpp
@@ -114,7 +114,7 @@ INT_PTR CALLBACK DlgProcOtherStuff(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
{
MCONTACT hContact = (MCONTACT)((PROPSHEETPAGE*)lParam)->lParam;
TranslateDialogDefault(hwnd);
- SetWindowLongPtr(hwnd, GWLP_USERDATA, (LPARAM)hContact);
+ SetWindowLongPtr(hwnd, GWLP_USERDATA, hContact);
if (!hContact)
break;
@@ -306,7 +306,7 @@ INT_PTR CALLBACK DlgProcCopy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
MCONTACT hContact = (MCONTACT)((PROPSHEETPAGE*)lParam)->lParam;
TranslateDialogDefault(hwnd);
- SetWindowLongPtr(hwnd, GWLP_USERDATA, (LPARAM)hContact);
+ SetWindowLongPtr(hwnd, GWLP_USERDATA, hContact);
}
return TRUE;
diff --git a/plugins/Non-IM Contact/src/dialog.cpp b/plugins/Non-IM Contact/src/dialog.cpp
index 0b79653a20..e3bb42af03 100644
--- a/plugins/Non-IM Contact/src/dialog.cpp
+++ b/plugins/Non-IM Contact/src/dialog.cpp
@@ -252,7 +252,7 @@ void DoPropertySheet(MCONTACT hContact, HINSTANCE hInst)
psp[0].pszIcon = NULL;
psp[0].pfnDlgProc = DlgProcContactInfo;
psp[0].pszTitle = Translate("Contacts Display Info");
- psp[0].lParam = (LPARAM)hContact;
+ psp[0].lParam = hContact;
psp[0].pfnCallback = NULL;
/* other settings */
@@ -263,7 +263,7 @@ void DoPropertySheet(MCONTACT hContact, HINSTANCE hInst)
psp[1].pszIcon = NULL;
psp[1].pfnDlgProc = DlgProcOtherStuff;
psp[1].pszTitle = Translate("Link and Contact list Settings");
- psp[1].lParam = (LPARAM)hContact;
+ psp[1].lParam = hContact;
psp[1].pfnCallback = NULL;
/* copy contact */
@@ -274,7 +274,7 @@ void DoPropertySheet(MCONTACT hContact, HINSTANCE hInst)
psp[2].pszIcon = NULL;
psp[2].pfnDlgProc = DlgProcCopy;
psp[2].pszTitle = Translate("Copy Contact");
- psp[2].lParam = (LPARAM)hContact;
+ psp[2].lParam = hContact;
psp[2].pfnCallback = NULL;
/* files */
diff --git a/plugins/NotesAndReminders/src/reminders.cpp b/plugins/NotesAndReminders/src/reminders.cpp
index 21d9626fdd..257f9ef9cb 100644
--- a/plugins/NotesAndReminders/src/reminders.cpp
+++ b/plugins/NotesAndReminders/src/reminders.cpp
@@ -2007,7 +2007,7 @@ INT_PTR CALLBACK DlgProcNewReminder(HWND Dialog,UINT Message,WPARAM wParam,LPARA
int n = SendDlgItemMessage(Dialog, IDC_COMBO_SOUND, CB_ADDSTRING, 0, (LPARAM)Translate("Default"));
SendDlgItemMessage(Dialog, IDC_COMBO_SOUND, CB_SETITEMDATA, n, 0);
n = SendDlgItemMessage(Dialog, IDC_COMBO_SOUND, CB_ADDSTRING, 0, (LPARAM)Translate("Alternative 1"));
- SendDlgItemMessage(Dialog, IDC_COMBO_SOUND, CB_SETITEMDATA, n, (LPARAM)1);
+ SendDlgItemMessage(Dialog, IDC_COMBO_SOUND, CB_SETITEMDATA, n, 1);
n = SendDlgItemMessage(Dialog, IDC_COMBO_SOUND, CB_ADDSTRING, 0, (LPARAM)Translate("Alternative 2"));
SendDlgItemMessage(Dialog, IDC_COMBO_SOUND, CB_SETITEMDATA, n, (LPARAM)2);
n = SendDlgItemMessage(Dialog, IDC_COMBO_SOUND, CB_ADDSTRING, 0, (LPARAM)Translate("None"));
diff --git a/plugins/Ping/src/options.cpp b/plugins/Ping/src/options.cpp
index 1167c00c39..ed5b07a46e 100644
--- a/plugins/Ping/src/options.cpp
+++ b/plugins/Ping/src/options.cpp
@@ -416,10 +416,10 @@ static INT_PTR CALLBACK DlgProcOpts2(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
item->index = index2;
item2->index = index;
- SendDlgItemMessage(hwndDlg, IDC_LST_DEST, LB_DELETESTRING, (WPARAM)sel2, (LPARAM)0);
+ SendDlgItemMessage(hwndDlg, IDC_LST_DEST, LB_DELETESTRING, (WPARAM)sel2, 0);
SendDlgItemMessage(hwndDlg, IDC_LST_DEST, LB_INSERTSTRING, (WPARAM)sel2, (LPARAM)item->pszLabel);
SendDlgItemMessage(hwndDlg, IDC_LST_DEST, LB_SETITEMDATA, (WPARAM)sel2, (LPARAM)item);
- SendDlgItemMessage(hwndDlg, IDC_LST_DEST, LB_DELETESTRING, (WPARAM)(sel2 + 1), (LPARAM)0);
+ SendDlgItemMessage(hwndDlg, IDC_LST_DEST, LB_DELETESTRING, (WPARAM)(sel2 + 1), 0);
SendDlgItemMessage(hwndDlg, IDC_LST_DEST, LB_INSERTSTRING, (WPARAM)(sel2 + 1), (LPARAM)item2->pszLabel);
SendDlgItemMessage(hwndDlg, IDC_LST_DEST, LB_SETITEMDATA, (WPARAM)(sel2 + 1), (LPARAM)item2);
SendDlgItemMessage(hwndDlg, IDC_LST_DEST, LB_SETCURSEL, (WPARAM)(sel2 + 1), 0);
@@ -451,11 +451,11 @@ static INT_PTR CALLBACK DlgProcOpts2(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
item->index = index2;
item2->index = index;
- SendDlgItemMessage(hwndDlg, IDC_LST_DEST, LB_DELETESTRING, (WPARAM)sel2, (LPARAM)0);
+ SendDlgItemMessage(hwndDlg, IDC_LST_DEST, LB_DELETESTRING, (WPARAM)sel2, 0);
SendDlgItemMessage(hwndDlg, IDC_LST_DEST, LB_INSERTSTRING, (WPARAM)sel2, (LPARAM)item->pszLabel);
SendDlgItemMessage(hwndDlg, IDC_LST_DEST, LB_SETITEMDATA, (WPARAM)sel2, (LPARAM)item);
- SendDlgItemMessage(hwndDlg, IDC_LST_DEST, LB_DELETESTRING, (WPARAM)(sel2 - 1), (LPARAM)0);
+ SendDlgItemMessage(hwndDlg, IDC_LST_DEST, LB_DELETESTRING, (WPARAM)(sel2 - 1), 0);
SendDlgItemMessage(hwndDlg, IDC_LST_DEST, LB_INSERTSTRING, (WPARAM)(sel2 - 1), (LPARAM)item2->pszLabel);
SendDlgItemMessage(hwndDlg, IDC_LST_DEST, LB_SETITEMDATA, (WPARAM)(sel2 - 1), (LPARAM)item2);
diff --git a/plugins/Ping/src/pingthread.cpp b/plugins/Ping/src/pingthread.cpp
index 72a8f2bfa6..408cd6ce90 100644
--- a/plugins/Ping/src/pingthread.cpp
+++ b/plugins/Ping/src/pingthread.cpp
@@ -275,7 +275,7 @@ int FillList(WPARAM wParam, LPARAM lParam) {
PINGLIST pl;
CallService(PLUG "/GetPingList", 0, (LPARAM)&pl);
- SendMessage(list_hwnd, WM_SETREDRAW, (WPARAM)FALSE, 0);
+ SendMessage(list_hwnd, WM_SETREDRAW, FALSE, 0);
Lock(&data_list_cs, "fill_list");
data_list = pl;
@@ -291,7 +291,7 @@ int FillList(WPARAM wParam, LPARAM lParam) {
list_size = data_list.size();
Unlock(&data_list_cs);
- SendMessage(list_hwnd, WM_SETREDRAW, (WPARAM)TRUE, 0);
+ SendMessage(list_hwnd, WM_SETREDRAW, TRUE, 0);
InvalidateRect(list_hwnd, 0, FALSE);
@@ -887,7 +887,7 @@ int ReloadFont(WPARAM, LPARAM) {
LOGFONT log_font;
CallService(MS_FONT_GETT, (WPARAM)&font_id, (LPARAM)&log_font);
hFont = CreateFontIndirect(&log_font);
- SendMessage(list_hwnd, WM_SETFONT, (WPARAM)hFont, (LPARAM)TRUE);
+ SendMessage(list_hwnd, WM_SETFONT, (WPARAM)hFont, TRUE);
bk_col = CallService(MS_COLOUR_GETT, (WPARAM)&bk_col_id, 0);
RefreshWindow(0, 0);
diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp
index f73e3f86a1..4805337134 100644
--- a/plugins/Popup/src/popup_wnd2.cpp
+++ b/plugins/Popup/src/popup_wnd2.cpp
@@ -1514,7 +1514,7 @@ LRESULT CALLBACK MenuHostWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM
case WM_COMMAND:
{
// do not call PluginWindowProc if menu item was clicked. prevent auto-closing...
- if (CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam), MPCF_CONTACTMENU), (LPARAM)hContact))
+ if (CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam), MPCF_CONTACTMENU), hContact))
return DefWindowProc(hwnd, message, wParam, lParam);
break;
}
diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp
index ba355b9895..80c4643996 100644
--- a/plugins/QuickContacts/src/quickcontacts.cpp
+++ b/plugins/QuickContacts/src/quickcontacts.cpp
@@ -638,7 +638,7 @@ LRESULT CALLBACK EditProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
break;
case TRUE:
- SendMessage(GetParent(hdlg),CB_SHOWDROPDOWN,(WPARAM)FALSE,0);
+ SendMessage(GetParent(hdlg),CB_SHOWDROPDOWN,FALSE,0);
break;
}
}
@@ -695,7 +695,7 @@ LRESULT CALLBACK HookProc(int code, WPARAM wparam, LPARAM lparam)
break;
case TRUE:
- SendMessage(GetDlgItem(hwndMain, IDC_USERNAME), CB_SHOWDROPDOWN, (WPARAM)FALSE, 0);
+ SendMessage(GetDlgItem(hwndMain, IDC_USERNAME), CB_SHOWDROPDOWN, FALSE, 0);
break;
}
}
@@ -809,7 +809,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
FillButton(hwndDlg, IDC_HISTORY, LPGENT("Open history"), hasNewHotkeyModule ? NULL : _T("Ctrl+H"), LoadSkinnedIcon(SKINICON_OTHER_HISTORY));
FillButton(hwndDlg, IDC_MENU, LPGENT("Open contact menu"), hasNewHotkeyModule ? NULL : _T("Ctrl+M"), LoadSkinnedIcon(SKINICON_OTHER_DOWNARROW));
- SendDlgItemMessage(hwndDlg, IDC_USERNAME, CB_SETEXTENDEDUI, (WPARAM)TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_USERNAME, CB_SETEXTENDEDUI, TRUE, 0);
Utils_RestoreWindowPositionNoSize(hwndDlg, NULL, MODULE_NAME, "window");
diff --git a/plugins/Quotes/src/QuoteInfoDlg.cpp b/plugins/Quotes/src/QuoteInfoDlg.cpp
index 059ff40ae8..f8e70ac6d0 100644
--- a/plugins/Quotes/src/QuoteInfoDlg.cpp
+++ b/plugins/Quotes/src/QuoteInfoDlg.cpp
@@ -210,7 +210,7 @@ namespace
assert(hWL);
WindowList_Add(hWL,hdlg,hContact);
- ::SetWindowLongPtr(hdlg, GWLP_USERDATA, (LPARAM)hContact);
+ ::SetWindowLongPtr(hdlg, GWLP_USERDATA, hContact);
Utils_RestoreWindowPositionNoSize(hdlg, hContact, QUOTES_MODULE_NAME, WINDOW_PREFIX_INFO);
::ShowWindow(hdlg,SW_SHOW);
}
diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp
index 336bd4d679..764e658d81 100644
--- a/plugins/Scriver/src/chat/window.cpp
+++ b/plugins/Scriver/src/chat/window.cpp
@@ -1492,7 +1492,7 @@ static INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR
if (CallService(MS_CLIST_GETEVENT, (WPARAM)si->hContact, 0))
CallService(MS_CLIST_REMOVEEVENT, (WPARAM)si->hContact, (LPARAM)GC_FAKE_EVENT);
si->wState &= ~STATE_TALK;
- db_set_w(si->hContact, si->pszModule, "ApparentMode", (LPARAM)0);
+ db_set_w(si->hContact, si->pszModule, "ApparentMode", 0);
SendMessage(hwndDlg, GC_CLOSEWINDOW, 0, 0);
return TRUE;
@@ -1627,7 +1627,7 @@ LABEL_SHOWWINDOW:
pci->SetActiveSession(si->ptszID, si->pszModule);
if (db_get_w(si->hContact, si->pszModule, "ApparentMode", 0) != 0)
- db_set_w(si->hContact, si->pszModule, "ApparentMode", (LPARAM)0);
+ db_set_w(si->hContact, si->pszModule, "ApparentMode", 0);
if (CallService(MS_CLIST_GETEVENT, (WPARAM)si->hContact, 0))
CallService(MS_CLIST_REMOVEEVENT, (WPARAM)si->hContact, (LPARAM)GC_FAKE_EVENT);
break;
diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp
index 097542c3a7..95b95325bb 100644
--- a/plugins/Scriver/src/msgoptions.cpp
+++ b/plugins/Scriver/src/msgoptions.cpp
@@ -710,7 +710,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam,
SendDlgItemMessage(hwndDlg, IDC_LOG, EM_SETPARAFORMAT, 0, (LPARAM)&pf2);
SendDlgItemMessage(hwndDlg, IDC_LOG, EM_SETEDITSTYLE, SES_EXTENDBACKCOLOR, SES_EXTENDBACKCOLOR);
SendDlgItemMessage(hwndDlg, IDC_LOG, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(0, 0));
- SendDlgItemMessage(hwndDlg, IDC_LOG, EM_AUTOURLDETECT, (WPARAM)TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_LOG, EM_AUTOURLDETECT, TRUE, 0);
SendDlgItemMessage(hwndDlg, IDC_LOG, EM_SETOLECALLBACK, 0, (LPARAM)& reOleCallback);
}
ShowPreview(hwndDlg);
@@ -823,9 +823,9 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam,
static void ResetCList(HWND hwndDlg)
{
if (CallService(MS_CLUI_GETCAPS, 0, 0) & CLUIF_DISABLEGROUPS && !db_get_b(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT))
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, (WPARAM)FALSE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, FALSE, 0);
else
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, (WPARAM)TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, TRUE, 0);
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETHIDEEMPTYGROUPS, 1, 0);
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETGREYOUTFLAGS, 0, 0);
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETLEFTMARGIN, 2, 0);
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp
index cb5212c82e..82164abd1b 100644
--- a/plugins/Scriver/src/msgs.cpp
+++ b/plugins/Scriver/src/msgs.cpp
@@ -103,7 +103,7 @@ static int MessageEventAdded(WPARAM hContact, LPARAM lParam)
if (dbei.flags & DBEF_SENT || !DbEventIsMessageOrCustom(&dbei))
return 0;
- CallServiceSync(MS_CLIST_REMOVEEVENT, hContact, (LPARAM)1);
+ CallServiceSync(MS_CLIST_REMOVEEVENT, hContact, 1);
/* does a window for the contact exist? */
if (hwnd == NULL) {
/* new message */
diff --git a/plugins/Scriver/src/msgwindow.cpp b/plugins/Scriver/src/msgwindow.cpp
index 5a13a81d9d..2cb4052ad9 100644
--- a/plugins/Scriver/src/msgwindow.cpp
+++ b/plugins/Scriver/src/msgwindow.cpp
@@ -582,7 +582,7 @@ LRESULT CALLBACK TabCtrlProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
SetParent(hChild, hParent);
SendMessage(GetParent(hwnd), CM_REMOVECHILD, 0, (LPARAM)hChild);
SendMessage(hChild, DM_SETPARENT, 0, (LPARAM)hParent);
- SendMessage(hParent, CM_ADDCHILD, (WPARAM)hChild, (LPARAM)hContact);
+ SendMessage(hParent, CM_ADDCHILD, (WPARAM)hChild, hContact);
SendMessage(hChild, DM_UPDATETABCONTROL, 0, 0);
SendMessage(hParent, CM_ACTIVATECHILD, 0, (LPARAM)hChild);
NotifyLocalWinEvent(hContact, hChild, MSG_WINDOW_EVT_OPENING);
diff --git a/plugins/SecureIM/src/svcs_clist.cpp b/plugins/SecureIM/src/svcs_clist.cpp
index c12a4d1162..a25f9f91f4 100644
--- a/plugins/SecureIM/src/svcs_clist.cpp
+++ b/plugins/SecureIM/src/svcs_clist.cpp
@@ -32,7 +32,7 @@ int __cdecl onContactSettingChanged(WPARAM hContact, LPARAM lParam)
return 0;
}
-// wParam=(WPARAM)(HANDLE)hContact
+// wParam=(MCONTACT)hContact
// lParam=0
int __cdecl onContactAdded(WPARAM wParam,LPARAM lParam)
{
@@ -41,7 +41,7 @@ int __cdecl onContactAdded(WPARAM wParam,LPARAM lParam)
}
-// wParam=(WPARAM)(HANDLE)hContact
+// wParam=(MCONTACT)hContact
// lParam=0
int __cdecl onContactDeleted(WPARAM wParam,LPARAM lParam)
{
diff --git a/plugins/SeenPlugin/src/history.cpp b/plugins/SeenPlugin/src/history.cpp
index c101a07537..9c0f0d1ce6 100644
--- a/plugins/SeenPlugin/src/history.cpp
+++ b/plugins/SeenPlugin/src/history.cpp
@@ -200,7 +200,7 @@ INT_PTR CALLBACK HistoryDlgProc(HWND hwndDlg, UINT Message, WPARAM wparam, LPARA
case WM_COMMAND:
hContact=(MCONTACT)GetWindowLongPtr(hwndDlg,GWLP_USERDATA);
- if (CallService(MS_CLIST_MENUPROCESSCOMMAND,MAKEWPARAM(LOWORD(wparam),MPCF_CONTACTMENU),(LPARAM)hContact))
+ if (CallService(MS_CLIST_MENUPROCESSCOMMAND,MAKEWPARAM(LOWORD(wparam),MPCF_CONTACTMENU), hContact))
break;
switch(LOWORD(wparam)) {
@@ -282,7 +282,7 @@ void ShowHistory(MCONTACT hContact, BYTE isAlert)
{
HWND hHistoryDlg = WindowList_Find(hWindowList,hContact);
if (hHistoryDlg == NULL) {
- hHistoryDlg = CreateDialogParam(hInstance,MAKEINTRESOURCE(IDD_HISTORY),NULL,HistoryDlgProc,(LPARAM)hContact);
+ hHistoryDlg = CreateDialogParam(hInstance,MAKEINTRESOURCE(IDD_HISTORY),NULL,HistoryDlgProc,hContact);
LoadHistoryList(hContact, hHistoryDlg, IDC_HISTORYLIST);
WindowList_Add(hWindowList,hHistoryDlg,hContact);
}
diff --git a/plugins/SendScreenshotPlus/src/UAboutForm.cpp b/plugins/SendScreenshotPlus/src/UAboutForm.cpp
index 7fe37b58c5..ed86552c97 100644
--- a/plugins/SendScreenshotPlus/src/UAboutForm.cpp
+++ b/plugins/SendScreenshotPlus/src/UAboutForm.cpp
@@ -138,7 +138,7 @@ LRESULT TfrmAbout::wmInitdialog(WPARAM wParam, LPARAM lParam) {
//init controls
btnPageClick();
- SendMessage(GetDlgItem(m_hWnd, IDA_CONTRIBLINK), BUTTONSETDEFAULT, (WPARAM)1, NULL);
+ SendMessage(GetDlgItem(m_hWnd, IDA_CONTRIBLINK), BUTTONSETDEFAULT, 1, NULL);
TranslateDialogDefault(m_hWnd);
return FALSE;
diff --git a/plugins/SendScreenshotPlus/src/UMainForm.cpp b/plugins/SendScreenshotPlus/src/UMainForm.cpp
index 0ee9533ce9..704677840c 100644
--- a/plugins/SendScreenshotPlus/src/UMainForm.cpp
+++ b/plugins/SendScreenshotPlus/src/UMainForm.cpp
@@ -356,7 +356,7 @@ void TfrmMain::wmInitdialog(WPARAM wParam, LPARAM lParam) {
HICON hIcon = IcoLib_GetIcon(ICO_PLUG_OK);
SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
SetWindowText(hCtrl, TranslateT("&Capture"));
- SendMessage(hCtrl, BUTTONSETDEFAULT, (WPARAM)1, NULL);
+ SendMessage(hCtrl, BUTTONSETDEFAULT, 1, NULL);
}
// CheckDlgButton(m_hWnd,ID_chkEditor, m_opt_chkEditor ? BST_CHECKED : BST_UNCHECKED);
diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp
index af2562aff3..81442e02e1 100644
--- a/plugins/SimpleStatusMsg/src/awaymsg.cpp
+++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp
@@ -343,7 +343,7 @@ static INT_PTR GoToURLMsgCommand(WPARAM wParam, LPARAM lParam)
if (szMsgURL)
{
lstrcpynA(szMsgURL, szURL, i + 1);
- CallService(MS_UTILS_OPENURL, (WPARAM)1, (LPARAM)szMsgURL);
+ CallService(MS_UTILS_OPENURL, 1, (LPARAM)szMsgURL);
mir_free(szMsgURL);
}
}
diff --git a/plugins/Spamotron/src/spamotron.cpp b/plugins/Spamotron/src/spamotron.cpp
index f913d52078..20f4b4fbb5 100644
--- a/plugins/Spamotron/src/spamotron.cpp
+++ b/plugins/Spamotron/src/spamotron.cpp
@@ -71,7 +71,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam)
hContact = (MCONTACT)*(PDWORD(dbei->pBlob+sizeof(DWORD)));
// get maximum length of the message a protocol supports
- maxmsglen = CallProtoService(dbei->szModule, PS_GETCAPS, PFLAG_MAXLENOFMESSAGE, (LPARAM)hContact);
+ maxmsglen = CallProtoService(dbei->szModule, PS_GETCAPS, PFLAG_MAXLENOFMESSAGE, hContact);
/*** Dequeue and learn messages ***/
diff --git a/plugins/StatusPlugins/confirmdialog.cpp b/plugins/StatusPlugins/confirmdialog.cpp
index cc8e608c84..cb18098f54 100644
--- a/plugins/StatusPlugins/confirmdialog.cpp
+++ b/plugins/StatusPlugins/confirmdialog.cpp
@@ -83,7 +83,7 @@ static INT_PTR CALLBACK StatusMessageDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam
if (protoSetting->szMsg != NULL)
GetDlgItemText(hwndDlg, IDC_STSMSG, protoSetting->szMsg, len+1);
}
- SendMessage(GetParent(hwndDlg), UM_STSMSGDLGCLOSED, (WPARAM)TRUE, 0);
+ SendMessage(GetParent(hwndDlg), UM_STSMSGDLGCLOSED, TRUE, 0);
EndDialog(hwndDlg, IDC_OK);
}
break;
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp
index 1b690f5aaf..94597d25d5 100644
--- a/plugins/TabSRMM/src/contactcache.cpp
+++ b/plugins/TabSRMM/src/contactcache.cpp
@@ -625,7 +625,7 @@ int CContactCache::getMaxMessageLength()
MCONTACT hContact = getActiveContact();
LPCSTR szProto = getActiveProto();
if (szProto) {
- m_nMax = CallProtoService(szProto, PS_GETCAPS, PFLAG_MAXLENOFMESSAGE, (LPARAM)hContact);
+ m_nMax = CallProtoService(szProto, PS_GETCAPS, PFLAG_MAXLENOFMESSAGE, hContact);
if (m_nMax) {
if (M.GetByte("autosplit", 0)) {
if (m_hwnd)
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp
index 05c702a382..12ba5216fa 100644
--- a/plugins/TabSRMM/src/container.cpp
+++ b/plugins/TabSRMM/src/container.cpp
@@ -47,7 +47,7 @@ static int ServiceParamsOK(ButtonItem *item, WPARAM *wParam, LPARAM *lParam, MCO
if (item->dwFlags & BUTTON_PASSHCONTACTW)
*wParam = hContact;
else if (item->dwFlags & BUTTON_PASSHCONTACTL)
- *lParam = (LPARAM)hContact;
+ *lParam = hContact;
return 1;
}
return 1; // doesn't need a paramter
@@ -883,7 +883,7 @@ panel_found:
hMenu = (HMENU) CallService(MS_CLIST_MENUBUILDCONTACT, hContact, 0);
iSel = TrackPopupMenu(hMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hwndDlg, NULL);
if (iSel)
- CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(iSel), MPCF_CONTACTMENU), (LPARAM)hContact);
+ CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(iSel), MPCF_CONTACTMENU), hContact);
DestroyMenu(hMenu);
}
}
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index b1cfaba7dc..b39f2da11d 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -1142,13 +1142,13 @@ HWND TSAPI DM_CreateClist(TWindowData *dat)
SendMessage(hwndClist, CLM_SETCHECKMARK, (WPARAM)hItem, 1);
if (CallService(MS_CLUI_GETCAPS, 0, 0) & CLUIF_DISABLEGROUPS && !M.GetByte("CList", "UseGroups", SETTING_USEGROUPS_DEFAULT))
- SendMessage(hwndClist, CLM_SETUSEGROUPS, (WPARAM)FALSE, 0);
+ SendMessage(hwndClist, CLM_SETUSEGROUPS, FALSE, 0);
else
- SendMessage(hwndClist, CLM_SETUSEGROUPS, (WPARAM)TRUE, 0);
+ SendMessage(hwndClist, CLM_SETUSEGROUPS, TRUE, 0);
if (CallService(MS_CLUI_GETCAPS, 0, 0) & CLUIF_HIDEEMPTYGROUPS && M.GetByte("CList", "HideEmptyGroups", SETTING_USEGROUPS_DEFAULT))
- SendMessage(hwndClist, CLM_SETHIDEEMPTYGROUPS, (WPARAM)TRUE, 0);
+ SendMessage(hwndClist, CLM_SETHIDEEMPTYGROUPS, TRUE, 0);
else
- SendMessage(hwndClist, CLM_SETHIDEEMPTYGROUPS, (WPARAM)FALSE, 0);
+ SendMessage(hwndClist, CLM_SETHIDEEMPTYGROUPS, FALSE, 0);
SendMessage(hwndClist, CLM_FIRST + 106, 0, 1);
SendMessage(hwndClist, CLM_AUTOREBUILD, 0, 0);
if (hwndClist)
@@ -1429,7 +1429,7 @@ void TSAPI DM_Typing(TWindowData *dat, bool fForceOff)
if (dat_active && dat_active->bType == SESSIONTYPE_IM)
SendMessage(hwndContainer, DM_UPDATETITLE, 0, 0);
else
- SendMessage(hwndContainer, DM_UPDATETITLE, (WPARAM)dat->pContainer->hwndActive, (LPARAM)1);
+ SendMessage(hwndContainer, DM_UPDATETITLE, (WPARAM)dat->pContainer->hwndActive, 1);
if (!(dat->pContainer->dwFlags & CNT_NOFLASH) && PluginConfig.m_FlashOnMTN)
ReflashContainer(dat->pContainer);
}
diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp
index 691b5ff067..80b4fdf7d3 100644
--- a/plugins/TabSRMM/src/infopanel.cpp
+++ b/plugins/TabSRMM/src/infopanel.cpp
@@ -1372,7 +1372,7 @@ CTip::CTip(const HWND hwndParent, const MCONTACT hContact, const TCHAR *pszText,
m_hRich = ::CreateWindowEx(0, RICHEDIT_CLASS, _T(""), WS_CHILD | ES_MULTILINE | ES_AUTOVSCROLL | ES_NOHIDESEL | ES_READONLY | WS_VSCROLL | WS_TABSTOP,
0, 0, 40, 40, m_hwnd, reinterpret_cast<HMENU>(1000), g_hInst, NULL);
- ::SendMessage(m_hRich, EM_AUTOURLDETECT, (WPARAM)TRUE, 0);
+ ::SendMessage(m_hRich, EM_AUTOURLDETECT, TRUE, 0);
::SendMessage(m_hRich, EM_SETEVENTMASK, 0, ENM_LINK);
::SendMessage(m_hRich, WM_SETFONT, (WPARAM)CInfoPanel::m_ipConfig.hFonts[IPFONTID_STATUS], 0);
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp
index be9b230e48..44c1cd65cb 100644
--- a/plugins/TabSRMM/src/mim.cpp
+++ b/plugins/TabSRMM/src/mim.cpp
@@ -412,7 +412,7 @@ int CMimAPI::TypingMessage(WPARAM hContact, LPARAM lParam)
cle.hIcon = PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING];
cle.pszService = "SRMsg/TypingMessage";
cle.ptszTooltip = szTip;
- CallServiceSync(MS_CLIST_REMOVEEVENT, hContact, (LPARAM)1);
+ CallServiceSync(MS_CLIST_REMOVEEVENT, hContact, 1);
CallServiceSync(MS_CLIST_ADDEVENT, hContact, (LPARAM)&cle);
}
}
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index 6ffbed423c..6de97204e3 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -1432,7 +1432,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
if (PluginConfig.g_hMenuTrayUnread != 0 && dat->hContact != 0 && dat->szProto != NULL)
UpdateTrayMenu(0, dat->wStatus, dat->szProto, dat->szStatus, dat->hContact, FALSE);
- SendDlgItemMessage(hwndDlg, IDC_LOG, EM_AUTOURLDETECT, (WPARAM)TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_LOG, EM_AUTOURLDETECT, TRUE, 0);
SendDlgItemMessage(hwndDlg, IDC_LOG, EM_EXLIMITTEXT, 0, 0x80000000);
/*
* subclassing stuff
@@ -2015,7 +2015,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
if (msg == WM_KEYDOWN && wp == VK_TAB) {
if (PluginConfig.m_AllowTab) {
if (((NMHDR*)lParam)->idFrom == IDC_MESSAGE)
- SendMessage(GetDlgItem(hwndDlg, IDC_MESSAGE), EM_REPLACESEL, (WPARAM)FALSE, (LPARAM)"\t");
+ SendMessage(GetDlgItem(hwndDlg, IDC_MESSAGE), EM_REPLACESEL, FALSE, (LPARAM)"\t");
_clrMsgFilter(lParam);
if (((NMHDR*)lParam)->idFrom != IDC_MESSAGE)
SetFocus(GetDlgItem(hwndDlg, IDC_MESSAGE));
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp
index e93ec87899..7bc3a6bbc2 100644
--- a/plugins/TabSRMM/src/msgoptions.cpp
+++ b/plugins/TabSRMM/src/msgoptions.cpp
@@ -825,9 +825,9 @@ static void ResetCList(HWND hwndDlg)
int i;
if (CallService(MS_CLUI_GETCAPS, 0, 0) & CLUIF_DISABLEGROUPS && !M.GetByte("CList", "UseGroups", SETTING_USEGROUPS_DEFAULT))
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, (WPARAM)FALSE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, FALSE, 0);
else
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, (WPARAM)TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, TRUE, 0);
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETHIDEEMPTYGROUPS, 1, 0);
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETGREYOUTFLAGS, 0, 0);
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETLEFTMARGIN, 2, 0);
diff --git a/plugins/TabSRMM/src/sendlater.cpp b/plugins/TabSRMM/src/sendlater.cpp
index 0d2b7c828f..9845968dbc 100644
--- a/plugins/TabSRMM/src/sendlater.cpp
+++ b/plugins/TabSRMM/src/sendlater.cpp
@@ -277,7 +277,7 @@ void CSendLater::processSingleContact(const MCONTACT hContact)
DBCONTACTENUMSETTINGS ces = {0};
ces.pfnEnumProc = CSendLater::addStub;
ces.szModule = "SendLater";
- ces.lParam = (LPARAM)hContact;
+ ces.lParam = hContact;
CallService(MS_DB_CONTACT_ENUMSETTINGS, hContact, (LPARAM)&ces);
}
@@ -565,7 +565,7 @@ LRESULT CSendLater::qMgrAddFilter(const MCONTACT hContact, const TCHAR* tszNick)
lr = ::SendMessage(m_hwndFilter, CB_FINDSTRING, 0, reinterpret_cast<LPARAM>(tszNick));
if (lr == CB_ERR) {
lr = ::SendMessage(m_hwndFilter, CB_INSERTSTRING, -1, reinterpret_cast<LPARAM>(tszNick));
- ::SendMessage(m_hwndFilter, CB_SETITEMDATA, lr, (LPARAM)hContact);
+ ::SendMessage(m_hwndFilter, CB_SETITEMDATA, lr, hContact);
if (hContact == m_hFilter)
m_sel = lr;
}
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp
index 9458148bd2..859b821378 100644
--- a/plugins/TabSRMM/src/sendqueue.cpp
+++ b/plugins/TabSRMM/src/sendqueue.cpp
@@ -867,7 +867,7 @@ int SendQueue::doSendLater(int iJobIndex, TWindowData *dat, MCONTACT hContact, b
}
else {
mir_snprintf(tszMsg, required, "%s%s", utf_header, job->szSendBuffer);
- sendLater->addJob(tszMsg, (LPARAM)hContact);
+ sendLater->addJob(tszMsg, hContact);
}
mir_free(utf_header);
mir_free(tszMsg);
@@ -887,7 +887,7 @@ int SendQueue::doSendLater(int iJobIndex, TWindowData *dat, MCONTACT hContact, b
if (fIsSendLater)
db_set_s(hContact ? hContact : job->hOwner, "SendLater", szKeyName, utf);
else
- sendLater->addJob(utf, (LPARAM)hContact);
+ sendLater->addJob(utf, hContact);
mir_free(utf);
mir_free(tszMsg);
}
diff --git a/plugins/TabSRMM/src/userprefs.cpp b/plugins/TabSRMM/src/userprefs.cpp
index 0d9bc82499..bd5f5ee6b3 100644
--- a/plugins/TabSRMM/src/userprefs.cpp
+++ b/plugins/TabSRMM/src/userprefs.cpp
@@ -479,14 +479,14 @@ INT_PTR CALLBACK DlgProcUserPrefsFrame(HWND hwndDlg, UINT msg, WPARAM wParam, LP
memset(&tci, 0, sizeof(tci));
tci.cchTextMax = 100;
tci.mask = TCIF_PARAM | TCIF_TEXT;
- tci.lParam = (LPARAM)CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_USERPREFS), hwndDlg, DlgProcUserPrefs, (LPARAM)hContact);
+ tci.lParam = (LPARAM)CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_USERPREFS), hwndDlg, DlgProcUserPrefs, hContact);
tci.pszText = TranslateT("General");
TabCtrl_InsertItem(GetDlgItem(hwndDlg, IDC_OPTIONSTAB), 0, &tci);
MoveWindow((HWND)tci.lParam, 6, DPISCALEY_S(32), rcClient.right - 12, rcClient.bottom - DPISCALEY_S(80), 1);
ShowWindow((HWND)tci.lParam, SW_SHOW);
EnableThemeDialogTexture((HWND)tci.lParam, ETDT_ENABLETAB);
- tci.lParam = (LPARAM)CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_USERPREFS1), hwndDlg, DlgProcUserPrefsLogOptions, (LPARAM)hContact);
+ tci.lParam = (LPARAM)CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_USERPREFS1), hwndDlg, DlgProcUserPrefsLogOptions, hContact);
tci.pszText = TranslateT("Message Log");
TabCtrl_InsertItem(GetDlgItem(hwndDlg, IDC_OPTIONSTAB), 1, &tci);
MoveWindow((HWND)tci.lParam, 6, DPISCALEY_S(32), rcClient.right - 12, rcClient.bottom - DPISCALEY_S(80), 1);
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp
index ace7b4e70a..ae06aa7ee8 100644
--- a/plugins/TabSRMM/src/utils.cpp
+++ b/plugins/TabSRMM/src/utils.cpp
@@ -1280,7 +1280,7 @@ INT_PTR CALLBACK CWarning::dlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
::SetWindowTextW(hwnd, TranslateT("TabSRMM warning message"));
::SendMessage(hwnd, WM_SETICON, ICON_BIG, reinterpret_cast<LPARAM>(::LoadSkinnedIconBig(SKINICON_OTHER_MIRANDA)));
::SendMessage(hwnd, WM_SETICON, ICON_SMALL, reinterpret_cast<LPARAM>(::LoadSkinnedIcon(SKINICON_OTHER_MIRANDA)));
- ::SendDlgItemMessage(hwnd, IDC_WARNTEXT, EM_AUTOURLDETECT, (WPARAM)TRUE, 0);
+ ::SendDlgItemMessage(hwnd, IDC_WARNTEXT, EM_AUTOURLDETECT, TRUE, 0);
::SendDlgItemMessage(hwnd, IDC_WARNTEXT, EM_SETEVENTMASK, 0, ENM_LINK);
mir_sntprintf(temp, 1024, RTF_DEFAULT_HEADER, 0, 0, 0, 30*15);
diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp
index 505a136068..a1eb20272c 100644
--- a/plugins/TrafficCounter/src/TrafficCounter.cpp
+++ b/plugins/TrafficCounter/src/TrafficCounter.cpp
@@ -1089,7 +1089,7 @@ void CreateTrafficWindow(HWND hCluiWnd)
f.TBname = ("Traffic counter");
f.name = ("Traffic counter");
// Ñîçäà¸ì ôðåéì
- Traffic_FrameID = (HANDLE)CallService(MS_CLIST_FRAMES_ADDFRAME,(WPARAM)&f,(LPARAM)0);
+ Traffic_FrameID = (HANDLE)CallService(MS_CLIST_FRAMES_ADDFRAME,(WPARAM)&f,0);
CallService(MS_SKINENG_REGISTERPAINTSUB,(WPARAM)f.hWnd,(LPARAM)TrafficCounter_PaintCallbackProc);
}
diff --git a/plugins/Variables/src/help.cpp b/plugins/Variables/src/help.cpp
index 02fe91ceb1..e799d1f0df 100644
--- a/plugins/Variables/src/help.cpp
+++ b/plugins/Variables/src/help.cpp
@@ -499,7 +499,7 @@ static BOOL CALLBACK processTokenListMessage(HWND hwndDlg, UINT msg, WPARAM wPar
ZeroMemory(tokenString, (len+1)*sizeof(TCHAR));
mir_sntprintf(tokenString, len + 1, _T("%c%s%c"), (tr->flags & TRF_FIELD) ? FIELD_CHAR : FUNC_CHAR, tr->tszTokenString, (tr->flags & TRF_FIELD) ? FIELD_CHAR : '(');
- SendDlgItemMessage(hwndInputDlg, IDC_TESTSTRING, EM_REPLACESEL, (WPARAM)TRUE, (LPARAM)tokenString);
+ SendDlgItemMessage(hwndInputDlg, IDC_TESTSTRING, EM_REPLACESEL, TRUE, (LPARAM)tokenString);
mir_free(tokenString);
SetFocus(GetDlgItem(hwndInputDlg, IDC_TESTSTRING));
}
diff --git a/plugins/Weather/src/weather_userinfo.cpp b/plugins/Weather/src/weather_userinfo.cpp
index ad3b190a6d..d1e0404fb1 100644
--- a/plugins/Weather/src/weather_userinfo.cpp
+++ b/plugins/Weather/src/weather_userinfo.cpp
@@ -117,7 +117,7 @@ INT_PTR CALLBACK DlgProcUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
case IDC_MOREDETAIL:
HWND hMoreDataDlg = WindowList_Find(hDataWindowList, hContact);
if (hMoreDataDlg == NULL)
- hMoreDataDlg = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_BRIEF), NULL, DlgProcMoreData, (LPARAM)hContact);
+ hMoreDataDlg = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_BRIEF), NULL, DlgProcMoreData, hContact);
else {
SetForegroundWindow(hMoreDataDlg);
SetFocus(hMoreDataDlg);
diff --git a/plugins/WebView/src/webview_alerts.cpp b/plugins/WebView/src/webview_alerts.cpp
index 21062d72bb..2b9c921b6b 100644
--- a/plugins/WebView/src/webview_alerts.cpp
+++ b/plugins/WebView/src/webview_alerts.cpp
@@ -818,7 +818,7 @@ int DataWndAlertCommand(WPARAM wParam, LPARAM lParam)
if ( WindowList_Find(hWindowList, hContact))
return 0;
- HWND hwndDlg = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_DISPLAY_DATA), NULL, DlgProcDisplayData, (LPARAM)hContact);
+ HWND hwndDlg = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_DISPLAY_DATA), NULL, DlgProcDisplayData, hContact);
HWND hTopmost = db_get_b(hContact, MODULENAME, ON_TOP_KEY, 0) ? HWND_TOPMOST : HWND_NOTOPMOST;
SendDlgItemMessage(hwndDlg, IDC_STICK_BUTTON, BM_SETIMAGE, IMAGE_ICON, (LPARAM) ((HICON) LoadImage(hInst, MAKEINTRESOURCE(IDI_STICK), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0)));
if ( db_get_b(NULL, MODULENAME, SAVE_INDIVID_POS_KEY, 0))
diff --git a/plugins/WhenWasIt/src/dlg_handlers.cpp b/plugins/WhenWasIt/src/dlg_handlers.cpp
index c67a16f68b..ccf8737629 100644
--- a/plugins/WhenWasIt/src/dlg_handlers.cpp
+++ b/plugins/WhenWasIt/src/dlg_handlers.cpp
@@ -496,7 +496,7 @@ INT_PTR CALLBACK DlgProcAddBirthday(HWND hWnd, UINT msg, WPARAM wParam, LPARAM l
else SaveBirthday(hContact, 0, 0, 0, SAVE_MODE_DELETEALL);
if (hBirthdaysDlg != NULL)
- SendMessage(hBirthdaysDlg, WWIM_UPDATE_BIRTHDAY, (WPARAM)hContact, NULL);
+ SendMessage(hBirthdaysDlg, WWIM_UPDATE_BIRTHDAY, hContact, NULL);
SendMessage(hWnd, WM_CLOSE, 0, 0);
}
@@ -594,7 +594,7 @@ int UpdateBirthdayEntry(HWND hList, MCONTACT hContact, int entry, int bShowAll,
LVITEM item = { 0 };
item.mask = LVIF_TEXT | LVIF_PARAM;
item.iItem = entry;
- item.lParam = (LPARAM)hContact;
+ item.lParam = hContact;
item.pszText = ptszAccName;
if (bAdd)
@@ -657,7 +657,7 @@ static LRESULT CALLBACK BirthdaysListSubclassProc(HWND hWnd, UINT msg, WPARAM wP
item.iItem = i;
ListView_GetItem(hWnd, &item);
hContact = (MCONTACT)item.lParam;
- CallService(MS_WWI_ADD_BIRTHDAY, (WPARAM)hContact, 0);
+ CallService(MS_WWI_ADD_BIRTHDAY, hContact, 0);
}
}
break;
diff --git a/plugins/WhoUsesMyFiles/src/wumfplug.cpp b/plugins/WhoUsesMyFiles/src/wumfplug.cpp
index 517afbe13c..701bcb4a9e 100644
--- a/plugins/WhoUsesMyFiles/src/wumfplug.cpp
+++ b/plugins/WhoUsesMyFiles/src/wumfplug.cpp
@@ -93,7 +93,7 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA
PUDeletePopup(hWnd);
break;
case IDM_SHOW:
- CallService(MS_WUMF_CONNECTIONSSHOW, (WPARAM)0, (LPARAM)0);
+ CallService(MS_WUMF_CONNECTIONSSHOW, 0, 0);
return TRUE;
}
@@ -105,7 +105,7 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA
break;
case WM_CONTEXTMENU:
- CallService(MS_WUMF_CONNECTIONSSHOW, (WPARAM)0, (LPARAM)0);
+ CallService(MS_WUMF_CONNECTIONSSHOW, 0, 0);
break;
case UM_FREEPLUGINDATA:
diff --git a/plugins/XSoundNotify/src/options.cpp b/plugins/XSoundNotify/src/options.cpp
index 9f6dc980d4..cd3bec8380 100644
--- a/plugins/XSoundNotify/src/options.cpp
+++ b/plugins/XSoundNotify/src/options.cpp
@@ -73,7 +73,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
TCHAR *nick = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
TCHAR *value = (TCHAR *)mir_alloc(sizeof(TCHAR) * (_tcslen(uid) + _tcslen(nick) + 4));
mir_sntprintf(value, _tcslen(uid) + _tcslen(nick) + 4, _T("%s (%s)"), nick, uid);
- SendMessage(GetDlgItem(hwndDlg, IDC_OPT_COMBO_USERS), CB_SETITEMDATA, SendMessage(GetDlgItem(hwndDlg, IDC_OPT_COMBO_USERS), CB_ADDSTRING, 0, (LPARAM)value), (LPARAM)hContact);
+ SendMessage(GetDlgItem(hwndDlg, IDC_OPT_COMBO_USERS), CB_SETITEMDATA, SendMessage(GetDlgItem(hwndDlg, IDC_OPT_COMBO_USERS), CB_ADDSTRING, 0, (LPARAM)value), hContact);
mir_free(value);
db_free(&dbvuid);
}
diff --git a/plugins/YAMN/src/browser/mailbrowser.cpp b/plugins/YAMN/src/browser/mailbrowser.cpp
index 47db479fc0..0d60cd6e18 100644
--- a/plugins/YAMN/src/browser/mailbrowser.cpp
+++ b/plugins/YAMN/src/browser/mailbrowser.cpp
@@ -615,7 +615,7 @@ int AddNewMailsToListView(HWND hListView,HACCOUNT ActualAccount,struct CMailNumb
}
if ((msgq->Flags & YAMN_MSG_UNSEEN) && (ActualAccount->NewMailN.Flags & YAMN_ACC_KBN))
- CallService(MS_KBDNOTIFY_EVENTSOPENED,(WPARAM)1,NULL);
+ CallService(MS_KBDNOTIFY_EVENTSOPENED,1,NULL);
if (FromStrNew)
delete[] FromStr;
@@ -891,7 +891,7 @@ LRESULT CALLBACK NewMailPopupProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam
#endif
}
if ((Account->NewMailN.Flags & YAMN_ACC_CONT) && !(Account->NewMailN.Flags & YAMN_ACC_CONTNOEVENT)) {
- CallService(MS_CLIST_REMOVEEVENT,hContact,(LPARAM)hContact);
+ CallService(MS_CLIST_REMOVEEVENT, hContact, hContact);
}
}
// fall through
@@ -1330,7 +1330,7 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg,UINT msg,WPARAM wParam,LPARAM
LVCOLUMNW lvc0={LVCF_FMT | LVCF_TEXT | LVCF_WIDTH,LVCFMT_LEFT,130,iHeaderW,0,0};
LVCOLUMNW lvc1={LVCF_FMT | LVCF_TEXT | LVCF_WIDTH,LVCFMT_LEFT,400,iValueW,0,0};
SendMessageW(hListView,LVM_INSERTCOLUMNW,0,(LPARAM)&lvc0);
- SendMessageW(hListView,LVM_INSERTCOLUMNW,(WPARAM)1,(LPARAM)&lvc1);
+ SendMessageW(hListView,LVM_INSERTCOLUMNW,1,(LPARAM)&lvc1);
if (NULL != iHeaderW)
delete[] iHeaderW;
if (NULL != iValueW)
@@ -1722,14 +1722,14 @@ INT_PTR CALLBACK DlgProcYAMNMailBrowser(HWND hDlg,UINT msg,WPARAM wParam,LPARAM
LVCOLUMNW lvc2={LVCF_FMT | LVCF_TEXT | LVCF_WIDTH,LVCFMT_LEFT,SizeWidth,TranslateW(L"Size"),0,0};
LVCOLUMNW lvc3={LVCF_FMT | LVCF_TEXT | LVCF_WIDTH,LVCFMT_LEFT,SizeDate,TranslateW(L"Date"),0,0};
SendMessageW(GetDlgItem(hDlg,IDC_LISTMAILS),LVM_INSERTCOLUMNW,0,(LPARAM)&lvc0);
- SendMessageW(GetDlgItem(hDlg,IDC_LISTMAILS),LVM_INSERTCOLUMNW,(WPARAM)1,(LPARAM)&lvc1);
+ SendMessageW(GetDlgItem(hDlg,IDC_LISTMAILS),LVM_INSERTCOLUMNW,1,(LPARAM)&lvc1);
SendMessageW(GetDlgItem(hDlg,IDC_LISTMAILS),LVM_INSERTCOLUMNW,(WPARAM)2,(LPARAM)&lvc2);
SendMessageW(GetDlgItem(hDlg,IDC_LISTMAILS),LVM_INSERTCOLUMNW,(WPARAM)3,(LPARAM)&lvc3);
if ((ActualAccount->NewMailN.App != NULL) && (wcslen(ActualAccount->NewMailN.App)))
- EnableWindow(GetDlgItem(hDlg,IDC_BTNAPP),(WPARAM)TRUE);
+ EnableWindow(GetDlgItem(hDlg,IDC_BTNAPP),TRUE);
else
- EnableWindow(GetDlgItem(hDlg,IDC_BTNAPP),(WPARAM)FALSE);
+ EnableWindow(GetDlgItem(hDlg,IDC_BTNAPP),FALSE);
#ifdef DEBUG_SYNCHRO
DebugLog(SynchroFile,"MailBrowser:INIT:ActualAccountSO-read done\n");
#endif
diff --git a/plugins/YAMN/src/proto/pop3/pop3opt.cpp b/plugins/YAMN/src/proto/pop3/pop3opt.cpp
index 4d50672604..f14411fb25 100644
--- a/plugins/YAMN/src/proto/pop3/pop3opt.cpp
+++ b/plugins/YAMN/src/proto/pop3/pop3opt.cpp
@@ -587,7 +587,7 @@ INT_PTR CALLBACK DlgProcPOP3AccStatusOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM
if (ActualAccount != NULL)
{
DlgShowAccountStatus(hDlg,(WPARAM)M_SHOWACTUAL,(LPARAM)ActualAccount);
- DlgEnableAccountStatus(hDlg,(WPARAM)TRUE,(LPARAM)TRUE);
+ DlgEnableAccountStatus(hDlg,TRUE,TRUE);
}
else
{
@@ -662,7 +662,7 @@ INT_PTR CALLBACK DlgProcPOP3AccOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPara
EnableWindow(GetDlgItem(hDlg,IDC_BTNDEL),FALSE);
- DlgEnableAccount(hDlg,(WPARAM)FALSE,(LPARAM)FALSE);
+ DlgEnableAccount(hDlg,FALSE,FALSE);
DlgShowAccount(hDlg,(WPARAM)M_SHOWDEFAULT,0);
#ifdef DEBUG_SYNCHRO
@@ -735,9 +735,9 @@ INT_PTR CALLBACK DlgProcPOP3AccOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPara
DlgSetItemText(hDlg,(WPARAM)IDC_STTIMELEFT,0);
if (GetDlgItemTextA(hDlg,IDC_COMBOACCOUNT,DlgInput,sizeof(DlgInput)))
- DlgEnableAccount(hDlg,(WPARAM)TRUE,(LPARAM)FALSE);
+ DlgEnableAccount(hDlg,TRUE,FALSE);
else
- DlgEnableAccount(hDlg,(WPARAM)FALSE,(LPARAM)FALSE);
+ DlgEnableAccount(hDlg,FALSE,FALSE);
break;
case CBN_KILLFOCUS:
@@ -746,13 +746,13 @@ INT_PTR CALLBACK DlgProcPOP3AccOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPara
DlgSetItemText(hDlg,(WPARAM)IDC_STTIMELEFT,0);
EnableWindow(GetDlgItem(hDlg,IDC_BTNDEL),FALSE);
if (lstrlenA(DlgInput))
- DlgEnableAccount(hDlg,(WPARAM)TRUE,(LPARAM)TRUE);
+ DlgEnableAccount(hDlg,TRUE,TRUE);
else
- DlgEnableAccount(hDlg,(WPARAM)FALSE,(LPARAM)FALSE);
+ DlgEnableAccount(hDlg,FALSE,FALSE);
}
else {
DlgShowAccount(hDlg,(WPARAM)M_SHOWACTUAL,(LPARAM)ActualAccount);
- DlgEnableAccount(hDlg,(WPARAM)TRUE,(LPARAM)TRUE);
+ DlgEnableAccount(hDlg,TRUE,TRUE);
EnableWindow(GetDlgItem(hDlg,IDC_BTNDEL),TRUE);
}
break;
@@ -767,7 +767,7 @@ INT_PTR CALLBACK DlgProcPOP3AccOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPara
}
else {
DlgShowAccount(hDlg,(WPARAM)M_SHOWACTUAL,(LPARAM)ActualAccount);
- DlgEnableAccount(hDlg,(WPARAM)TRUE,(LPARAM)FALSE);
+ DlgEnableAccount(hDlg,TRUE,FALSE);
EnableWindow(GetDlgItem(hDlg,IDC_BTNDEL),TRUE);
}
break;
@@ -851,7 +851,7 @@ INT_PTR CALLBACK DlgProcPOP3AccOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPara
case IDC_BTNADD:
DlgSetItemText(hDlg,(WPARAM)IDC_STTIMELEFT,0);
DlgShowAccount(hDlg,(WPARAM)M_SHOWDEFAULT,0);
- DlgEnableAccount(hDlg,(WPARAM)TRUE,(LPARAM)TRUE);
+ DlgEnableAccount(hDlg,TRUE,TRUE);
EnableWindow(GetDlgItem(hDlg,IDC_BTNDEL),FALSE);
DlgSetItemTextT(hDlg, IDC_EDITNAME, TranslateT("New Account"));
{
@@ -912,7 +912,7 @@ INT_PTR CALLBACK DlgProcPOP3AccOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPara
SendDlgItemMessage(hDlg,IDC_COMBOACCOUNT,CB_DELETESTRING,(WPARAM)Result,0);
DlgSetItemText(hDlg,(WPARAM)IDC_COMBOACCOUNT,0);
- DlgEnableAccount(hDlg,(WPARAM)FALSE,0);
+ DlgEnableAccount(hDlg,FALSE,0);
DlgShowAccount(hDlg,(WPARAM)M_SHOWDEFAULT,0);
break;
@@ -1184,7 +1184,7 @@ INT_PTR CALLBACK DlgProcPOP3AccPopup(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPa
{
case WM_INITDIALOG:
{
- DlgEnableAccountPopup(hDlg,(WPARAM)FALSE,(LPARAM)FALSE);
+ DlgEnableAccountPopup(hDlg,FALSE,FALSE);
DlgShowAccountPopup(hDlg,(WPARAM)M_SHOWDEFAULT,0);
//DlgShowAccountColors(hDlg,0,(LPARAM)ActualAccount);
#ifdef DEBUG_SYNCHRO
@@ -1236,12 +1236,12 @@ INT_PTR CALLBACK DlgProcPOP3AccPopup(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPa
SendDlgItemMessage(hDlg,IDC_COMBOACCOUNT,CB_SETCURSEL,(WPARAM)index,(LPARAM)ActualAccount->Name);
DlgShowAccount(hDlg,(WPARAM)M_SHOWACTUAL,(LPARAM)ActualAccount);
DlgShowAccountColors(hDlg,0,(LPARAM)ActualAccount);
- DlgEnableAccountPopup(hDlg,(WPARAM)TRUE,(LPARAM)FALSE);
+ DlgEnableAccountPopup(hDlg,TRUE,FALSE);
}
else
{
DlgShowAccountPopup(hDlg,(WPARAM)M_SHOWDEFAULT,0);
- DlgEnableAccountPopup(hDlg,(WPARAM)FALSE,(LPARAM)FALSE);
+ DlgEnableAccountPopup(hDlg,FALSE,FALSE);
}
}
@@ -1263,15 +1263,15 @@ INT_PTR CALLBACK DlgProcPOP3AccPopup(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPa
{
DlgSetItemText(hDlg,(WPARAM)IDC_STTIMELEFT,0);
if (lstrlenA(DlgInput))
- DlgEnableAccountPopup(hDlg,(WPARAM)TRUE,(LPARAM)TRUE);
+ DlgEnableAccountPopup(hDlg,TRUE,TRUE);
else
- DlgEnableAccountPopup(hDlg,(WPARAM)FALSE,(LPARAM)FALSE);
+ DlgEnableAccountPopup(hDlg,FALSE,FALSE);
}
else
{
DlgShowAccount(hDlg,(WPARAM)M_SHOWACTUAL,(LPARAM)ActualAccount);
DlgShowAccountColors(hDlg,0,(LPARAM)ActualAccount);
- DlgEnableAccountPopup(hDlg,(WPARAM)TRUE,(LPARAM)TRUE);
+ DlgEnableAccountPopup(hDlg,TRUE,TRUE);
}
break;
case CBN_SELCHANGE:
@@ -1285,7 +1285,7 @@ INT_PTR CALLBACK DlgProcPOP3AccPopup(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPa
{
DlgShowAccount(hDlg,(WPARAM)M_SHOWACTUAL,(LPARAM)ActualAccount);
DlgShowAccountColors(hDlg,0,(LPARAM)ActualAccount);
- DlgEnableAccountPopup(hDlg,(WPARAM)TRUE,(LPARAM)FALSE);
+ DlgEnableAccountPopup(hDlg,TRUE,FALSE);
}
break;
}
diff --git a/plugins/YARelay/src/options.cpp b/plugins/YARelay/src/options.cpp
index 53f4c2badb..0f99e62859 100644
--- a/plugins/YARelay/src/options.cpp
+++ b/plugins/YARelay/src/options.cpp
@@ -61,26 +61,26 @@ static INT_PTR CALLBACK OptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_TO), CB_RESETCONTENT, 0, 0);
idx = SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_FROM), CB_ADDSTRING, 0, (LPARAM) TranslateT("!EVERYONE!"));
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_FROM), CB_SETITEMDATA, (WPARAM)idx, (LPARAM)0);
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_FROM), CB_SETCURSEL, (WPARAM)idx, (LPARAM)0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_FROM), CB_SETITEMDATA, (WPARAM)idx, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_FROM), CB_SETCURSEL, (WPARAM)idx, 0);
idx = SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_TO), CB_ADDSTRING, 0, (LPARAM) TranslateT("!DON'T FORWARD!"));
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_TO), CB_SETITEMDATA, (WPARAM)idx, (LPARAM)0);
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_TO), CB_SETCURSEL, (WPARAM)idx, (LPARAM)0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_TO), CB_SETITEMDATA, (WPARAM)idx, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_TO), CB_SETCURSEL, (WPARAM)idx, 0);
for (hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
TCHAR *ptszNick = pcli->pfnGetContactDisplayName(hContact, 0);
if (ptszNick){
idx = SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_TO), CB_ADDSTRING, 0, (LPARAM)ptszNick);
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_TO), CB_SETITEMDATA, (WPARAM)idx, (LPARAM)hContact);
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_TO), CB_SETITEMDATA, (WPARAM)idx, hContact);
idx = SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_FROM), CB_ADDSTRING, 0, (LPARAM)ptszNick);
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_FROM), CB_SETITEMDATA, (WPARAM)idx, (LPARAM)hContact);
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_FROM), CB_SETITEMDATA, (WPARAM)idx, hContact);
if (hContact == hForwardTo)
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_TO), CB_SETCURSEL, (WPARAM)idx, (LPARAM)0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_TO), CB_SETCURSEL, (WPARAM)idx, 0);
if (hContact == hForwardFrom)
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_FROM), CB_SETCURSEL, (WPARAM)idx, (LPARAM)0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_FROM), CB_SETCURSEL, (WPARAM)idx, 0);
}
}
diff --git a/plugins/wbOSD/src/options.cpp b/plugins/wbOSD/src/options.cpp
index 01dc173b0d..abd3bfd4ff 100644
--- a/plugins/wbOSD/src/options.cpp
+++ b/plugins/wbOSD/src/options.cpp
@@ -245,8 +245,8 @@ INT_PTR CALLBACK OptDlgProc(HWND hDlg,UINT msg,WPARAM wparam,LPARAM lparam)
CheckDlgButton(hDlg, IDC_CHECK7, ps->showmystatus);
SetDlgItemInt(hDlg, IDC_EDIT1, ps->distance, 0);
- SendDlgItemMessage(hDlg, IDC_SLIDER1, TBM_SETRANGE, (WPARAM)0, MAKELONG(0, 255));
- SendDlgItemMessage(hDlg, IDC_SLIDER1, TBM_SETPOS, (WPARAM)TRUE, (LPARAM)ps->alpha);
+ SendDlgItemMessage(hDlg, IDC_SLIDER1, TBM_SETRANGE, 0, MAKELONG(0, 255));
+ SendDlgItemMessage(hDlg, IDC_SLIDER1, TBM_SETPOS, TRUE, (LPARAM)ps->alpha);
{
TCHAR buf[20];
diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp
index bf04806709..77de4a71da 100644
--- a/protocols/Gadu-Gadu/src/groupchat.cpp
+++ b/protocols/Gadu-Gadu/src/groupchat.cpp
@@ -415,7 +415,7 @@ static void gg_gc_resetclistopts(HWND hwndList)
SendMessage(hwndList, CLM_SETBKCOLOR, GetSysColor(COLOR_WINDOW), 0);
SendMessage(hwndList, CLM_SETGREYOUTFLAGS, 0, 0);
SendMessage(hwndList, CLM_SETINDENT, 10, 0);
- SendMessage(hwndList, CLM_SETHIDEEMPTYGROUPS, (WPARAM)TRUE, 0);
+ SendMessage(hwndList, CLM_SETHIDEEMPTYGROUPS, TRUE, 0);
for (i = 0; i <= FONTID_MAX; i++)
SendMessage(hwndList, CLM_SETTEXTCOLOR, i, GetSysColor(COLOR_WINDOWTEXT));
}
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp
index f6793bf76c..d632de1a22 100644
--- a/protocols/JabberG/src/jabber_chat.cpp
+++ b/protocols/JabberG/src/jabber_chat.cpp
@@ -1004,7 +1004,7 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK*
if ((gch->dwData >= CLISTMENUIDMIN) && (gch->dwData <= CLISTMENUIDMAX)) {
if (him->m_tszRealJid && *him->m_tszRealJid)
if (MCONTACT hContact = ppro->HContactFromJID(him->m_tszRealJid))
- CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(gch->dwData, MPCF_CONTACTMENU), (LPARAM)hContact);
+ CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(gch->dwData, MPCF_CONTACTMENU), hContact);
return;
}
diff --git a/protocols/JabberG/src/jabber_disco.cpp b/protocols/JabberG/src/jabber_disco.cpp
index cf78440832..452cb746ae 100644
--- a/protocols/JabberG/src/jabber_disco.cpp
+++ b/protocols/JabberG/src/jabber_disco.cpp
@@ -1406,7 +1406,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM
HMENU hContactMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, hContact, 0);
GetCursorPos(&pt);
int res = TrackPopupMenu(hContactMenu, TPM_RETURNCMD, pt.x, pt.y, 0, m_pDlgServiceDiscovery->GetHwnd(), NULL);
- CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(res, MPCF_CONTACTMENU), (LPARAM)hContact);
+ CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(res, MPCF_CONTACTMENU), hContact);
}
break;
@@ -1455,7 +1455,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM
if ((res >= CLISTMENUIDMIN) && (res <= CLISTMENUIDMAX)) {
MCONTACT hContact = HContactFromJID(pNode->GetJid());
if (hContact)
- CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(res, MPCF_CONTACTMENU), (LPARAM)hContact);
+ CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(res, MPCF_CONTACTMENU), hContact);
}
break;
}
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp
index 87c6f2a8ee..1b52532d08 100644
--- a/protocols/JabberG/src/jabber_proto.cpp
+++ b/protocols/JabberG/src/jabber_proto.cpp
@@ -1261,7 +1261,7 @@ void __cdecl CJabberProto::GetAwayMsgThread(void *param)
}
}
- ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)0);
+ ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, 0);
}
HANDLE __cdecl CJabberProto::GetAwayMsg(MCONTACT hContact)
@@ -1423,7 +1423,7 @@ void CJabberProto::InfoFrame_OnTransport(CJabberInfoFrame_Event *evt)
POINT pt;
GetCursorPos(&pt);
int res = TrackPopupMenu(hContactMenu, TPM_RETURNCMD, pt.x, pt.y, 0, (HWND)CallService(MS_CLUI_GETHWND, 0, 0), NULL);
- CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(res, MPCF_CONTACTMENU), (LPARAM)hContact);
+ CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(res, MPCF_CONTACTMENU), hContact);
}
}
diff --git a/protocols/JabberG/src/jabber_search.cpp b/protocols/JabberG/src/jabber_search.cpp
index 1a7584c0a1..4ae9f923a3 100644
--- a/protocols/JabberG/src/jabber_search.cpp
+++ b/protocols/JabberG/src/jabber_search.cpp
@@ -148,7 +148,7 @@ void CJabberProto::OnIqResultGetSearchFields(HXML iqNode, CJabberIqInfo *pInfo)
ShowWindow(searchHandleDlg,SW_HIDE);
if (xNode) {
//1. Form
- PostMessage(searchHandleDlg, WM_USER+11, (WPARAM)xi.copyNode(xNode), (LPARAM)0);
+ PostMessage(searchHandleDlg, WM_USER+11, (WPARAM)xi.copyNode(xNode), 0);
HXML xcNode = xmlGetNthChild(xNode, _T("instructions"), 1);
if (xcNode)
SetDlgItemText(searchHandleDlg, IDC_INSTRUCTIONS, xmlGetText(xcNode));
@@ -171,7 +171,7 @@ void CJabberProto::OnIqResultGetSearchFields(HXML iqNode, CJabberIqInfo *pInfo)
MyData->defValue = mir_tstrdup(xmlGetText(chNode));
MyData->Order = Order;
if (MyData->defValue) MyData->bReadOnly = TRUE;
- PostMessage(searchHandleDlg,WM_USER+10,(WPARAM)FALSE,(LPARAM)MyData);
+ PostMessage(searchHandleDlg,WM_USER+10,FALSE,(LPARAM)MyData);
Order++;
}
}
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp
index b526048f78..1f9bd2a4ea 100644
--- a/protocols/JabberG/src/jabber_userinfo.cpp
+++ b/protocols/JabberG/src/jabber_userinfo.cpp
@@ -551,7 +551,7 @@ static INT_PTR CALLBACK JabberUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa
case PSN_INFOCHANGED:
{
MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
- SendMessage(hwndDlg, WM_JABBER_REFRESH, 0, (LPARAM)hContact);
+ SendMessage(hwndDlg, WM_JABBER_REFRESH, 0, hContact);
}
break;
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp
index 60a575f011..c95147adc8 100644
--- a/protocols/JabberG/src/jabber_util.cpp
+++ b/protocols/JabberG/src/jabber_util.cpp
@@ -943,7 +943,7 @@ static VOID CALLBACK sttRebuildInfoFrameApcProc(void* param)
char name[128];
char *jid_copy = mir_t2a(item->jid);
mir_snprintf(name, SIZEOF(name), "$/Transports/%s", jid_copy);
- ppro->m_pInfoFrame->CreateInfoItem(name, true, (LPARAM)hContact);
+ ppro->m_pInfoFrame->CreateInfoItem(name, true, hContact);
ppro->m_pInfoFrame->UpdateInfoItem(name, ppro->GetIconHandle(IDI_TRANSPORTL), (TCHAR *)item->jid);
ppro->m_pInfoFrame->SetInfoItemCallback(name, &CJabberProto::InfoFrame_OnTransport);
mir_free(jid_copy);
diff --git a/protocols/MSN/src/msn_commands.cpp b/protocols/MSN/src/msn_commands.cpp
index 692a0df790..bffdd577a6 100644
--- a/protocols/MSN/src/msn_commands.cpp
+++ b/protocols/MSN/src/msn_commands.cpp
@@ -785,7 +785,7 @@ void CMsnProto::sttProcessStatusMessage(char* buf, unsigned len, const char* wli
if (!ServiceExists(MS_LISTENINGTO_GETPARSEDTEXT) ||
!ServiceExists(MS_LISTENINGTO_OVERRIDECONTACTOPTION) ||
- !CallService(MS_LISTENINGTO_OVERRIDECONTACTOPTION, 0, (LPARAM)hContact))
+ !CallService(MS_LISTENINGTO_OVERRIDECONTACTOPTION, 0, hContact))
{
// User contact options
char *format = mir_strdup(parts[3]);
diff --git a/protocols/Skype/src/skype_blocked.cpp b/protocols/Skype/src/skype_blocked.cpp
index b807f95059..b1a25dc4db 100644
--- a/protocols/Skype/src/skype_blocked.cpp
+++ b/protocols/Skype/src/skype_blocked.cpp
@@ -149,17 +149,8 @@ LRESULT CALLBACK CSkypeProto::SkypeBlockedOptionsSubProc(HWND hwnd, UINT msg, WP
ListView_DeleteItem(hwnd, lvi.iItem);
- int nItem = ::SendMessage(
- ::GetDlgItem(GetParent(hwnd), IDC_CONTACTS),
- CB_ADDSTRING,
- 0,
- (LPARAM)sid);
-
- ::SendMessage(
- ::GetDlgItem(GetParent(hwnd), IDC_CONTACTS),
- CB_SETITEMDATA,
- nItem,
- (LPARAM)hContact);
+ int nItem = ::SendMessage(::GetDlgItem(GetParent(hwnd), IDC_CONTACTS), CB_ADDSTRING, 0, (LPARAM)sid);
+ ::SendMessage(::GetDlgItem(GetParent(hwnd), IDC_CONTACTS), CB_SETITEMDATA, nItem, hContact);
}
}
}
@@ -264,17 +255,8 @@ INT_PTR CALLBACK CSkypeProto::SkypeBlockedOptionsProc(HWND hwndDlg, UINT msg, WP
ppro->GetContact((char *)_T2A(sid), contact);
if ( !contacts.contains(contact))
{
- nItem = ::SendMessage(
- ::GetDlgItem(hwndDlg, IDC_CONTACTS),
- CB_ADDSTRING,
- 0,
- (LPARAM)sid);
-
- ::SendMessage(
- ::GetDlgItem(hwndDlg, IDC_CONTACTS),
- CB_SETITEMDATA,
- nItem,
- (LPARAM)hContact);
+ nItem = ::SendMessage(::GetDlgItem(hwndDlg, IDC_CONTACTS), CB_ADDSTRING, 0, (LPARAM)sid);
+ ::SendMessage(::GetDlgItem(hwndDlg, IDC_CONTACTS), CB_SETITEMDATA, nItem, hContact);
}
}
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp
index 8ca7238f5d..7117c30387 100644
--- a/protocols/VKontakte/src/vk_chats.cpp
+++ b/protocols/VKontakte/src/vk_chats.cpp
@@ -375,7 +375,7 @@ static INT_PTR CALLBACK InviteDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
for (MCONTACT hContact = db_find_first(ppro->m_szModuleName); hContact; hContact = db_find_next(hContact, ppro->m_szModuleName)) {
TCHAR *ptszNick = pcli->pfnGetContactDisplayName(hContact, 0);
int idx = SendMessage(hwndCombo, CB_ADDSTRING, 0, LPARAM(ptszNick));
- SendMessage(hwndCombo, CB_SETITEMDATA, idx, (LPARAM)hContact);
+ SendMessage(hwndCombo, CB_SETITEMDATA, idx, hContact);
}
SendMessage(hwndCombo, CB_SETCURSEL, 0, 0);
}
diff --git a/protocols/Xfire/src/all_statusmsg.cpp b/protocols/Xfire/src/all_statusmsg.cpp
index 7a1ff7b8db..7ded77640a 100644
--- a/protocols/Xfire/src/all_statusmsg.cpp
+++ b/protocols/Xfire/src/all_statusmsg.cpp
@@ -242,7 +242,7 @@ BOOL SetGameStatusMsg()
npi.szProto=(char*)protoname->at(i).c_str();
npi.status=oltostatus->at(i);
npi.szMsg=mir_strdup(statusMsg);
- CallService("NewAwaySystem/SetStateA", (WPARAM)&npi, (LPARAM)1);
+ CallService("NewAwaySystem/SetStateA", (WPARAM)&npi, 1);
}
else if (ServiceExists("NewAwaySystem/SetStateW")) {
XFireLog("-> SetStatusMsg of %s with NewAwaySystem/SetStateW.",protoname->at(i).c_str());
@@ -252,7 +252,7 @@ BOOL SetGameStatusMsg()
npi.szProto=(char*)protoname->at(i).c_str();
npi.status=oltostatus->at(i);
npi.szMsg=mir_strdup(statusMsg);
- CallService("NewAwaySystem/SetStateW", (WPARAM)&npi, (LPARAM)1);
+ CallService("NewAwaySystem/SetStateW", (WPARAM)&npi, 1);
}
else
{
diff --git a/src/core/stdchat/src/window.cpp b/src/core/stdchat/src/window.cpp
index b07d8ffcc7..7878af85e4 100644
--- a/src/core/stdchat/src/window.cpp
+++ b/src/core/stdchat/src/window.cpp
@@ -1852,7 +1852,7 @@ END_REMOVETAB:
if (CallService(MS_CLIST_GETEVENT, (WPARAM)si->hContact, 0))
CallService(MS_CLIST_REMOVEEVENT, (WPARAM)si->hContact, (LPARAM)GC_FAKE_EVENT);
si->wState &= ~STATE_TALK;
- db_set_w(si->hContact, si->pszModule, "ApparentMode", (LPARAM)0);
+ db_set_w(si->hContact, si->pszModule, "ApparentMode", 0);
SendMessage(hwndDlg, GC_CLOSEWINDOW, 0, 0);
return TRUE;
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp
index 1f2141cb42..67f5f02a8e 100644
--- a/src/core/stdmsg/src/msgdialog.cpp
+++ b/src/core/stdmsg/src/msgdialog.cpp
@@ -753,7 +753,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
SendDlgItemMessage(hwndDlg, IDC_LOG, EM_SETOLECALLBACK, 0, (LPARAM)& reOleCallback);
SendDlgItemMessage(hwndDlg, IDC_LOG, EM_SETEVENTMASK, 0, ENM_MOUSEEVENTS | ENM_LINK | ENM_SCROLL);
/* duh, how come we didnt use this from the start? */
- SendDlgItemMessage(hwndDlg, IDC_LOG, EM_AUTOURLDETECT, (WPARAM)TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_LOG, EM_AUTOURLDETECT, TRUE, 0);
if (dat->hContact && dat->szProto) {
int nMax;
nMax = CallProtoService(dat->szProto, PS_GETCAPS, PFLAG_MAXLENOFMESSAGE, (LPARAM)dat->hContact);
diff --git a/src/modules/chat/clist.cpp b/src/modules/chat/clist.cpp
index d548d8db2c..3709b94610 100644
--- a/src/modules/chat/clist.cpp
+++ b/src/modules/chat/clist.cpp
@@ -75,7 +75,7 @@ BOOL SetOffline(MCONTACT hContact, BOOL bHide)
{
if (hContact) {
char *szProto = GetContactProto(hContact);
- db_set_w(hContact, szProto, "ApparentMode", (LPARAM)0);
+ db_set_w(hContact, szProto, "ApparentMode", 0);
db_set_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
return TRUE;
}
diff --git a/src/modules/clist/clistmenus.cpp b/src/modules/clist/clistmenus.cpp
index 56b6cd7720..f1cfadae46 100644
--- a/src/modules/clist/clistmenus.cpp
+++ b/src/modules/clist/clistmenus.cpp
@@ -346,7 +346,7 @@ INT_PTR ContactMenuExecService(WPARAM wParam, LPARAM lParam)
{
if (wParam != 0) {
lpContactMenuExecParam cmep = (lpContactMenuExecParam)wParam;
- //call with wParam = (WPARAM)(HANDLE)hContact, lparam = popupposition
+ //call with wParam = (MCONTACT)hContact, lparam = popupposition
CallService(cmep->szServiceName, lParam, cmep->param);
}
return 0;
diff --git a/src/modules/clist/genmenu.cpp b/src/modules/clist/genmenu.cpp
index cad7cb1950..0014545c27 100644
--- a/src/modules/clist/genmenu.cpp
+++ b/src/modules/clist/genmenu.cpp
@@ -1104,7 +1104,7 @@ int TryProcessDoubleClick(MCONTACT hContact)
PMO_IntMenuItem pimi = (PMO_IntMenuItem)MO_GetDefaultMenuItem((WPARAM)g_menus[ iMenuID ]->m_items.first, 0);
if (pimi != NULL) {
- MO_ProcessCommand(pimi, (LPARAM)hContact);
+ MO_ProcessCommand(pimi, hContact);
return 0;
}
}
diff --git a/src/modules/protocols/protoint.cpp b/src/modules/protocols/protoint.cpp
index 70fccaa18c..d74ec1a5c4 100644
--- a/src/modules/protocols/protoint.cpp
+++ b/src/modules/protocols/protoint.cpp
@@ -122,7 +122,7 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE
DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact)
{
- return (DWORD_PTR)ProtoCallService(m_szModuleName, PS_GETCAPS, type, (LPARAM)hContact);
+ return (DWORD_PTR)ProtoCallService(m_szModuleName, PS_GETCAPS, type, hContact);
}
HICON __cdecl GetIcon(int iconIndex)