home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
pcmagazi
/
1992
/
20
/
ln1120
/
test3.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1992-07-30
|
1KB
|
48 lines
{
Title: TEST3.PAS
Caption:This small program is the test platform for the TBWCCFilDlg, which
customizes the Open common dialog with BWCC controls.
}
program Test3;
uses winprocs, wintypes, wobjects, strings, commdlg, custom2;
{$R Test3}
type
TMyApp = object(TApplication)
procedure InitMainWindow; virtual;
end;
PMyMainWindow = ^TMyMainWindow;
TMyMainWindow = object(TMDIWindow)
procedure cmFileOpen(var Msg: TMessage); virtual cm_First + 101;
end;
procedure TMyMainWindow.cmFileOpen(var Msg: TMessage);
var
FileName: array [0..79] of Char;
Result: Integer;
begin
StrCopy(FileName, '*.pas');
Result := Application^.ExecDialog(new(PBWCCFileDlg,
Init(@Self, OFN_FileMustExist, Filename, SizeOf(Filename))));
if Result = idOk then
MessageBox(HWindow, Filename, 'You selected', mb_OK);
end;
procedure TMyApp.InitMainWindow;
begin
MainWindow := new(PMyMainWindow, Init('Test CommDlg',
LoadMenu(HInstance, 'MainMenu')));
end;
var MyApp: TMyApp;
begin
MyApp.Init('TestCommDlg');
MyApp.Run;
MyApp.Done;
end.