Commit 0b313328 authored by Rafaël Carré's avatar Rafaël Carré Committed by Jean-Baptiste Kempf

Win64 fix: SetWindowLong -> SetWindowLongPtr

http://msdn.microsoft.com/en-us/library/aa384242(v=vs.85).aspx
parent 35616dae
......@@ -328,7 +328,7 @@ NPError NPP_Destroy( NPP instance, NPSavedData** save )
if( winproc )
{
/* reset WNDPROC */
SetWindowLong( win, GWL_WNDPROC, (LONG)winproc );
SetWindowLongPtr( win, GWLP_WNDPROC, (LONG_PTR)winproc );
}
#endif
......@@ -429,15 +429,15 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
if( oldproc )
{
/* reset WNDPROC */
SetWindowLong( oldwin, GWL_WNDPROC, (LONG)oldproc );
SetWindowLongPtr( oldwin, GWLP_WNDPROC, (LONG_PTR)oldproc );
}
/* attach our plugin object */
SetWindowLongPtr((HWND)drawable, GWLP_USERDATA,
reinterpret_cast<LONG_PTR>(p_plugin));
/* install our WNDPROC */
p_plugin->setWindowProc( (WNDPROC)SetWindowLong( drawable,
GWL_WNDPROC, (LONG)Manage ) );
p_plugin->setWindowProc( (WNDPROC)SetWindowLongPtr( drawable,
GWLP_WNDPROC, (LONG_PTR)Manage ) );
/* change window style to our liking */
LONG style = GetWindowLong((HWND)drawable, GWL_STYLE);
......@@ -456,7 +456,7 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
{
/* reset WNDPROC */
HWND oldwin = (HWND)curwin.window;
SetWindowLong( oldwin, GWL_WNDPROC, (LONG)(p_plugin->getWindowProc()) );
SetWindowLongPtr( oldwin, GWLP_WNDPROC, (LONG_PTR)(p_plugin->getWindowProc()) );
p_plugin->setWindowProc(NULL);
curwin.window = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment