diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index c51ddbed176..9ad89667e76 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -47,14 +47,6 @@ #include #include -// win64 doesn't define GWL_USERDATA -#ifdef WIN32 -# ifndef GWL_USERDATA -# define GWL_USERDATA GWLP_USERDATA -# define GWL_WNDPROC GWLP_WNDPROC -# endif -#endif - #include "utfconv.h" #include "GHOST_DisplayManagerWin32.h" @@ -904,7 +896,7 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, GHOST_ASSERT(system, "GHOST_SystemWin32::s_wndProc(): system not initialized"); if (hwnd) { - GHOST_WindowWin32 *window = (GHOST_WindowWin32 *)::GetWindowLongPtr(hwnd, GWL_USERDATA); + GHOST_WindowWin32 *window = (GHOST_WindowWin32 *)::GetWindowLongPtr(hwnd, GWLP_USERDATA); if (window) { switch (msg) { // we need to check if new key layout has AltGr diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index e5e734e4e57..3871ececee8 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -50,14 +50,6 @@ #define WGL_SAMPLE_BUFFERS_ARB 0x2041 #define WGL_SAMPLES_ARB 0x2042 -// win64 doesn't define GWL_USERDATA -#ifdef WIN32 /* why? - probably should remove */ -# ifndef GWL_USERDATA -# define GWL_USERDATA GWLP_USERDATA -# define GWL_WNDPROC GWLP_WNDPROC -# endif -#endif - const wchar_t *GHOST_WindowWin32::s_windowClassName = L"GHOST_WindowClass"; const int GHOST_WindowWin32::s_maxTitleLength = 128; HGLRC GHOST_WindowWin32::s_firsthGLRc = NULL; @@ -270,7 +262,7 @@ GHOST_WindowWin32::GHOST_WindowWin32( } // Store a pointer to this class in the window structure - ::SetWindowLongPtr(m_hWnd, GWL_USERDATA, (LONG_PTR) this); + ::SetWindowLongPtr(m_hWnd, GWLP_USERDATA, (LONG_PTR) this); m_wsh.setHWND(m_hWnd); m_wsh.setMinSize(320, 240); diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp index 31ce1869544..3cba65779d1 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp @@ -260,14 +260,14 @@ bool GPG_Application::startScreenSaverPreview( } SetParent(ghost_hwnd, parentWindow); - LONG style = GetWindowLong(ghost_hwnd, GWL_STYLE); - LONG exstyle = GetWindowLong(ghost_hwnd, GWL_EXSTYLE); + LONG_PTR style = GetWindowLongPtr(ghost_hwnd, GWL_STYLE); + LONG_PTR exstyle = GetWindowLongPtr(ghost_hwnd, GWL_EXSTYLE); RECT adjrc = { 0, 0, windowWidth, windowHeight }; AdjustWindowRectEx(&adjrc, style, FALSE, exstyle); style = (style & (~(WS_POPUP|WS_OVERLAPPEDWINDOW|WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_THICKFRAME|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_TILEDWINDOW ))) | WS_CHILD; - SetWindowLong(ghost_hwnd, GWL_STYLE, style); + SetWindowLongPtr(ghost_hwnd, GWL_STYLE, style); SetWindowPos(ghost_hwnd, NULL, adjrc.left, adjrc.top, 0, 0, SWP_NOZORDER|SWP_NOSIZE|SWP_NOACTIVATE); /* Check the size of the client rectangle of the window and resize the window