summary refs log tree commit diff stats
path: root/plugins/xtray/xtray.cpp
diff options
context:
space:
mode:
authorberkeviktor@aol.com <berkeviktor@aol.com>2010-04-04 04:06:25 +0200
committerberkeviktor@aol.com <berkeviktor@aol.com>2010-04-04 04:06:25 +0200
commit3fab4f0d7dc92e70e5f0e6273d75df8c4d972a61 (patch)
tree2c19ff2f2f487567ea8a1718c9499930438636ca /plugins/xtray/xtray.cpp
parent5607488e9f64c0190da57e82ea26b85086446197 (diff)
fix for x64 xtray
Diffstat (limited to 'plugins/xtray/xtray.cpp')
-rw-r--r--plugins/xtray/xtray.cpp20
1 files changed, 6 insertions, 14 deletions
diff --git a/plugins/xtray/xtray.cpp b/plugins/xtray/xtray.cpp
index 688464ff..c9f1bd5e 100644
--- a/plugins/xtray/xtray.cpp
+++ b/plugins/xtray/xtray.cpp
@@ -93,7 +93,7 @@ int xchat_plugin_init(xchat_plugin *plugin_handle, char **plugin_name, char **pl
 	}

 

 	g_hOldProc	= (WNDPROC)GetWindowLongPtr(g_hXchatWnd, GWLP_WNDPROC);

-	SetWindowLong(g_hXchatWnd, GWLP_WNDPROC, (long)WindowProc);

+	SetWindowLongPtr(g_hXchatWnd, GWLP_WNDPROC, (LONG_PTR)WindowProc);

 

 	/***************************************************************************************************************************/	

 	/************************* Grab the xChat Icon, Load our menu, create the window to receive the hotkey messages  ***********/

@@ -127,12 +127,8 @@ int xchat_plugin_init(xchat_plugin *plugin_handle, char **plugin_name, char **pl
 		DWORD dwStyle;

 		dwStyle = GetWindowLong(g_hXchatWnd, GWL_STYLE);

 		dwStyle |= (1<<WS_CHILD);

-		SetWindowLong(g_hXchatWnd, GWL_STYLE, dwStyle);

-#ifdef _WIN64

-		SetWindowLong(g_hXchatWnd, GWLP_HWNDPARENT, (long)g_hHotkeyWnd);

-#else

-		SetWindowLong(g_hXchatWnd, GWL_HWNDPARENT, (long)g_hHotkeyWnd);

-#endif

+		SetWindowLongPtr(g_hXchatWnd, GWL_STYLE, (LONG_PTR)dwStyle);

+		SetWindowLongPtr(g_hXchatWnd, GWL_HWNDPARENT, (LONG_PTR)g_hHotkeyWnd);

 	}

 

 	/***************************************************************************************************************************/

@@ -171,12 +167,8 @@ int xchat_plugin_deinit(xchat_plugin *plugin_handle)
 		DWORD dwStyle;

 		dwStyle = GetWindowLong(g_hXchatWnd, GWL_STYLE);

 		dwStyle &= ~(1<<WS_CHILD);

-		SetWindowLong(g_hXchatWnd, GWL_STYLE, dwStyle);

-#ifdef _WIN64

-		SetWindowLong(g_hXchatWnd, GWLP_HWNDPARENT, NULL);

-#else

-		SetWindowLong(g_hXchatWnd, GWL_HWNDPARENT, NULL);

-#endif

+		SetWindowLongPtr(g_hXchatWnd, GWL_STYLE, (LONG_PTR)dwStyle);

+		SetWindowLongPtr(g_hXchatWnd, GWL_HWNDPARENT, NULL);

 	}

 

 	/******************************************/

@@ -192,7 +184,7 @@ int xchat_plugin_deinit(xchat_plugin *plugin_handle)
 	/******************************************/

 	/****** Remove our window hook ************/

 	/******************************************/

-	SetWindowLong(g_hXchatWnd, GWLP_WNDPROC, (long)g_hOldProc);

+	SetWindowLongPtr(g_hXchatWnd, GWLP_WNDPROC, (LONG_PTR)g_hOldProc);

 

 	/******************************************/

 	/****** Remove our hotkey, and destroy ****/