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
10 // ID line follows -- this is updated by SVN
11 // $Id: StdAfx.h 6457 2009-02-15 14:08:50Z kimmov $
13 #if !defined(AFX_STDAFX_H__BBCD4F8A_34E4_11D1_BAA6_00A024706EDC__INCLUDED_)
14 #define AFX_STDAFX_H__BBCD4F8A_34E4_11D1_BAA6_00A024706EDC__INCLUDED_
18 #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
20 #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
22 #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
24 #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
28 // Set WINVER for VC6, VS2005 and VS2008
29 //On VS2003 default is set to 0x0501 (Windows XP and Windows .NET Server)
30 //On VS2005 default is set to 0x0502 (Windows Server 2003)
31 //On VS2008 default is set to 0x0600 (Windows VISTA)
33 // Set WINVER below or in project properties (for preprocessor)
36 # define WINVER 0x0400
37 #elif _MSC_VER == 1400
38 // VS2005 is too noisy when _MSC_VER is not set
40 # define WINVER 0x0501
42 #elif _MSC_VER >= 1500
43 // On Win XP, with VS2008, do not use default WINVER 0x0600 because of
44 // some windows structure used in API (on VISTA they are longer)
46 # define WINVER 0x0501
47 # endif /* !defined(WINVER) */
48 #endif /* _MSC_VER = 1500 */
50 #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
52 // Disable VC6's "identifier was truncated..." warning. It is meaningless.
54 #pragma warning(disable: 4786)
59 #include <afxwin.h> // MFC core and standard components
60 #include <afxext.h> // MFC extensions
61 #include <afxcmn.h> // MFC support for Windows Common Controls
63 #include <afxtempl.h> // MFC C++ template collection classes
64 #include <afxpriv.h> // MFC private declarations (crystal text needs but doesn't include this)
65 #include <afxole.h> // MFC OLE (COM) support
67 // For CSizingControlBar
71 #include "coretypes.h"
73 #define IF_IS_TRUE_ALL(expression, index, count) \
74 for (index = 0; index < count; index++) { if ((expression)) ; else break; } \
79 * @name User-defined Windows-messages
82 /// Directory compare thread asks UI (view) update
83 const UINT MSG_UI_UPDATE = WM_USER + 1;
84 /// Request to save panesizes
85 const UINT MSG_STORE_PANESIZES = WM_USER + 2;
88 /// Seconds ignored in filetime differences if option enabled
89 static const UINT SmallTimeDiff = 2;
91 #include "UnicodeString.h"
94 /** @brief Wrapper around CMergeApp::TranslateDialog() */
95 void NTAPI LangTranslateDialog(HWND);
97 /** @brief Lang aware version of AfxMessageBox() */
98 int NTAPI LangMessageBox(UINT, UINT nType = MB_OK, UINT nIDHelp = (UINT)-1);
100 /** @brief Get appropriate clipboard format for TCHAR text, ie, CF_TEXT or CF_UNICODETEXT */
101 int GetClipTcharTextFormat();
103 /** @brief include for the custom dialog boxes, with do not ask/display again */
104 #include "MessageBoxDialog.h"
109 #define _MAX_PATH (260 * sizeof(wchar_t) / sizeof(TCHAR))
114 #define MAX_PATH (260 * sizeof(wchar_t) / sizeof(TCHAR))
116 #define WMPROFILE(x) CWinMergeProfile __wmtl__(x)
118 class CWinMergeProfile
125 CWinMergeProfile(LPCTSTR pFuncName) {
126 lstrcpy(funcname, pFuncName);
127 QueryPerformanceFrequency(&freq);
128 QueryPerformanceCounter(&li[0]);
130 ~CWinMergeProfile() {
131 QueryPerformanceCounter(&li[1]);
133 _stprintf(buf, _T("funcname=%s t=%g\n"), funcname, (double)(li[1].QuadPart-li[0].QuadPart)/freq.QuadPart);
134 OutputDebugString(buf);
138 //{{AFX_INSERT_LOCATION}}
139 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
141 #endif // !defined(AFX_STDAFX_H__BBCD4F8A_34E4_11D1_BAA6_00A024706EDC__INCLUDED_)