home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / WORDPAD.PAK / DOCTYPE.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  1.8 KB  |  63 lines

  1. // doctype.h : header file
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1995 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. #define RD_WINWORD2 0
  14. #define RD_WINWORD6 1
  15. #define RD_WORDPAD 2
  16. #define RD_WRITE 3
  17. #define RD_RICHTEXT 4
  18. #define RD_TEXT 5
  19. #define RD_OEMTEXT 6
  20. #define RD_ALL 7
  21. #define RD_EXE 8
  22. #define RD_EMBEDDED 9
  23. #define NUM_DOC_TYPES 10
  24.  
  25. #define RD_DEFAULT RD_WORDPAD
  26. #define RD_NATIVE RD_RICHTEXT
  27.  
  28. typedef BOOL (*PISFORMATFUNC)(LPCSTR pszConverter, LPCSTR pszPathName);
  29. inline BOOL IsTextType(int nType) {return ((nType==RD_TEXT) || (nType==RD_OEMTEXT));}
  30.  
  31. struct DocType
  32. {
  33. public:
  34.     int nID;
  35.     int idStr;
  36.     BOOL bRead;
  37.     BOOL bWrite;
  38.     BOOL bDup;
  39.     LPCSTR pszConverterName;
  40.     CString GetString(int nID);
  41. };
  42.  
  43. #define DOCTYPE_DOCTYPE 0
  44. #define DOCTYPE_DESC 1
  45. #define DOCTYPE_EXT 2
  46. #define DOCTYPE_PROGID 3
  47.  
  48. #define DECLARE_DOCTYPE(name, b1, b2, b3, p) \
  49. {RD_##name, IDS_##name##_DOC, b1, b2, b3, p}
  50. #define DECLARE_DOCTYPE_SYN(actname, name, b1, b2, b3, p) \
  51. {RD_##actname, IDS_##name##_DOC, b1, b2, b3, p}
  52. #define DECLARE_DOCTYPE_NULL(name, b1, b2, b3, p) \
  53. {RD_##name, NULL, b1, b2, b3, p}
  54.  
  55. extern DocType doctypes[NUM_DOC_TYPES];
  56. extern int GetDocTypeFromName(LPCTSTR pszPathName, CFileException& fe);
  57. extern void ScanForConverters();
  58. extern BOOL IsDLLInPath(LPCSTR lpszName);
  59. int GetIndexFromType(int nType, BOOL bOpen);
  60. int GetTypeFromIndex(int nType, BOOL bOpen);
  61. CString GetExtFromType(int nDocType);
  62. CString GetFileTypes(BOOL bOpen);
  63.