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.

144 lines
4.4 KiB

  1. /**********************************************************************/
  2. /** Microsoft LAN Manager **/
  3. /** Copyright(c) Microsoft Corp., 1991 **/
  4. /**********************************************************************/
  5. /*
  6. fmx.hxx
  7. Header file for FMX class
  8. FILE HISTORY:
  9. rustanl 30-Apr-1991 Created
  10. Yi-HsinS 04-Oct-1991 Modified QuerySelection and QueryDriveInfo
  11. to return APIERRs
  12. */
  13. #ifndef _FMX_HXX_
  14. #define _FMX_HXX_
  15. /*******************************************************************
  16. NAME: GetSelItem
  17. SYNOPSIS: Gets the currently selected item from the File Manager
  18. Extensions.
  19. ENTRY: hwnd - Handle passed by File Manager for FMX uses
  20. pnlsSelItem - pointer to string to receive the selection
  21. fGetDirOnly - Indicates if a file is selected, the file
  22. should be stripped thus only the files parent dir
  23. is returned
  24. pfIsFile - Set to TRUE if the selection is a file
  25. EXIT:
  26. RETURNS: NERR_Success if successful, error code otherwise
  27. NOTES:
  28. HISTORY:
  29. Johnl 21-Jan-1992 Moved from share stuff
  30. ********************************************************************/
  31. APIERR GetSelItem( HWND hwnd,
  32. NLS_STR *pnlsSelItem,
  33. BOOL fGetDirOnly = TRUE,
  34. BOOL *pfIsFile = NULL ) ;
  35. /*******************************************************************
  36. NAME: GetSelItem
  37. SYNOPSIS: Retrieves the ith selection from the file manager
  38. ENTRY: hwnd - FMX Window handle
  39. iSelection - Retrieve this selection
  40. pnlsSelItem - file name is copied here
  41. pfIsFile - TRUE if file, FALSE if directory
  42. EXIT:
  43. RETURNS:
  44. NOTES:
  45. HISTORY:
  46. Johnl 13-Feb-1992 Created
  47. ********************************************************************/
  48. APIERR GetSelItem( HWND hwnd,
  49. UINT iSelection,
  50. NLS_STR *pnlsSelItem,
  51. BOOL *pfIsFile ) ;
  52. /*************************************************************************
  53. NAME: FMX
  54. SYNOPSIS: Communicates with File Man
  55. INTERFACE: FMX - Constructor
  56. QueryFocus - Returns where focus is
  57. QuerySelCount - Returns number of selected items
  58. QuerySelection - Returns a selected item, has a flag that
  59. defaults to converting the path from
  60. OEM to ANSI.
  61. QueryDriveInfo - Returns drive info from the currently
  62. active window
  63. Refresh - Causes File Man to refresh
  64. ReloadExtensions - Causes File Man to reload all FM extensions
  65. PARENT:
  66. CAVEATS: This is, admittedly, a primitive interface.
  67. NOTES: FMX calls are only guaranteed to work during calls out to
  68. FMExtensionProc. It would be nice if these classes could
  69. attempt to enforce this. But then, on the other hand,
  70. perhaps we'd still like to call in at some other time.
  71. To get FM's hwnd, listen for the first FMExtensionProc
  72. message. It would be nice if that could be done
  73. automatically.
  74. HISTORY:
  75. rustanl 30-Apr-1991 Created
  76. **************************************************************************/
  77. DLL_CLASS FMX
  78. {
  79. private:
  80. HWND _hwnd;
  81. ULONG_PTR Command( UINT usMsg, UINT wParam = 0, LPARAM lParam = 0 ) const;
  82. public:
  83. FMX( HWND hwnd );
  84. UINT QueryFocus( void ) const;
  85. UINT QuerySelCount( void ) const;
  86. APIERR QuerySelection( INT iSel, FMS_GETFILESEL * pselinfo,
  87. BOOL fAnsi = TRUE );
  88. APIERR QueryDriveInfo( FMS_GETDRIVEINFO * pdriveinfo );
  89. void Refresh( void );
  90. void Reload( void );
  91. //
  92. // Returns TRUE if one or more file *and* directory is selected. If
  93. // FALSE is returned, pfIsHomogeneousSelFiles is set indicating whether
  94. // the selection contains files or directories.
  95. //
  96. BOOL IsHeterogeneousSelection( BOOL * pfIsHomogeneousSelFiles = NULL ) ;
  97. }; // class FMX
  98. #endif // _FMX_HXX_