From c1ab8a6ead29f20226e08f0548b78d93f6788834 Mon Sep 17 00:00:00 2001 From: James Chen Date: Thu, 18 Oct 2012 09:54:24 +0800 Subject: [PATCH] fixed #1511: Changed '#if(WINVER >= 0x0601)' to '#if(_MSC_VER >= 1600)'. --- cocos2dx/platform/win32/CCEGLView.cpp | 28 +++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/cocos2dx/platform/win32/CCEGLView.cpp b/cocos2dx/platform/win32/CCEGLView.cpp index 8b5ea9f0b6..c28dbbc576 100644 --- a/cocos2dx/platform/win32/CCEGLView.cpp +++ b/cocos2dx/platform/win32/CCEGLView.cpp @@ -35,7 +35,7 @@ THE SOFTWARE. NS_CC_BEGIN -#if(WINVER >= 0x0601) +#if(_MSC_VER >= 1600) // Visual Studio 2010 or higher version. // Windows Touch define #define MOUSEEVENTF_FROMTOUCH 0xFF515700 @@ -64,7 +64,7 @@ bool CheckTouchSupport() return (s_pfRegisterTouchWindowFunction && s_pfUnregisterTouchWindowFunction && s_pfGetMessageExtraInfoFunction && s_pfGetTouchInputInfoFunction && s_pfCloseTouchInputHandleFunction); } -#endif /* #if(WINVER >= 0x0601) */ +#endif /* #if(_MSC_VER >= 1600) */ static void SetupPixelFormat(HDC hDC) { @@ -320,13 +320,13 @@ bool CCEGLView::Create() bRet = true; } while (0); -#if(WINVER >= 0x0601) +#if(_MSC_VER >= 1600) m_bSupportTouch = CheckTouchSupport(); if(m_bSupportTouch) { m_bSupportTouch = (s_pfRegisterTouchWindowFunction(m_hWnd, 0) != 0); } -#endif /* #if(WINVER >= 0x0601) */ +#endif /* #if(_MSC_VER >= 1600) */ return bRet; } @@ -338,10 +338,10 @@ LRESULT CCEGLView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) switch (message) { case WM_LBUTTONDOWN: -#if(WINVER >= 0x0601) +#if(_MSC_VER >= 1600) // Don't process message generated by Windows Touch if (m_bSupportTouch && (s_pfGetMessageExtraInfoFunction() & MOUSEEVENTF_FROMTOUCH) == MOUSEEVENTF_FROMTOUCH) break; -#endif /* #if(WINVER >= 0x0601) */ +#endif /* #if(_MSC_VER >= 1600) */ if (m_pDelegate && MK_LBUTTON == wParam) { @@ -361,10 +361,10 @@ LRESULT CCEGLView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) break; case WM_MOUSEMOVE: -#if(WINVER >= 0x0601) +#if(_MSC_VER >= 1600) // Don't process message generated by Windows Touch if (m_bSupportTouch && (s_pfGetMessageExtraInfoFunction() & MOUSEEVENTF_FROMTOUCH) == MOUSEEVENTF_FROMTOUCH) break; -#endif /* #if(WINVER >= 0x0601) */ +#endif /* #if(_MSC_VER >= 1600) */ if (MK_LBUTTON == wParam && m_bCaptured) { POINT point = {(short)LOWORD(lParam), (short)HIWORD(lParam)}; @@ -377,10 +377,10 @@ LRESULT CCEGLView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) break; case WM_LBUTTONUP: -#if(WINVER >= 0x0601) +#if(_MSC_VER >= 1600) // Don't process message generated by Windows Touch if (m_bSupportTouch && (s_pfGetMessageExtraInfoFunction() & MOUSEEVENTF_FROMTOUCH) == MOUSEEVENTF_FROMTOUCH) break; -#endif /* #if(WINVER >= 0x0601) */ +#endif /* #if(_MSC_VER >= 1600) */ if (m_bCaptured) { POINT point = {(short)LOWORD(lParam), (short)HIWORD(lParam)}; @@ -394,7 +394,7 @@ LRESULT CCEGLView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) m_bCaptured = false; } break; -#if(WINVER >= 0x0601) +#if(_MSC_VER >= 1600) case WM_TOUCH: { BOOL bHandled = FALSE; @@ -436,7 +436,7 @@ LRESULT CCEGLView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) } } break; -#endif /* #if(WINVER >= 0x0601) */ +#endif /* #if(_MSC_VER >= 1600) */ case WM_SIZE: switch (wParam) { @@ -552,12 +552,12 @@ void CCEGLView::end() { if (m_hWnd) { -#if(WINVER >= 0x0601) +#if(_MSC_VER >= 1600) if(m_bSupportTouch) { s_pfUnregisterTouchWindowFunction(m_hWnd); } -#endif /* #if(WINVER >= 0x0601) */ +#endif /* #if(_MSC_VER >= 1600) */ DestroyWindow(m_hWnd); m_hWnd = NULL; }