| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- {========================================================================}
- {= (c) 1995-98 SwiftSoft Ronald Dittrich =}
- {========================================================================}
- {= All Rights Reserved =}
- {========================================================================}
- {= D 01099 Dresden = Tel.: +0351-8012255 =}
- {= Loewenstr.7a = info@swiftsoft.de =}
- {========================================================================}
- {= Actual versions on http://www.swiftsoft.de/mmtools.html =}
- {========================================================================}
- {= This code is for reference purposes only and may not be copied or =}
- {= distributed in any format electronic or otherwise except one copy =}
- {= for backup purposes. =}
- {= =}
- {= No Delphi Component Kit or Component individually or in a collection=}
- {= subclassed or otherwise from the code in this unit, or associated =}
- {= .pas, .dfm, .dcu, .asm or .obj files may be sold or distributed =}
- {= without express permission from SwiftSoft. =}
- {= =}
- {= For more licence informations please refer to the associated =}
- {= HelpFile. =}
- {========================================================================}
- {= $Date: 20.01.1998 - 18:00:00 $ =}
- {========================================================================}
- unit MMCstDlg;
- {$I COMPILER.INC}
- interface
- uses
- {$IFDEF WIN32}
- Windows,
- {$ELSE}
- WinProcs,
- WinTypes,
- {$ENDIF}
- Messages,
- SysUtils,
- Classes,
- Graphics,
- Controls,
- Forms,
- Dialogs,
- CommDlg,
- ExtCtrls,
- MMObj,
- MMWave,
- MMWavOut,
- MMPCMSup,
- MMWaveIO,
- MMRiff,
- MMMulDiv,
- MMUtils,
- MMString,
- MMACMDlg,
- MMDIB;
- type
- {$IFNDEF WIN32}
- POpenFilenameA = ^TOpenFilenameA;
- TOpenFilenameA = record
- lStructSize: Longint;
- hWndOwner: HWnd;
- hInstance: THandle;
- lpstrFilter: PChar;
- lpstrCustomFilter: PChar;
- nMaxCustFilter: Longint;
- nFilterIndex: Longint;
- lpstrFile: PChar;
- nMaxFile: Longint;
- lpstrFileTitle: PChar;
- nMaxFileTitle: Longint;
- lpstrInitialDir: PChar;
- lpstrTitle: PChar;
- Flags: Longint;
- nFileOffset: Word;
- nFileExtension: Word;
- lpstrDefExt: PChar;
- lCustData: Longint;
- lpfnHook: function (Wnd: HWnd; Msg, wParam: Word; lParam: Longint): Word;
- lpTemplateName: PChar;
- end;
- {$ENDIF}
- TSelChangeEvent= procedure(Sender : TObject; Filename: String) of Object;
- TFileOKEvent = procedure(Sender : TObject; Filename: String; var IsOk: Boolean) of Object;
- TCommandEvent = procedure(Sender : TObject; Wnd,Parent,cmd: Integer) of Object;
- {-- TMMCustomOpenDialog -------------------------------------------------}
- TMMCustomOpenDialog = class(TMMCommonDialog)
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- function Execute: Boolean; virtual;
- property Files: TStrings read FFiles;
- property Wnd: HWnd read FHWnd write FHWnd;
- end;
- {-- TMMWaveOpenDialog --------------------------------------------------}
- TMMWaveOpenDialog = class(TMMCustomOpenDialog)
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- published
- property OnFileOK: TFileOKEvent read FOnFileOK write FOnFileOK;
- property FileName;
- property Filter;
- property FilterIndex;
- property InitialDir;
- property Title;
- property Options;
- property Color: TColor read FColor write FColor default clBlack;
- property ForeColor: TColor read FForeColor write FForeColor default clLime;
- property LocatorColor: TColor read FLocatorColor write FLocatorColor default clRed;
- property Preview: Boolean read FPreview write FPreview default False;
- property AutoPlay: Boolean read FAutoPlay write FAutoPlay default False;
- property DeviceID: integer read FDeviceID write FDeviceID default -1;
- end;
- {-- TMMWaveSaveDialog ---------------------------------------------------}
- TMMWaveSaveDialog = class(TMMWaveOpenDialog)
- public
- constructor Create(AOwner: TComponent); override;
- function Execute: Boolean; override;
- end;
- {-- TMMPictureOpenDialog ----------------------------------------------}
- TMMPictureOpenDialog = class(TMMCustomOpenDialog)
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- published
- property OnFileOK: TFileOKEvent read FOnFileOK write FOnFileOK;
- property DefaultExt;
- property FileName;
- property Filter;
- property FilterIndex default 1;
- property InitialDir;
- property Title;
- property Options;
- property Color: TColor read FColor write FColor default clWindow;
- property Preview: Boolean read FPreview write FPreview default False;
- end;
- {-- TMMPictureSaveDialog ----------------------------------------------}
- TMMPictureSaveDialog = class(TMMPictureOpenDialog)
- public
- constructor Create(AOwner: TComponent); override;
- function Execute: Boolean; override;
- end;
- implementation
|