stdafx.h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. // stdafx.h : 标准系统包含文件的包含文件,
  2. // 或是经常使用但不常更改的
  3. // 特定于项目的包含文件
  4. #pragma once
  5. #ifndef _SECURE_ATL
  6. #define _SECURE_ATL 1
  7. #endif
  8. #ifndef VC_EXTRALEAN
  9. #define VC_EXTRALEAN // 从 Windows 头中排除极少使用的资料
  10. #endif
  11. #include "targetver.h"
  12. #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // 某些 CString 构造函数将是显式的
  13. // 关闭 MFC 对某些常见但经常可放心忽略的警告消息的隐藏
  14. #define _AFX_ALL_WARNINGS
  15. #include <afxwin.h> // MFC 核心组件和标准组件
  16. #include <afxext.h> // MFC 扩展
  17. #include <afxdisp.h> // MFC 自动化类
  18. #ifndef _AFX_NO_OLE_SUPPORT
  19. #include <afxdtctl.h> // MFC 对 Internet Explorer 4 公共控件的支持
  20. #endif
  21. #ifndef _AFX_NO_AFXCMN_SUPPORT
  22. #include <afxcmn.h> // MFC 对 Windows 公共控件的支持
  23. #endif // _AFX_NO_AFXCMN_SUPPORT
  24. #include <afxcontrolbars.h> // 功能区和控件条的 MFC 支持
  25. #ifdef USE_STATIC_ICONV // 使用静态库;
  26. #ifndef LIBICONV_EXPORTS
  27. #define LIBICONV_EXPORTS 1
  28. #endif
  29. #ifndef BUILDING_LIBICONV
  30. #define BUILDING_LIBICONV 1
  31. #endif
  32. #ifndef BUILDING_LIBCHARSET
  33. #define BUILDING_LIBCHARSET 1
  34. #endif
  35. #endif
  36. #include <vector>
  37. #include <string>
  38. using namespace std;
  39. #ifndef _UNICODE
  40. typedef string TString;
  41. #else
  42. typedef wstring TString;
  43. #endif
  44. #include "iconv_impl.h"
  45. #include "filehelp.h"
  46. #ifdef _DEBUG
  47. #include "..\Burndiscs\NeroBurndisc.h"
  48. #include "..\Burndiscs\NeroDevice.h"
  49. #include "..\Burndiscs\NeroMedia.h"
  50. #include "..\Burndiscs\NeroItem.h"
  51. #include "..\Burndiscs\IBurndisc.h"
  52. #include "..\Burndiscs\NeroImpl.h"
  53. #include <imapi2.h>
  54. #include "..\Burndiscs\DiscFormatData.h"
  55. #include "..\Burndiscs\DiscFormatDataEvent.h"
  56. #include "..\Burndiscs\DiscMaster.h"
  57. #include "..\Burndiscs\DiscRecorder.h"
  58. #include "..\Burndiscs\IMAPI2Impl.h"
  59. #endif
  60. #include <shlwapi.h> // for SHCreateStreamOnFileEx
  61. // /* for the settings */
  62. // static BOOL NERO_CALLBACK_ATTR IdleCallback (void *pUserData);
  63. // static NeroUserDlgInOut NERO_CALLBACK_ATTR UserDialog (void *pUserData, NeroUserDlgInOut type, void *data);
  64. //
  65. // /* for the progress display */
  66. // static BOOL NERO_CALLBACK_ATTR ProgressCallback (void *pUserData, DWORD dwProgressInPercent);
  67. // static BOOL NERO_CALLBACK_ATTR AbortedCallback (void *pUserData);
  68. // static void NERO_CALLBACK_ATTR AddLogLine (void *pUserData, NERO_TEXT_TYPE type, const char *text);
  69. // static void NERO_CALLBACK_ATTR SetPhaseCallback (void *pUserData, const char *text);
  70. // static void NERO_CALLBACK_ATTR DisableAbortCallback (void *pUserData,BOOL abortEnabled);
  71. // static void NERO_CALLBACK_ATTR SetMajorPhaseCallback(void *pUserData,NERO_MAJOR_PHASE phase,void *reserved);
  72. //
  73. // /* IO callbacks - both take a FILE * as user data */
  74. // static DWORD NERO_CALLBACK_ATTR WriteIOCallback (void *pUserData, BYTE *pBuffer, DWORD dwLen);
  75. // static DWORD NERO_CALLBACK_ATTR ReadIOCallback (void *pUserData, BYTE *pBuffer, DWORD dwLen);
  76. // static BOOL NERO_CALLBACK_ATTR EOFCallback (void *pUserData);
  77. // static BOOL NERO_CALLBACK_ATTR ErrorCallback (void *pUserData);
  78. extern BOOL NERO_CALLBACK_ATTR _IdleCallback(void *pUserData);
  79. extern NeroUserDlgInOut NERO_CALLBACK_ATTR _UserDialog(void *pUserData, NeroUserDlgInOut type, void *data);
  80. extern BOOL NERO_CALLBACK_ATTR _ProgressCallback(void *pUserData, DWORD dwProgressInPercent);
  81. extern BOOL NERO_CALLBACK_ATTR _AbortedCallback(void *pUserData);
  82. extern void NERO_CALLBACK_ATTR _AddLogLine(void *pUserData, NERO_TEXT_TYPE type, const char *text);
  83. extern void NERO_CALLBACK_ATTR _SetPhaseCallback(void *pUserData, const char *text);
  84. extern void NERO_CALLBACK_ATTR _DisableAbortCallback(void *pUserData, BOOL enableAbort);
  85. extern void NERO_CALLBACK_ATTR _SetMajorPhaseCallback(void *pUserData, NERO_MAJOR_PHASE phase, void *reserved);
  86. extern DWORD NERO_CALLBACK_ATTR _WriteIOCallback(void *pUserData, BYTE *pBuffer, DWORD dwLen);
  87. extern BOOL NERO_CALLBACK_ATTR _EOFCallback(void *pUserData);
  88. extern BOOL NERO_CALLBACK_ATTR _ErrorCallback(void *pUserData);
  89. extern DWORD NERO_CALLBACK_ATTR _ReadIOCallback(void *pUserData, BYTE *pBuffer, DWORD dwLen);
  90. ///删除一个数组指针的宏定义
  91. #ifndef DELETEA
  92. #define DELETEA(ptr) \
  93. if(NULL != ptr) \
  94. { \
  95. delete[] ptr; \
  96. ptr = NULL; \
  97. }
  98. #endif
  99. // 删除一个指针的宏定义;
  100. #ifndef FREEP
  101. #define FREEP(ptr) \
  102. if(NULL != ptr) \
  103. { \
  104. free(ptr) ; \
  105. ptr = NULL; \
  106. }
  107. #endif
  108. //删除一个指针的宏定义;
  109. #ifndef DELETEP
  110. #define DELETEP(ptr) \
  111. if(NULL != (ptr)) \
  112. { \
  113. delete (ptr); \
  114. (ptr) = NULL; \
  115. }
  116. #endif
  117. // 删除一个GDI对象的宏定义;
  118. #define DELETEOBJECT(ptr) \
  119. if(NULL != (ptr)) \
  120. { \
  121. ::DeleteObject (ptr);\
  122. (ptr) = NULL; \
  123. }
  124. // Destroy一个Window;
  125. #define DESTROYWINDOW(hWnd) \
  126. if (IsWindow(hWnd)) \
  127. { \
  128. DestroyWindow(hWnd); \
  129. }
  130. #define RELEASEP(ptr)\
  131. if ( ptr)\
  132. {\
  133. ptr->Release();\
  134. ptr = NULL;\
  135. }
  136. #ifdef _UNICODE
  137. #if defined _M_IX86
  138. #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
  139. #elif defined _M_IA64
  140. #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
  141. #elif defined _M_X64
  142. #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
  143. #else
  144. #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
  145. #endif
  146. #endif