summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/NewAwaySysMod/AwayOpt.cpp10
-rw-r--r--plugins/NewAwaySysMod/AwaySys.cpp18
-rw-r--r--plugins/NewAwaySysMod/Client.cpp2
-rw-r--r--plugins/NewAwaySysMod/Common.h8
-rw-r--r--plugins/NewAwaySysMod/NewAwaySys.sln16
-rw-r--r--plugins/NewAwaySysMod/Notification.cpp2
-rw-r--r--plugins/NewAwaySysMod/ReadAwayMsg.cpp2
-rw-r--r--plugins/NewAwaySysMod/Services.cpp14
-rw-r--r--plugins/NewAwaySysMod/Services.h14
-rw-r--r--plugins/NewAwaySysMod/SetAwayMsg.cpp8
10 files changed, 50 insertions, 44 deletions
diff --git a/plugins/NewAwaySysMod/AwayOpt.cpp b/plugins/NewAwaySysMod/AwayOpt.cpp
index 87aa20f4d9..aa135f890d 100644
--- a/plugins/NewAwaySysMod/AwayOpt.cpp
+++ b/plugins/NewAwaySysMod/AwayOpt.cpp
@@ -323,7 +323,7 @@ static LRESULT CALLBACK DefStatusButtonSubclassProc(HWND hWnd, UINT Msg, WPARAM
}
-int CALLBACK MessagesOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+INT_PTR CALLBACK MessagesOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
static int ChangeLock = 0;
static CMsgTree* MsgTree = NULL;
@@ -621,7 +621,7 @@ void EnableMoreOptDlgControls()
}
-int CALLBACK MoreOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+INT_PTR CALLBACK MoreOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
static int ChangeLock = 0;
static struct {
@@ -775,7 +775,7 @@ void EnableAutoreplyOptDlgControls()
InvalidateRect(GetDlgItem(g_AutoreplyOptPage.GetWnd(), IDC_REPLYDLG_SENDCOUNT_SPIN), NULL, 0); // update spin control
}
-int CALLBACK AutoreplyOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+INT_PTR CALLBACK AutoreplyOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
static int ChangeLock = 0;
static HWND hWndTooltips;
@@ -979,7 +979,7 @@ int CALLBACK AutoreplyOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
}
// ================================================ Modern options ==============================================
-int CALLBACK MessagesModernOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+INT_PTR CALLBACK MessagesModernOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
static int ChangeLock = 0;
static CMsgTree* MsgTree = NULL;
@@ -1583,7 +1583,7 @@ static LRESULT CALLBACK ContactsSubclassProc(HWND hWnd, UINT Msg, WPARAM wParam,
return CallWindowProc(g_OrigContactsProc, hWnd, Msg, wParam, lParam);
}
-int CALLBACK ContactsOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+INT_PTR CALLBACK ContactsOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
static HANDLE hItemAll, hItemUnknown;
switch (msg)
diff --git a/plugins/NewAwaySysMod/AwaySys.cpp b/plugins/NewAwaySysMod/AwaySys.cpp
index aaaa8f8118..ee6badfbbf 100644
--- a/plugins/NewAwaySysMod/AwaySys.cpp
+++ b/plugins/NewAwaySysMod/AwaySys.cpp
@@ -58,7 +58,7 @@ int g_bIsIdle = false;
HANDLE hMainThread;
int g_CSProtoCount = 0; // CommonStatus - StartupStatus and AdvancedAutoAway
VAR_PARSE_DATA VarParseData;
-int (*g_OldCallService)(const char *, WPARAM, LPARAM) = NULL;
+INT_PTR (*g_OldCallService)(const char *, WPARAM, LPARAM) = NULL;
static struct
{
@@ -525,7 +525,7 @@ int PreBuildContactMenu(WPARAM wParam, LPARAM lParam)
}
-static int SetContactStatMsg(WPARAM wParam, LPARAM lParam)
+static INT_PTR SetContactStatMsg(WPARAM wParam, LPARAM lParam)
{
if (g_SetAwayMsgPage.GetWnd()) // already setting something
{
@@ -563,7 +563,7 @@ void UpdateSOEButtons(HANDLE hContact)
}
*/
-int ToggleSendOnEvent(WPARAM wParam, LPARAM lParam)
+INT_PTR ToggleSendOnEvent(WPARAM wParam, LPARAM lParam)
{ // used only for the global setting
HANDLE hContact = (HANDLE)wParam;
CContactSettings(g_ProtoStates[hContact ? (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0) : (char*)NULL].Status, hContact).Autoreply.Toggle();
@@ -572,7 +572,7 @@ int ToggleSendOnEvent(WPARAM wParam, LPARAM lParam)
}
-int srvAutoreplyOn(WPARAM wParam, LPARAM lParam)
+INT_PTR srvAutoreplyOn(WPARAM wParam, LPARAM lParam)
{ // wParam = hContact
HANDLE hContact = (HANDLE)wParam;
CContactSettings(g_ProtoStates[(char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0)].Status, hContact).Autoreply = 1;
@@ -581,7 +581,7 @@ int srvAutoreplyOn(WPARAM wParam, LPARAM lParam)
}
-int srvAutoreplyOff(WPARAM wParam, LPARAM lParam)
+INT_PTR srvAutoreplyOff(WPARAM wParam, LPARAM lParam)
{ // wParam = hContact
HANDLE hContact = (HANDLE)wParam;
CContactSettings(g_ProtoStates[(char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0)].Status, hContact).Autoreply = 0;
@@ -590,7 +590,7 @@ int srvAutoreplyOff(WPARAM wParam, LPARAM lParam)
}
-int srvAutoreplyUseDefault(WPARAM wParam, LPARAM lParam)
+INT_PTR srvAutoreplyUseDefault(WPARAM wParam, LPARAM lParam)
{ // wParam = hContact
HANDLE hContact = (HANDLE)wParam;
CContactSettings(g_ProtoStates[(char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0)].Status, hContact).Autoreply = VAL_USEDEFAULT;
@@ -721,7 +721,7 @@ static int ContactSettingsInit(WPARAM wParam, LPARAM lParam)
}
-int srvVariablesHandler(WPARAM wParam, LPARAM lParam)
+INT_PTR srvVariablesHandler(WPARAM wParam, LPARAM lParam)
{
ARGUMENTSINFO *ai = (ARGUMENTSINFO*)lParam;
ai->flags = AIF_DONTPARSE;
@@ -827,7 +827,7 @@ int srvVariablesHandler(WPARAM wParam, LPARAM lParam)
}
-int srvFreeVarMem(WPARAM wParam, LPARAM lParam)
+INT_PTR srvFreeVarMem(WPARAM wParam, LPARAM lParam)
{
if (!lParam)
{
@@ -838,7 +838,7 @@ int srvFreeVarMem(WPARAM wParam, LPARAM lParam)
}
-static int MyCallService(const char *name, WPARAM wParam, LPARAM lParam)
+static INT_PTR MyCallService(const char *name, WPARAM wParam, LPARAM lParam)
{
if (name && wParam <= ID_STATUS_OUTTOLUNCH && wParam >= ID_STATUS_OFFLINE) // wParam conditions here are distinctive "features" of PS_SETSTATUS and PS_SETAWAYMSG services, so if wParam does not suit them, we'll pass the control to the old CallService function as soon as possible
{
diff --git a/plugins/NewAwaySysMod/Client.cpp b/plugins/NewAwaySysMod/Client.cpp
index 5edd3537a6..7767bdb285 100644
--- a/plugins/NewAwaySysMod/Client.cpp
+++ b/plugins/NewAwaySysMod/Client.cpp
@@ -62,7 +62,7 @@ void __cdecl UpdateMsgsThreadProc(void *)
}
-static void __stdcall DummyAPCFunc(DWORD)
+static void __stdcall DummyAPCFunc(ULONG_PTR)
{
return;
}
diff --git a/plugins/NewAwaySysMod/Common.h b/plugins/NewAwaySysMod/Common.h
index 732577421f..a76012036f 100644
--- a/plugins/NewAwaySysMod/Common.h
+++ b/plugins/NewAwaySysMod/Common.h
@@ -326,7 +326,7 @@ extern int g_Messages_RecentRootID, g_Messages_PredefinedRootID;
extern VAR_PARSE_DATA VarParseData;
extern bool g_fNoProcessing;
extern int g_bIsIdle;
-extern int (*g_OldCallService)(const char *, WPARAM, LPARAM);
+extern INT_PTR (*g_OldCallService)(const char *, WPARAM, LPARAM);
// AwaySys.cpp
@@ -340,11 +340,11 @@ int GetRecentGroupID(int iMode);
TCString VariablesEscape(TCString Str);
// SetAwayMsg.cpp
-int CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
// ReadAwayMsg.cpp
extern HANDLE g_hReadWndList;
-int GetContactStatMsg(WPARAM wParam, LPARAM lParam);
+INT_PTR GetContactStatMsg(WPARAM wParam, LPARAM lParam);
// AwayOpt.cpp
int OptsDlgInit(WPARAM wParam, LPARAM lParam); // called on opening of the options dialog
@@ -363,7 +363,7 @@ int MsgEventAdded(WPARAM wParam, LPARAM lParam);
// buttons
//void UpdateSOEButtons(HANDLE hContact = NULL);
-int ToggleSendOnEvent(WPARAM wParam, LPARAM lParam);
+INT_PTR ToggleSendOnEvent(WPARAM wParam, LPARAM lParam);
//int Create_TopToolbar(WPARAM wParam, LPARAM lParam);
diff --git a/plugins/NewAwaySysMod/NewAwaySys.sln b/plugins/NewAwaySysMod/NewAwaySys.sln
index c54a180cbf..5a1e8450bc 100644
--- a/plugins/NewAwaySysMod/NewAwaySys.sln
+++ b/plugins/NewAwaySysMod/NewAwaySys.sln
@@ -1,18 +1,24 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewAwaySys", "NewAwaySys.vcxproj", "{6A516E27-AC50-5374-756B-A1558DB2EFA9}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewAwaySys", "NewAwaySys.vcxproj", "{F94F5B84-517B-2F98-B76B-8371BCAB8A55}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Debug|Win32.ActiveCfg = Debug|Win32
- {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Debug|Win32.Build.0 = Debug|Win32
- {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Release|Win32.ActiveCfg = Release|Win32
- {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Release|Win32.Build.0 = Release|Win32
+ {F94F5B84-517B-2F98-B76B-8371BCAB8A55}.Debug|Win32.ActiveCfg = Debug|Win32
+ {F94F5B84-517B-2F98-B76B-8371BCAB8A55}.Debug|Win32.Build.0 = Debug|Win32
+ {F94F5B84-517B-2F98-B76B-8371BCAB8A55}.Debug|x64.ActiveCfg = Debug|x64
+ {F94F5B84-517B-2F98-B76B-8371BCAB8A55}.Debug|x64.Build.0 = Debug|x64
+ {F94F5B84-517B-2F98-B76B-8371BCAB8A55}.Release|Win32.ActiveCfg = Release|Win32
+ {F94F5B84-517B-2F98-B76B-8371BCAB8A55}.Release|Win32.Build.0 = Release|Win32
+ {F94F5B84-517B-2F98-B76B-8371BCAB8A55}.Release|x64.ActiveCfg = Release|x64
+ {F94F5B84-517B-2F98-B76B-8371BCAB8A55}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/plugins/NewAwaySysMod/Notification.cpp b/plugins/NewAwaySysMod/Notification.cpp
index 62e8dd5c94..00c3ad10a1 100644
--- a/plugins/NewAwaySysMod/Notification.cpp
+++ b/plugins/NewAwaySysMod/Notification.cpp
@@ -65,7 +65,7 @@ static VOID CALLBACK ShowContactMenu(DWORD wParam)
{
POINT pt;
HWND hMenuWnd = CreateWindowEx(WS_EX_TOOLWINDOW, _T("static"), _T(MOD_NAME)_T("_MenuWindow"), 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, g_hInstance, NULL);
- SetWindowLong(hMenuWnd, GWL_WNDPROC, (LONG)(WNDPROC)MenuWndProc);
+ SetWindowLong(hMenuWnd, GWLP_WNDPROC, (LONG)(WNDPROC)MenuWndProc);
HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)wParam, 0);
GetCursorPos(&pt);
SetForegroundWindow(hMenuWnd);
diff --git a/plugins/NewAwaySysMod/ReadAwayMsg.cpp b/plugins/NewAwaySysMod/ReadAwayMsg.cpp
index 925271326d..f0b6c46706 100644
--- a/plugins/NewAwaySysMod/ReadAwayMsg.cpp
+++ b/plugins/NewAwaySysMod/ReadAwayMsg.cpp
@@ -148,7 +148,7 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam
}
-int GetContactStatMsg(WPARAM wParam, LPARAM lParam)
+INT_PTR GetContactStatMsg(WPARAM wParam, LPARAM lParam)
{
if (HWND hWnd = WindowList_Find(g_hReadWndList, (HANDLE)wParam)) // already have it
{
diff --git a/plugins/NewAwaySysMod/Services.cpp b/plugins/NewAwaySysMod/Services.cpp
index 41d7e8e42a..0ff78c693d 100644
--- a/plugins/NewAwaySysMod/Services.cpp
+++ b/plugins/NewAwaySysMod/Services.cpp
@@ -63,7 +63,7 @@ __inline void PSSetStatus(char *szProto, WORD Status, int bNoClistSetStatusMode
}
-int GetStatusMsg(WPARAM wParam, LPARAM lParam) // called by GamerStatus and built-in miranda autoaway module
+INT_PTR GetStatusMsg(WPARAM wParam, LPARAM lParam) // called by GamerStatus and built-in miranda autoaway module
// wParam = (int)status, lParam = 0
// MS_AWAYMSG_GETSTATUSMSG "SRAway/GetStatusMessage"
{
@@ -86,7 +86,7 @@ int GetStatusMsg(WPARAM wParam, LPARAM lParam) // called by GamerStatus and buil
}
-int SetStatusMode(WPARAM wParam, LPARAM lParam) // called by GamerStatus and StatCtrl
+INT_PTR SetStatusMode(WPARAM wParam, LPARAM lParam) // called by GamerStatus and StatCtrl
{
// wParam = int iMode
// lParam = char* szMsg, may be null - then we need to use the default message
@@ -156,13 +156,13 @@ int GetState(WPARAM wParam, LPARAM lParam, int Widechar)
}
-int GetStateA(WPARAM wParam, LPARAM lParam)
+INT_PTR GetStateA(WPARAM wParam, LPARAM lParam)
{
return GetState(wParam, lParam, false);
}
-int GetStateW(WPARAM wParam, LPARAM lParam)
+INT_PTR GetStateW(WPARAM wParam, LPARAM lParam)
{
return GetState(wParam, lParam, true);
}
@@ -208,19 +208,19 @@ int SetState(WPARAM wParam, LPARAM lParam, int Widechar)
}
-int SetStateA(WPARAM wParam, LPARAM lParam)
+INT_PTR SetStateA(WPARAM wParam, LPARAM lParam)
{
return SetState(wParam, lParam, false);
}
-int SetStateW(WPARAM wParam, LPARAM lParam)
+INT_PTR SetStateW(WPARAM wParam, LPARAM lParam)
{
return SetState(wParam, lParam, true);
}
-int InvokeStatusWindow(WPARAM wParam, LPARAM lParam)
+INT_PTR InvokeStatusWindow(WPARAM wParam, LPARAM lParam)
// wParam = (WPARAM)(NAS_ISWINFO*)iswi - pointer to a NAS_ISWINFO structure.
// lParam = 0
// returns HWND of the window on success, or NULL on failure.
diff --git a/plugins/NewAwaySysMod/Services.h b/plugins/NewAwaySysMod/Services.h
index 27eabf6945..903bbd3784 100644
--- a/plugins/NewAwaySysMod/Services.h
+++ b/plugins/NewAwaySysMod/Services.h
@@ -17,11 +17,11 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-int GetStatusMsg(WPARAM wParam, LPARAM lParam);
-int SetStatusMode(WPARAM wParam, LPARAM lParam);
+INT_PTR GetStatusMsg(WPARAM wParam, LPARAM lParam);
+INT_PTR SetStatusMode(WPARAM wParam, LPARAM lParam);
// int IgnoreNextStatusChange(WPARAM wParam, LPARAM lParam);
-int GetStateA(WPARAM wParam, LPARAM lParam);
-int SetStateA(WPARAM wParam, LPARAM lParam);
-int GetStateW(WPARAM wParam, LPARAM lParam);
-int SetStateW(WPARAM wParam, LPARAM lParam);
-int InvokeStatusWindow(WPARAM wParam, LPARAM lParam);
+INT_PTR GetStateA(WPARAM wParam, LPARAM lParam);
+INT_PTR SetStateA(WPARAM wParam, LPARAM lParam);
+INT_PTR GetStateW(WPARAM wParam, LPARAM lParam);
+INT_PTR SetStateW(WPARAM wParam, LPARAM lParam);
+INT_PTR InvokeStatusWindow(WPARAM wParam, LPARAM lParam);
diff --git a/plugins/NewAwaySysMod/SetAwayMsg.cpp b/plugins/NewAwaySysMod/SetAwayMsg.cpp
index 50f876ff88..177a7a01e5 100644
--- a/plugins/NewAwaySysMod/SetAwayMsg.cpp
+++ b/plugins/NewAwaySysMod/SetAwayMsg.cpp
@@ -535,7 +535,7 @@ HICON g_LoadIconEx( const char* name, bool big )
mir_snprintf( szSettingName, sizeof( szSettingName ), "%s_%s", "", name );
return ( HICON )CallService( MS_SKIN2_GETICON, big, (LPARAM)szSettingName );
}
-int CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
+INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
static int SetMsgSplitterX, SetContactSplitterX;
static SetAwayMsgData *dat;
@@ -1656,11 +1656,11 @@ int CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lP
HCURSOR hCursor = NULL;
if (hitFlags & (MCLCHT_ONITEM | MCLCHT_ONITEMEXTRA))
{
- SetClassLong(hTreeView, GCL_HCURSOR, NULL);
+ SetClassLong(hTreeView, GCLP_HCURSOR, NULL);
hCursor = LoadCursor(NULL, IDC_HAND); // set mouse cursor to a hand when hovering over items or their extra images
} else
{
- SetClassLong(hTreeView, GCL_HCURSOR, (LONG)LoadCursor(NULL, IDC_ARROW));
+ SetClassLong(hTreeView, GCLP_HCURSOR, (LONG)LoadCursor(NULL, IDC_ARROW));
}
if (!hCursor)
{
@@ -1670,7 +1670,7 @@ int CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lP
return true;
} else
{
- SetClassLong(hTreeView, GCL_HCURSOR, (LONG)LoadCursor(NULL, IDC_ARROW));
+ SetClassLong(hTreeView, GCLP_HCURSOR, (LONG)LoadCursor(NULL, IDC_ARROW));
}
} break;
case WM_CLOSE: