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
13 #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
15 #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
17 #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
19 #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
22 // On Win XP, with VS2008, do not use default WINVER 0x0600 because of
23 // some windows structure used in API (on VISTA they are longer)
25 # define WINVER 0x0501
26 #endif /* !defined(WINVER) */
28 #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
32 #include <afxwin.h> // MFC core and standard components
33 #include <afxext.h> // MFC extensions
34 #include <afxcmn.h> // MFC support for Windows Common Controls
36 #include <afxtempl.h> // MFC C++ template collection classes
37 #include <afxpriv.h> // MFC private declarations (crystal text needs but doesn't include this)
38 #include <afxole.h> // MFC OLE (COM) support
40 // For CSizingControlBar
44 #include "coretypes.h"
46 #define IF_IS_TRUE_ALL(expression, index, count) \
47 for (index = 0; index < count; index++) { if ((expression)) ; else break; } \
52 * @name User-defined Windows-messages
55 /// Directory compare thread asks UI (view) update
56 const UINT MSG_UI_UPDATE = WM_USER + 1;
57 /// Request to save panesizes
58 const UINT MSG_STORE_PANESIZES = WM_USER + 2;
61 /// Seconds ignored in filetime differences if option enabled
62 static const UINT SmallTimeDiff = 2;
64 #include "UnicodeString.h"
67 /** @brief Wrapper around CMergeApp::TranslateDialog() */
68 void NTAPI LangTranslateDialog(HWND);
70 /** @brief Lang aware version of AfxMessageBox() */
71 int NTAPI LangMessageBox(UINT, UINT nType = MB_OK, UINT nIDHelp = (UINT)-1);
73 /** @brief include for the custom dialog boxes, with do not ask/display again */
74 #include "MessageBoxDialog.h"
79 #define _MAX_PATH (260 * sizeof(wchar_t) / sizeof(TCHAR))
84 #define MAX_PATH (260 * sizeof(wchar_t) / sizeof(TCHAR))
86 #define WMPROFILE(x) CWinMergeProfile __wmtl__(x)
88 class CWinMergeProfile
95 explicit CWinMergeProfile(LPCTSTR pFuncName) {
96 lstrcpy(funcname, pFuncName);
97 QueryPerformanceFrequency(&freq);
98 QueryPerformanceCounter(&li[0]);
100 ~CWinMergeProfile() {
101 QueryPerformanceCounter(&li[1]);
103 wsprintf(buf, _T("funcname=%s t=%d[us]\n"), funcname, (int)((double)(li[1].QuadPart-li[0].QuadPart)/freq.QuadPart*1000.0*1000.0));
104 OutputDebugString(buf);
108 //{{AFX_INSERT_LOCATION}}
109 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.