home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 5
/
ctrom5b.zip
/
ctrom5b
/
PROGRAM
/
DELPHI
/
GBUTTON
/
GBTNAPP.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1995-04-27
|
2KB
|
75 lines
program GButtonApp;
{---------------------------------------------------------------------
Very simple example application for the custom control GraphicButton
(GButtons.DLL) of the SMWCC 2.0 Custom Control Pack
Copyright (C) by Sebastian Modersohn
Note: This code file isn't documented into detail. If you have
questions to *THIS* code file or want to know some details
please contact me via CompuServe, ID 100340,1474.
---------------------------------------------------------------------}
{$IFNDEF AUTOLOAD}
You HAVE to compile this program with the global defined symbol "AUTOLOAD" !
This demonstrates the autoloading feature of the import unit GButton!
{$ENDIF}
{$R GBtnApp}
uses WinTypes, WinProcs, OWindows, ODialogs, Strings, BWCC,
{the import unit for the button; only used for autoloading!}
GButton, GBtnCo;
type
PGButtonWindow = ^TGButtonWindow;
TGButtonWindow = object(TDlgWindow)
constructor Init(AParent: PWindowsObject; AName: PChar);
procedure SetupWindow; virtual;
procedure Help(var Msg: TMessage);
virtual id_First + idHelp;
end;
{App thatinitializes the main window}
PGButtonApp = ^TGButtonApp;
TGButtonApp = object(TApplication)
procedure InitMainWindow; virtual;
end;
{ TGButtonWindow }
constructor TGButtonWindow.Init(AParent: PWindowsObject; AName: PChar);
begin
inherited Init(AParent, AName);
end;
procedure TGButtonWindow.SetupWindow;
begin
inherited SetupWindow;
end;
procedure TGButtonWindow.Help(var Msg: TMessage);
begin
WinHelp(HWindow, HelpFile, Help_Context, 100);
end;
{ TGButtonApp }
procedure TGButtonApp.InitMainWindow;
begin
MainWindow := New(PGButtonWindow, Init(nil, 'dlg_main'));
end;
var
App: TGButtonApp;
begin
App.Init('GButton Demo');
App.Run;
App.Done;
end.