MMCSTDLG.INT 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. {========================================================================}
  2. {= (c) 1995-98 SwiftSoft Ronald Dittrich =}
  3. {========================================================================}
  4. {= All Rights Reserved =}
  5. {========================================================================}
  6. {= D 01099 Dresden = Tel.: +0351-8012255 =}
  7. {= Loewenstr.7a = info@swiftsoft.de =}
  8. {========================================================================}
  9. {= Actual versions on http://www.swiftsoft.de/mmtools.html =}
  10. {========================================================================}
  11. {= This code is for reference purposes only and may not be copied or =}
  12. {= distributed in any format electronic or otherwise except one copy =}
  13. {= for backup purposes. =}
  14. {= =}
  15. {= No Delphi Component Kit or Component individually or in a collection=}
  16. {= subclassed or otherwise from the code in this unit, or associated =}
  17. {= .pas, .dfm, .dcu, .asm or .obj files may be sold or distributed =}
  18. {= without express permission from SwiftSoft. =}
  19. {= =}
  20. {= For more licence informations please refer to the associated =}
  21. {= HelpFile. =}
  22. {========================================================================}
  23. {= $Date: 20.01.1998 - 18:00:00 $ =}
  24. {========================================================================}
  25. unit MMCstDlg;
  26. {$I COMPILER.INC}
  27. interface
  28. uses
  29. {$IFDEF WIN32}
  30. Windows,
  31. {$ELSE}
  32. WinProcs,
  33. WinTypes,
  34. {$ENDIF}
  35. Messages,
  36. SysUtils,
  37. Classes,
  38. Graphics,
  39. Controls,
  40. Forms,
  41. Dialogs,
  42. CommDlg,
  43. ExtCtrls,
  44. MMObj,
  45. MMWave,
  46. MMWavOut,
  47. MMPCMSup,
  48. MMWaveIO,
  49. MMRiff,
  50. MMMulDiv,
  51. MMUtils,
  52. MMString,
  53. MMACMDlg,
  54. MMDIB;
  55. type
  56. {$IFNDEF WIN32}
  57. POpenFilenameA = ^TOpenFilenameA;
  58. TOpenFilenameA = record
  59. lStructSize: Longint;
  60. hWndOwner: HWnd;
  61. hInstance: THandle;
  62. lpstrFilter: PChar;
  63. lpstrCustomFilter: PChar;
  64. nMaxCustFilter: Longint;
  65. nFilterIndex: Longint;
  66. lpstrFile: PChar;
  67. nMaxFile: Longint;
  68. lpstrFileTitle: PChar;
  69. nMaxFileTitle: Longint;
  70. lpstrInitialDir: PChar;
  71. lpstrTitle: PChar;
  72. Flags: Longint;
  73. nFileOffset: Word;
  74. nFileExtension: Word;
  75. lpstrDefExt: PChar;
  76. lCustData: Longint;
  77. lpfnHook: function (Wnd: HWnd; Msg, wParam: Word; lParam: Longint): Word;
  78. lpTemplateName: PChar;
  79. end;
  80. {$ENDIF}
  81. TSelChangeEvent= procedure(Sender : TObject; Filename: String) of Object;
  82. TFileOKEvent = procedure(Sender : TObject; Filename: String; var IsOk: Boolean) of Object;
  83. TCommandEvent = procedure(Sender : TObject; Wnd,Parent,cmd: Integer) of Object;
  84. {-- TMMCustomOpenDialog -------------------------------------------------}
  85. TMMCustomOpenDialog = class(TMMCommonDialog)
  86. public
  87. constructor Create(AOwner: TComponent); override;
  88. destructor Destroy; override;
  89. function Execute: Boolean; virtual;
  90. property Files: TStrings read FFiles;
  91. property Wnd: HWnd read FHWnd write FHWnd;
  92. end;
  93. {-- TMMWaveOpenDialog --------------------------------------------------}
  94. TMMWaveOpenDialog = class(TMMCustomOpenDialog)
  95. public
  96. constructor Create(AOwner: TComponent); override;
  97. destructor Destroy; override;
  98. published
  99. property OnFileOK: TFileOKEvent read FOnFileOK write FOnFileOK;
  100. property FileName;
  101. property Filter;
  102. property FilterIndex;
  103. property InitialDir;
  104. property Title;
  105. property Options;
  106. property Color: TColor read FColor write FColor default clBlack;
  107. property ForeColor: TColor read FForeColor write FForeColor default clLime;
  108. property LocatorColor: TColor read FLocatorColor write FLocatorColor default clRed;
  109. property Preview: Boolean read FPreview write FPreview default False;
  110. property AutoPlay: Boolean read FAutoPlay write FAutoPlay default False;
  111. property DeviceID: integer read FDeviceID write FDeviceID default -1;
  112. end;
  113. {-- TMMWaveSaveDialog ---------------------------------------------------}
  114. TMMWaveSaveDialog = class(TMMWaveOpenDialog)
  115. public
  116. constructor Create(AOwner: TComponent); override;
  117. function Execute: Boolean; override;
  118. end;
  119. {-- TMMPictureOpenDialog ----------------------------------------------}
  120. TMMPictureOpenDialog = class(TMMCustomOpenDialog)
  121. public
  122. constructor Create(AOwner: TComponent); override;
  123. destructor Destroy; override;
  124. published
  125. property OnFileOK: TFileOKEvent read FOnFileOK write FOnFileOK;
  126. property DefaultExt;
  127. property FileName;
  128. property Filter;
  129. property FilterIndex default 1;
  130. property InitialDir;
  131. property Title;
  132. property Options;
  133. property Color: TColor read FColor write FColor default clWindow;
  134. property Preview: Boolean read FPreview write FPreview default False;
  135. end;
  136. {-- TMMPictureSaveDialog ----------------------------------------------}
  137. TMMPictureSaveDialog = class(TMMPictureOpenDialog)
  138. public
  139. constructor Create(AOwner: TComponent); override;
  140. function Execute: Boolean; override;
  141. end;
  142. implementation