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
8 * @brief Project-wide includes and declarations
14 #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
16 #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
18 #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
20 #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
24 // Set WINVER for VC6, VS2005 and VS2008
25 //On VS2003 default is set to 0x0501 (Windows XP and Windows .NET Server)
26 //On VS2005 default is set to 0x0502 (Windows Server 2003)
27 //On VS2008 default is set to 0x0600 (Windows VISTA)
29 // Set WINVER below or in project properties (for preprocessor)
32 # define WINVER 0x0400
33 #elif _MSC_VER == 1400
34 // VS2005 is too noisy when _MSC_VER is not set
36 # define WINVER 0x0501
38 #elif _MSC_VER >= 1500
39 // On Win XP, with VS2008, do not use default WINVER 0x0600 because of
40 // some windows structure used in API (on VISTA they are longer)
42 # define WINVER 0x0501
43 # endif /* !defined(WINVER) */
44 #endif /* _MSC_VER = 1500 */
46 #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
48 // Disable VC6's "identifier was truncated..." warning. It is meaningless.
50 #pragma warning(disable: 4786)
55 #include <afxwin.h> // MFC core and standard components
56 #include <afxext.h> // MFC extensions
57 #include <afxcmn.h> // MFC support for Windows Common Controls
59 #include <afxtempl.h> // MFC C++ template collection classes
60 #include <afxpriv.h> // MFC private declarations (crystal text needs but doesn't include this)
61 #include <afxole.h> // MFC OLE (COM) support
63 // For CSizingControlBar
67 #include "coretypes.h"
69 #define IF_IS_TRUE_ALL(expression, index, count) \
70 for (index = 0; index < count; index++) { if ((expression)) ; else break; } \
75 * @name User-defined Windows-messages
78 /// Directory compare thread asks UI (view) update
79 const UINT MSG_UI_UPDATE = WM_USER + 1;
80 /// Request to save panesizes
81 const UINT MSG_STORE_PANESIZES = WM_USER + 2;
84 /// Seconds ignored in filetime differences if option enabled
85 static const UINT SmallTimeDiff = 2;
87 #include "UnicodeString.h"
90 /** @brief Wrapper around CMergeApp::TranslateDialog() */
91 void NTAPI LangTranslateDialog(HWND);
93 /** @brief Lang aware version of AfxMessageBox() */
94 int NTAPI LangMessageBox(UINT, UINT nType = MB_OK, UINT nIDHelp = (UINT)-1);
96 /** @brief Get appropriate clipboard format for TCHAR text, ie, CF_TEXT or CF_UNICODETEXT */
97 int GetClipTcharTextFormat();
99 /** @brief include for the custom dialog boxes, with do not ask/display again */
100 #include "MessageBoxDialog.h"
105 #define _MAX_PATH (260 * sizeof(wchar_t) / sizeof(TCHAR))
110 #define MAX_PATH (260 * sizeof(wchar_t) / sizeof(TCHAR))
112 #define WMPROFILE(x) CWinMergeProfile __wmtl__(x)
114 class CWinMergeProfile
121 CWinMergeProfile(LPCTSTR pFuncName) {
122 lstrcpy(funcname, pFuncName);
123 QueryPerformanceFrequency(&freq);
124 QueryPerformanceCounter(&li[0]);
126 ~CWinMergeProfile() {
127 QueryPerformanceCounter(&li[1]);
129 wsprintf(buf, _T("funcname=%s t=%d[us]\n"), funcname, (int)((double)(li[1].QuadPart-li[0].QuadPart)/freq.QuadPart*1000.0*1000.0));
130 OutputDebugString(buf);
134 //{{AFX_INSERT_LOCATION}}
135 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.