stdafx.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // stdafx.h : 标准系统包含文件的包含文件,
  2. // 或是经常使用但不常更改的
  3. // 特定于项目的包含文件
  4. //
  5. #pragma once
  6. #include "targetver.h"
  7. #include <stdio.h>
  8. #include <tchar.h>
  9. #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // 某些 CString 构造函数将是显式的
  10. #ifndef VC_EXTRALEAN
  11. #define VC_EXTRALEAN // 从 Windows 头中排除极少使用的资料
  12. #endif
  13. #include <afx.h>
  14. #include <afxwin.h> // MFC 核心组件和标准组件
  15. #include <afxext.h> // MFC 扩展
  16. #ifndef _AFX_NO_OLE_SUPPORT
  17. #include <afxdtctl.h> // MFC 对 Internet Explorer 4 公共控件的支持
  18. #endif
  19. #ifndef _AFX_NO_AFXCMN_SUPPORT
  20. #include <afxcmn.h> // MFC 对 Windows 公共控件的支持
  21. #endif // _AFX_NO_AFXCMN_SUPPORT
  22. #include <iostream>
  23. //////////////////////////////////////////////////////////////////////////
  24. // 字符串系列全局函数;
  25. // 将ASCII字符串转成UNICODE字符串;
  26. WCHAR* ASCII2UNICODE(IN LPCCH lpASCIIStr);
  27. BOOL ASCII2UNICODE(IN LPCCH lpASCIIStr, OUT PWCH pUNICODEStr, IN CONST INT& nUNICODEStrLen);
  28. // 将UNICODE字符串转成ASCII字符串;
  29. CHAR* UNICODE2ASCII(IN LPWCH lpUNICODEStr);
  30. BOOL UNICODE2ASCII(IN LPWCH lpUNICODEStr, OUT LPCH pASCIIStr, IN CONST INT& nASCIIStrLen);
  31. // 将UNICODE字符串转成UFT8字符串;
  32. CHAR* UNICODE2UTF8(IN LPWCH lpUNICODEStr);
  33. BOOL UNICODE2UTF8(IN LPWCH lpUNICODEStr, OUT LPCH pUTF8Str, IN CONST INT& nUTF8StrLen);
  34. // 将ASCII字符串转成UTF8字符串;
  35. CHAR* ASCII2UTF8(IN LPCCH lpASCIIStr);
  36. BOOL ASCII2UTF8(IN LPCCH lpASCIIStr, OUT LPCH pUTF8Str, IN CONST INT& nUTF8StrLen);
  37. WORD AsciiToBYTE(BYTE btSrc);
  38. void ByteToTwoByte( unsigned char *szMsg, int nCount, unsigned char *szConvMsg );
  39. void ByteTurn2HexChar( unsigned char by, char (&szHex)[3] );
  40. // TODO: 在此处引用程序需要的其他头文件