stdafx.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // stdafx.h : 标准系统包含文件的包含文件,
  2. // 或是经常使用但不常更改的
  3. // 项目特定的包含文件
  4. #pragma once
  5. #ifndef VC_EXTRALEAN
  6. #define VC_EXTRALEAN // 从 Windows 标头中排除不常使用的资料
  7. #endif
  8. // 如果您必须使用下列所指定的平台之前的平台,则修改下面的定义。
  9. // 有关不同平台的相应值的最新信息,请参考 MSDN。
  10. #ifndef WINVER // 允许使用 Windows 95 和 Windows NT 4 或更高版本的特定功能。
  11. #define WINVER 0x0400 //为 Windows98 和 Windows 2000 及更新版本改变为适当的值。
  12. #endif
  13. #ifndef _WIN32_WINNT // 允许使用 Windows NT 4 或更高版本的特定功能。
  14. #define _WIN32_WINNT 0x0400 //为 Windows98 和 Windows 2000 及更新版本改变为适当的值。
  15. #endif
  16. #ifndef _WIN32_WINDOWS // 允许使用 Windows 98 或更高版本的特定功能。
  17. #define _WIN32_WINDOWS 0x0410 //为 Windows Me 及更新版本改变为适当的值。
  18. #endif
  19. #ifndef _WIN32_IE // 允许使用 IE 4.0 或更高版本的特定功能。
  20. #define _WIN32_IE 0x0400 //为 IE 5.0 及更新版本改变为适当的值。
  21. #endif
  22. #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // 某些 CString 构造函数将是显式的
  23. // 关闭 MFC 对某些常见但经常被安全忽略的警告消息的隐藏
  24. #define _AFX_ALL_WARNINGS
  25. #include <afxwin.h> // MFC 核心和标准组件
  26. #include <afxext.h> // MFC 扩展
  27. #include <afxdisp.h> // MFC 自动化类
  28. #include <afxdtctl.h> // Internet Explorer 4 公共控件的 MFC 支持
  29. #ifndef _AFX_NO_AFXCMN_SUPPORT
  30. #include <afxcmn.h> // Windows 公共控件的 MFC 支持
  31. #endif // _AFX_NO_AFXCMN_SUPPORT
  32. typedef BOOL (WINAPI *OpenSapi)();
  33. typedef void (WINAPI *CloseSapi)();
  34. typedef INT (WINAPI *GetVoiceCount)();
  35. typedef BOOL (WINAPI *GetVoiceName)(OUT LPTSTR lpVoiceName, IN INT nBuffLen, IN INT nVoiceIndex);
  36. typedef INT (WINAPI *SetSpeech)( IN INT nVoiceIndex, IN INT nSpeeckRate, IN INT nSpeeckVolume, IN INT nSpStreamFormat);
  37. typedef INT (WINAPI *Text2Speech)( IN LPCTSTR lpText, IN LPCTSTR lpWavFileName);
  38. typedef INT (WINAPI *Speak)( IN LPCTSTR lpText);
  39. typedef INT (WINAPI *Play)( IN LPCTSTR lpWavFileName);
  40. extern HINSTANCE g_hTTSpeeck ;
  41. extern OpenSapi g_pOpenSapi ;
  42. extern CloseSapi g_pCloseSapi ;
  43. extern GetVoiceCount g_pGetVoiceCount ;
  44. extern GetVoiceName g_pGetVoiceName ;
  45. extern Text2Speech g_pText2Speeck ;
  46. extern SetSpeech g_pSetSpeeck ;
  47. extern Speak g_pSpeak ;
  48. extern Play g_pPlay;
  49. extern BOOL LoadText2Speeck();
  50. extern void FreeTex2Speeck();