StdAfx.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // StdAfx.h : include file for standard system include files,
  2. // or project specific include files that are used frequently, but
  3. // are changed infrequently
  4. //
  5. #if !defined(AFX_STDAFX_H__E30B2003_188B_4EB4_AB99_3F3734D6CE6C__INCLUDED_)
  6. #define AFX_STDAFX_H__E30B2003_188B_4EB4_AB99_3F3734D6CE6C__INCLUDED_
  7. #pragma once
  8. #ifdef __GNUC__
  9. // 怎么都没找到min,max的头文件-_-
  10. #ifndef min
  11. #define min(a,b) (((a) < (b)) ? (a) : (b))
  12. #endif
  13. #ifndef max
  14. #define max(a,b) (((a) > (b)) ? (a) : (b))
  15. #endif
  16. #endif
  17. #ifndef __FILET__
  18. #define __DUILIB_STR2WSTR(str) L##str
  19. #define _DUILIB_STR2WSTR(str) __DUILIB_STR2WSTR(str)
  20. #ifdef _UNICODE
  21. #define __FILET__ _DUILIB_STR2WSTR(__FILE__)
  22. #define __FUNCTIONT__ _DUILIB_STR2WSTR(__FUNCTION__)
  23. #else
  24. #define __FILET__ __FILE__
  25. #define __FUNCTIONT__ __FUNCTION__
  26. #endif
  27. #endif
  28. #define _CRT_SECURE_NO_DEPRECATE
  29. // Remove pointless warning messages
  30. #ifdef _MSC_VER
  31. #pragma warning (disable : 4511) // copy operator could not be generated
  32. #pragma warning (disable : 4512) // assignment operator could not be generated
  33. #pragma warning (disable : 4702) // unreachable code (bugs in Microsoft's STL)
  34. #pragma warning (disable : 4786) // identifier was truncated
  35. #pragma warning (disable : 4996) // function or variable may be unsafe (deprecated)
  36. #ifndef _CRT_SECURE_NO_WARNINGS
  37. #define _CRT_SECURE_NO_WARNINGS // eliminate deprecation warnings for VS2005
  38. #endif
  39. #endif // _MSC_VER
  40. #ifdef __BORLANDC__
  41. #pragma option -w-8027 // function not expanded inline
  42. #endif
  43. // Required for VS 2008 (fails on XP and Win2000 without this fix)
  44. #ifndef _WIN32_WINNT
  45. #define _WIN32_WINNT _WIN32_WINNT_WINXP//0x0501
  46. #endif
  47. //#define USE_XIMAGE_EFFECT //使用ximage的gif控件CGifAnimExUI开关,提升性能,默认不使用
  48. #include "UIlib.h"
  49. #include <olectl.h>
  50. #define lengthof(x) (sizeof(x)/sizeof(*x))
  51. #define MAX max
  52. #define MIN min
  53. #define CLAMP(x,a,b) (MIN(b,MAX(a,x)))
  54. //{{AFX_INSERT_LOCATION}}
  55. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  56. #endif // !defined(AFX_STDAFX_H__E30B2003_188B_4EB4_AB99_3F3734D6CE6C__INCLUDED_)