From 91c8310be39a8b5e16382bb126d8374aaf904d52 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Sun, 9 Mar 2014 17:02:12 +0000 Subject: [PATCH] [UPDATE] (AUTHOR Chris Covier) Make project compile under VS2013. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1198 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/WinControls/WindowsDlg/WinMgr.cpp | 4 ++-- PowerEditor/src/WinControls/WindowsDlg/WinMgr.h | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/PowerEditor/src/WinControls/WindowsDlg/WinMgr.cpp b/PowerEditor/src/WinControls/WindowsDlg/WinMgr.cpp index f94e1415..47127d92 100644 --- a/PowerEditor/src/WinControls/WindowsDlg/WinMgr.cpp +++ b/PowerEditor/src/WinControls/WindowsDlg/WinMgr.cpp @@ -290,14 +290,14 @@ CWinMgr::OnGetSizeInfo(SIZEINFO& szi, WINRECT* wrc, HWND hWnd) szi.szMin.cx = max(szi.szMin.cx, szi2.szMin.cx); szi.szMin.cy += szi2.szMin.cy; szi.szMax.cx = min(szi.szMax.cx, szi2.szMax.cx); - szi.szMax.cy = min(szi.szMax.cy + szi2.szMax.cy, INFINITY); + szi.szMax.cy = min(szi.szMax.cy + szi2.szMax.cy, SHRT_MAX); szi.szDesired.cx = max(szi.szDesired.cx, szi2.szDesired.cx); szi.szDesired.cy += szi2.szDesired.cy; } else { szi.szMin.cx += szi2.szMin.cx; szi.szMin.cy = max(szi.szMin.cy, szi2.szMin.cy); - szi.szMax.cx = min(szi.szMax.cx + szi2.szMax.cx, INFINITY); + szi.szMax.cx = min(szi.szMax.cx + szi2.szMax.cx, SHRT_MAX); szi.szMax.cy = min(szi.szMax.cy, szi2.szMax.cy); szi.szDesired.cx += szi2.szDesired.cx; szi.szDesired.cy = max(szi.szDesired.cy, szi2.szDesired.cy); diff --git a/PowerEditor/src/WinControls/WindowsDlg/WinMgr.h b/PowerEditor/src/WinControls/WindowsDlg/WinMgr.h index 0a92472a..1971d0ba 100644 --- a/PowerEditor/src/WinControls/WindowsDlg/WinMgr.h +++ b/PowerEditor/src/WinControls/WindowsDlg/WinMgr.h @@ -14,13 +14,9 @@ #pragma once -// when using screen dimensions, this is infinite -//const LONG INFINITY=0x7fff; // max short -//change to DEFINE for GCC -#define INFINITY 0x7fff // max short const SIZE SIZEZERO = {0, 0}; -const SIZE SIZEMAX = {INFINITY,INFINITY}; +const SIZE SIZEMAX = {SHRT_MAX, SHRT_MAX}; inline SIZE GetSize(LONG w, LONG h) { SIZE sz = {w, h}; return sz;