home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 1995 May
/
pcw-0595.bin
/
demos
/
databeck
/
wsounds
/
setup.dir
/
wswsrc.exe
/
SHOWRDLG.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1992-12-02
|
2KB
|
70 lines
Unit ShowRDlg;
INTERFACE
uses WinTypes, WinProcs, WinDos, WObjects, Strings, MMSystem,
DataObj, WaveIO;
const
dn_ShowRDlg = 'SHOWRDLG';
id_SDir = 1100;
id_File = 1101;
id_Start = 1102;
id_VName = 1103;
id_FilN = 1104;
type
PShowRDlg = ^TShowRDlg;
TShowRDlg = object(TDialog)
CurrCollect : PWaveCollection;
CurrPath : DirStr;
State : Integer;
constructor Init(AParent: PWindowsObject;AName: PChar; ACollect : PWaveCollection; APName : DirStr; AState : Integer);
procedure SetupWindow; virtual;
Procedure HandleStartScan(VAR Msg : TMessage);virtual id_First + id_Start;
end;
implementation
constructor TShowRDlg.Init(AParent: PWindowsObject;
AName: PChar; ACollect : PWaveCollection; APName : DirStr; AState : Integer);
begin
TDialog.Init(AParent, AName);
CurrCollect := ACollect;
CurrPath := APName;
State := AState;
end;
procedure TShowRDlg.SetupWindow;
VAR
ACount : Word;
Out : Array [0..6] of char;
Msg : TMessage;
begin
TDialog.SetupWindow;
{
SetDlgItemText(HWindow, id_SDir, CurrPath);
SetDlgItemText(HWindow, id_File, '*.WAV');
}
TWindowsObject.Show(sw_Show);
HandleStartScan(Msg);
end;
Procedure TShowRDlg.HandleStartScan(VAR Msg : TMessage);
BEGIN
SetDlgItemText(HWindow, id_VName, 'Directory :');
SetDlgItemText(HWindow, id_FilN, 'File :');
Case State of
0 : BEGIN
WD_ReadOneDir(HWindow, CurrPath,0,CurrCollect);
END;
1 : BEGIN
WD_ReadRecDir(HWindow, CurrPath,0,CurrCollect);
END;
END;
OK(Msg);
end;
BEGIN
END.