diff --git a/Fwk/AppFwk/cafUserInterface/cafProgressInfo.cpp b/Fwk/AppFwk/cafUserInterface/cafProgressInfo.cpp index 46cf1688c5..3d7bac7dd3 100644 --- a/Fwk/AppFwk/cafUserInterface/cafProgressInfo.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafProgressInfo.cpp @@ -48,6 +48,14 @@ #include #include +#ifdef _MSC_VER +// Define this one to tell windows.h to not define min() and max() as macros +#if defined WIN32 && !defined NOMINMAX +#define NOMINMAX +#endif +#include +#endif + namespace caf { //-------------------------------------------------------------------------------------------------- @@ -358,17 +366,6 @@ bool ProgressState::isActive() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -#ifdef _MSC_VER -#pragma warning( push ) -#pragma warning( disable : 4668 ) -// Define this one to tell windows.h to not define min() and max() as macros -#if defined WIN32 && !defined NOMINMAX -#define NOMINMAX -#endif -#include -#pragma warning( pop ) -#endif - void openDebugWindow() { #ifdef _MSC_VER