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.

174 lines
4.3 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corp., 1991 **/
  4. /**********************************************************************/
  5. /*
  6. opens.hxx
  7. class declaration for the Open Files dialog class.
  8. FILE HISTORY:
  9. chuckc 30-Sep-1991 Created
  10. beng 06-Apr-1992 includes strnumer.hxx
  11. */
  12. #ifndef _OPENS_HXX_
  13. #define _OPENS_HXX_
  14. #include <lmobj.hxx>
  15. #include <lmofile.hxx>
  16. #include <lmoersm.hxx>
  17. #include <lmoefile.hxx>
  18. #include <openfile.hxx>
  19. #include <strnumer.hxx>
  20. APIERR DisplayOpenFiles( HWND hwndParent,
  21. WORD wSelectType,
  22. const TCHAR * pszResource ) ;
  23. /*************************************************************************
  24. NAME: OPENFILES_LBI
  25. SYNOPSIS: This class represents one item in the OPENFILES_LBOX.
  26. INTERFACE: OPENFILES_LBI - Class constructor.
  27. ~OPENFILES_LBI - Class destructor.
  28. Paint - Draw an item.
  29. Compare - Compare two items.
  30. PARENT: OPEN_LBI_BASE
  31. USES: NLS_STR
  32. HISTORY:
  33. ChuckC 10/6/91 Created
  34. beng 06-Apr-1992 Use string-formatter class
  35. beng 22-Apr-1992 Changes to LBI::Paint
  36. **************************************************************************/
  37. class OPENFILES_LBI : public OPEN_LBI_BASE
  38. {
  39. private:
  40. DEC_STR _nlsID;
  41. protected:
  42. /*
  43. * This method paints a single item into the listbox.
  44. */
  45. virtual VOID Paint( LISTBOX *plb,
  46. HDC hdc,
  47. const RECT *prect,
  48. GUILTT_INFO *pGUILTT ) const;
  49. /*
  50. * This method compares two listbox items. This
  51. * is used for sorting the listbox.
  52. */
  53. virtual INT Compare( const LBI * plbi ) const;
  54. public:
  55. OPENFILES_LBI( const TCHAR *pszUserName,
  56. const TCHAR *pszPath,
  57. UINT uPermissions,
  58. ULONG cLocks,
  59. ULONG ulFileID) ;
  60. virtual ~OPENFILES_LBI();
  61. }; // class OPENFILES_LBI
  62. /*************************************************************************
  63. NAME: OPENFILES_LBOX
  64. SYNOPSIS: This listbox lists the files open on a server.
  65. INTERFACE: OPENFILES_LBOX - Class constructor.
  66. ~OPENFILES_LBOX - Class destructor.
  67. PARENT: OPEN_LBOX_BASE
  68. USES: DMID_DTE
  69. HISTORY:
  70. ChuckC 10/6/91 Created
  71. **************************************************************************/
  72. class OPENFILES_LBOX : public OPEN_LBOX_BASE
  73. {
  74. protected:
  75. virtual OPEN_LBI_BASE *CreateFileEntry(const FILE3_ENUM_OBJ *pfi3) ;
  76. public:
  77. OPENFILES_LBOX( OWNER_WINDOW *powOwner,
  78. CID cid,
  79. const NLS_STR &nlsServer,
  80. const NLS_STR &nlsBasePath );
  81. ~OPENFILES_LBOX();
  82. //
  83. // The following macro will declare (& define) a new
  84. // QueryItem() method which will return an OPENFILES_LBI *.
  85. //
  86. DECLARE_LB_QUERY_ITEM( OPENFILES_LBI )
  87. }; // class OPENFILES_LBOX
  88. /*************************************************************************
  89. NAME: OPENFILES_DIALOG
  90. SYNOPSIS: This dialog displays the files open on a server, and
  91. allows user to selectively close them.
  92. INTERFACE: OPENFILES_DIALOG - Class constructor.
  93. ~OPENFILES_DIALOG - Class destructor.
  94. PARENT: OPEN_DIALOG_BASE
  95. USES:
  96. HISTORY:
  97. ChuckC 10/6/91 Created
  98. **************************************************************************/
  99. class OPENFILES_DIALOG : public OPEN_DIALOG_BASE
  100. {
  101. private:
  102. SLE _slePath;
  103. //
  104. // This listbox contains the open resource from the
  105. // target server.
  106. //
  107. OPENFILES_LBOX _lbFiles;
  108. public:
  109. OPENFILES_DIALOG ( HWND hDlg,
  110. const TCHAR *pszFile,
  111. const TCHAR *pszServer,
  112. const TCHAR *pszBasePath);
  113. virtual ULONG QueryHelpContext ( void ) ;
  114. };
  115. #endif // _OPENFILES_HXX_