Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

141 lines
5.6 KiB

  1. #ifndef NO_MMSYSTEMH
  2. #define NO_MMSYSTEMH
  3. #endif
  4. #include <windows.h> /* added -sdj*/
  5. /*---------------------------------------------------------------------------*/
  6. /* Option Declarations - FileOpen() */
  7. /*---------------------------------------------------------------------------*/
  8. #define FO_GETFILE 0x0000
  9. #define FO_PUTFILE 0x0001
  10. #define FO_FILEEXIST 0x0002
  11. #define FO_FORCEEXTENT 0x0004 /* mbbx 2.00: no forced extents */
  12. #define FO_BATCHMODE 0x1000
  13. #define FO_NONDOSFILE 0x2000
  14. #define FO_REMOTEFILE 0x4000
  15. #define FO_GETFILENAME2 0x8000
  16. /*---------------------------------------------------------------------------*/
  17. /* Constant Declarations */
  18. /*---------------------------------------------------------------------------*/
  19. #define FO_MAXPATHLENGTH 513
  20. #define FO_MAXFILELENGTH 16
  21. #define FO_MAXEXTLENGTH 16
  22. /*---------------------------------------------------------------------------*/
  23. /* Type Declarations */
  24. /*---------------------------------------------------------------------------*/
  25. #define FILEOPENDATA struct tagFileOpenData
  26. struct tagFileOpenData
  27. {
  28. BYTE file[FO_MAXPATHLENGTH];
  29. BYTE file1[FO_MAXFILELENGTH];
  30. BYTE file2[FO_MAXPATHLENGTH]; /* must be able to hold PATH */
  31. BYTE extent[FO_MAXEXTLENGTH];
  32. BYTE title[32]; /* mbbx 1.10: CUA... */
  33. WORD wResID;
  34. DLGPROC lpFilter; /* mbbx 2.00: new FO hook */
  35. WORD wMode;
  36. INT nType; /* mbbx 1.10: CUA */
  37. };
  38. /*---------------------------------------------------------------------------*/
  39. /* Variable Declarations */
  40. /*---------------------------------------------------------------------------*/
  41. FILEOPENDATA *pFOData;
  42. /*---------------------------------------------------------------------------*/
  43. /* Rescource ID Declarations */
  44. /*---------------------------------------------------------------------------*/
  45. #define FO_STR_ERRCAPTION 0x0300
  46. #define FO_STR_WARNCAPTION 0x0301
  47. #define FO_STR_BADFILENAME 0x0302
  48. #define FO_STR_FILENOTFOUND 0x0303
  49. #define FO_STR_REPLACEFILE 0x0304
  50. #define FO_LBFILE 0x0000 /* list FILES only */
  51. #define FO_LBDIR 0xC010 /* list DIRECTORIES only */
  52. #define FO_DBFILEOPEN 601
  53. #define FO_DBFILETYPE 602
  54. #define FO_DBSNDTEXT 603
  55. #define FO_DBSNDFILE 604
  56. #define FO_DBCOMPILE 605 /* mbbx 2.00: auto save DCP */
  57. #define FO_DBFILESAVE 611
  58. #define FO_DBFILEAPPEND 612
  59. #define FO_DBRCVTEXT 613
  60. #define FO_DBRCVFILE 614
  61. #define FO_IDTITLE 621
  62. #define FO_IDPROMPT 631
  63. #define FO_IDFILENAME 632
  64. #define FO_IDPROMPT2 633
  65. #define FO_IDFILENAME2 634
  66. #define FO_IDPATH 635
  67. #define FO_IDFILELIST 641
  68. #define FO_IDDIRLIST 642
  69. #define FO_IDSETTINGS 651
  70. #define FO_IDSCRIPT 652
  71. #define FO_IDMEMO 653
  72. #define FO_IDAPPEND 691
  73. #define FO_IDCTRL 692
  74. #define FO_IDTABLE 693
  75. #define FO_IDSNDLF 694
  76. #define FO_IDSNDNOLF 695
  77. /*---------------------------------------------------------------------------*/
  78. /* Function Prototypes */
  79. /*---------------------------------------------------------------------------*/
  80. BOOL FileOpen(BYTE *, BYTE *, BYTE *, BYTE *, BYTE *, WORD, DLGPROC, WORD); /* mbbx 2.00: new FO hook scheme... */
  81. /* BOOL FileOpen(HWND, HANDLE, BYTE *, BYTE *, BYTE *, BYTE *, BYTE *, WORD, WORD); */
  82. INT_PTR APIENTRY dbFileOpen(HWND, UINT, WPARAM, LPARAM);
  83. BOOL NEAR FO_SaveFileName(HWND); /* mbbx 2.00 */
  84. VOID NEAR FO_SetListItem(HWND, WORD, BOOL);
  85. VOID NEAR FO_NewFilePath(HWND, WORD, BYTE *, BYTE *);
  86. BOOL NEAR FO_AddFileType(BYTE *, BYTE *);
  87. VOID NEAR FO_StripFileType(BYTE *);
  88. BOOL NEAR FO_IsLegalDOSFN(BYTE *); /* mbbx 2.00: no forced extents... */
  89. BOOL NEAR FO_IsLegalDOSCH(BYTE);
  90. BOOL NEAR FO_IsLegalFN(BYTE *);
  91. INT NEAR FO_ErrProc(WORD, WORD,HWND);
  92. BOOL NEAR FO_SetCtrlFocus(HWND, HWND);
  93. BOOL setPath(BYTE *, BOOL, BYTE *);
  94. BOOL setFilePath(BYTE *);
  95. VOID forceExtension(BYTE *, BYTE *, BOOL); /* mbbx 2.00: no forced extents... */
  96. BOOL getFileType(BYTE *, BYTE *);
  97. /*---------------------------------------------------------------------------*/
  98. /* mbbx 2.00: new FO hook scheme... */
  99. #ifdef ORGCODE
  100. BOOL APIENTRY FO_FileOpenType (HWND, WORD, WORD, LONG); /* mbbx 2.00: CUA */
  101. VOID APIENTRY FO_SaveSelection(HWND, WORD, WORD, LONG);
  102. VOID APIENTRY FO_SendTextFile (HWND, WORD, WORD, LONG);
  103. VOID APIENTRY FO_RcvTextFile (HWND, WORD, WORD, LONG);
  104. VOID APIENTRY FO_ScriptCompile(HWND, WORD, WORD, LONG); /* mbbx 2.00: auto save DCP */
  105. #else
  106. INT_PTR APIENTRY FO_FileOpenType (HWND, UINT, WPARAM, LPARAM); /* mbbx 2.00: CUA */
  107. INT_PTR APIENTRY FO_SaveSelection(HWND, UINT, WPARAM, LPARAM);
  108. INT_PTR APIENTRY FO_SendTextFile (HWND, UINT, WPARAM, LPARAM);
  109. INT_PTR APIENTRY FO_RcvTextFile (HWND, UINT, WPARAM, LPARAM);
  110. INT_PTR APIENTRY FO_ScriptCompile(HWND, UINT, WPARAM, LPARAM); /* mbbx 2.00: auto save DCP */
  111. #endif