PBFolderDialog.hpp
上传用户:gyjjlc
上传日期:2013-03-29
资源大小:2124k
文件大小:6k
源码类别:

多显示器编程

开发平台:

C++ Builder

  1. // Borland C++ Builder
  2. // Copyright (c) 1995, 1999 by Borland International
  3. // All rights reserved
  4. // (DO NOT EDIT: machine generated header) 'PBFolderDialog.pas' rev: 5.00
  5. #ifndef PBFolderDialogHPP
  6. #define PBFolderDialogHPP
  7. #pragma delphiheader begin
  8. #pragma option push -w-
  9. #pragma option push -Vx
  10. #include <Registry.hpp> // Pascal unit
  11. #include <Graphics.hpp> // Pascal unit
  12. #include <Controls.hpp> // Pascal unit
  13. #include <FileCtrl.hpp> // Pascal unit
  14. #include <ShlObj.hpp> // Pascal unit
  15. #include <ActiveX.hpp> // Pascal unit
  16. #include <SysUtils.hpp> // Pascal unit
  17. #include <Dialogs.hpp> // Pascal unit
  18. #include <Forms.hpp> // Pascal unit
  19. #include <Classes.hpp> // Pascal unit
  20. #include <Messages.hpp> // Pascal unit
  21. #include <Windows.hpp> // Pascal unit
  22. #include <SysInit.hpp> // Pascal unit
  23. #include <System.hpp> // Pascal unit
  24. //-- user supplied -----------------------------------------------------------
  25. namespace Pbfolderdialog
  26. {
  27. //-- type declarations -------------------------------------------------------
  28. #pragma option push -b-
  29. enum TBrowseInfoFlags { OnlyComputers, OnlyPrinters, OnlyDomains, OnlyAncestors, OnlyFileSystem, ShowPath 
  30. };
  31. #pragma option pop
  32. typedef Set<TBrowseInfoFlags, OnlyComputers, ShowPath>  TBrowseInfoFlagSet;
  33. #pragma option push -b-
  34. enum TSHFolders { foDesktop, foDesktopExpanded, foPrograms, foControlPanel, foPrinters, foPersonal, 
  35. foFavorites, foStartup, foRecent, foSendto, foRecycleBin, foStartMenu, foDesktopFolder, foMyComputer, 
  36. foNetwork, foNetworkNeighborhood, foFonts, foTemplates };
  37. #pragma option pop
  38. class DELPHICLASS TPBFolderDialog;
  39. typedef void __fastcall (__closure *TBrowserInitializedEvent)(TPBFolderDialog* Sender, HWND DialogHandle
  40. );
  41. typedef void __fastcall (__closure *TSelectionChangedEvent)(TPBFolderDialog* Sender, HWND DialogHandle
  42. , const Shlobj::PItemIDList ItemIDList, const AnsiString Folder);
  43. class PASCALIMPLEMENTATION TPBFolderDialog : public Classes::TComponent 
  44. {
  45. typedef Classes::TComponent inherited;
  46. private:
  47. HWND FDialogHandle;
  48. HWND FNewFolderHandle;
  49. AnsiString FLabelCaption;
  50. HWND FParentHandle;
  51. AnsiString FDisplayName;
  52. int FImageIndex;
  53. AnsiString FFolder;
  54. AnsiString FSelectedFolder;
  55. TBrowseInfoFlagSet FFlags;
  56. TSHFolders FRootFolder;
  57. bool FNewFolderVisible;
  58. bool FNewFolderEnabled;
  59. AnsiString FNewFolderCaption;
  60. int FNewFolderWidth;
  61. bool FRestart;
  62. bool FValidPath;
  63. AnsiString FVersion;
  64. AnsiString FLocale;
  65. Classes::TStringList* FNewFolderCaptions;
  66. Classes::TStringList* FLabelCaptions;
  67. TBrowserInitializedEvent FOnInitialized;
  68. TSelectionChangedEvent FOnSelectionChanged;
  69. AnsiString __fastcall LocaleText(Classes::TStringList* List);
  70. AnsiString __fastcall MakeDisplayPath(AnsiString Path, int MaxL);
  71. void __fastcall Dummy(AnsiString Value);
  72. void __fastcall SetNewFolderCaption(AnsiString Value);
  73. void __fastcall SetNewFolderEnabled(bool Value);
  74. void __fastcall SetNewFolderVisible(bool Value);
  75. void __fastcall SetNewFolderWidth(int Value);
  76. void __fastcall SetNewFolderCaptions(Classes::TStringList* Value);
  77. void __fastcall SetSelectedFolder(AnsiString Value);
  78. void __fastcall SetFlags(TBrowseInfoFlagSet Value);
  79. void __fastcall SetLabelCaptions(Classes::TStringList* Value);
  80. public:
  81. __fastcall virtual TPBFolderDialog(Classes::TComponent* AOwner);
  82. virtual void __fastcall Loaded(void);
  83. __fastcall virtual ~TPBFolderDialog(void);
  84. bool __fastcall Execute(void);
  85. void __fastcall SetSelectionPIDL(const HWND Hwnd, const Shlobj::PItemIDList ItemIDList);
  86. void __fastcall SetSelectionPath(const HWND Hwnd, const AnsiString Path);
  87. void __fastcall EnableOK(const HWND Hwnd, const bool Value);
  88. void __fastcall GetIDListFromPath(AnsiString Path, Shlobj::PItemIDList &ItemIDList);
  89. __property AnsiString DisplayName = {read=FDisplayName};
  90. __property int ImageIndex = {read=FImageIndex, nodefault};
  91. __property HWND ParentHandle = {read=FParentHandle, write=FParentHandle, nodefault};
  92. __property HWND DialogHandle = {read=FDialogHandle, write=FDialogHandle, nodefault};
  93. __property HWND NewFolderHandle = {read=FNewFolderHandle, write=FNewFolderHandle, nodefault};
  94. __property AnsiString SelectedFolder = {read=FSelectedFolder, write=SetSelectedFolder};
  95. __published:
  96. __property AnsiString Folder = {read=FFolder, write=FFolder};
  97. __property TBrowseInfoFlagSet Flags = {read=FFlags, write=SetFlags, nodefault};
  98. __property TSHFolders RootFolder = {read=FRootFolder, write=FRootFolder, default=1};
  99. __property bool NewFolderVisible = {read=FNewFolderVisible, write=SetNewFolderVisible, nodefault};
  100. __property bool NewFolderEnabled = {read=FNewFolderEnabled, write=SetNewFolderEnabled, nodefault};
  101. __property int NewFolderWidth = {read=FNewFolderWidth, write=SetNewFolderWidth, default=75};
  102. __property TBrowserInitializedEvent OnInitialized = {read=FOnInitialized, write=FOnInitialized};
  103. __property TSelectionChangedEvent OnSelectionChanged = {read=FOnSelectionChanged, write=FOnSelectionChanged
  104. };
  105. __property Classes::TStringList* LabelCaptions = {read=FLabelCaptions, write=SetLabelCaptions};
  106. __property Classes::TStringList* NewFolderCaptions = {read=FNewFolderCaptions, write=SetNewFolderCaptions
  107. };
  108. __property AnsiString Version = {read=FVersion, write=Dummy};
  109. };
  110. //-- var, const, procedure ---------------------------------------------------
  111. extern PACKAGE void __fastcall Register(void);
  112. } /* namespace Pbfolderdialog */
  113. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  114. using namespace Pbfolderdialog;
  115. #endif
  116. #pragma option pop // -w-
  117. #pragma option pop // -Vx
  118. #pragma delphiheader end.
  119. //-- end unit ----------------------------------------------------------------
  120. #endif // PBFolderDialog