home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 13
/
mediashare_13.zip
/
mediashare_13
/
ZIPPED
/
PROGRAM
/
WTJ9403.ZIP
/
FOLEY
/
METER.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1993-04-07
|
2KB
|
77 lines
{$S-,R-,V-,I-,B-,F-,W-,A-,G+,X+}
{$C MOVEABLE,DEMANDLOAD,DISCARDABLE}
{*********************************************************}
{* METER.PAS 1.00 *}
{* Copyright (c) Brian Foley 1993. *}
{* All rights reserved. *}
{*********************************************************}
unit Meter;
{-OWL interface to the meter control in DLLMETER}
interface
uses
WinTypes, WinProcs,
{$IFDEF Ver15}
wObjects;
{$ELSE}
OWindows, ODialogs;
{$ENDIF}
const
{special messages for meter controls}
mm_SetMeterValue = wm_User+0;
mm_SetLeftColor = wm_User+1;
mm_SetRightColor = wm_User+2;
type
PMeterControl = ^TMeterControl;
TMeterControl = object(TControl)
procedure SetMeterValue(N : Byte);
{-Set the value represented by the meter control}
procedure SetLeftColor(Color : LongInt);
{-Set the color used on the left side of the meter control}
procedure SetRightColor(Color : LongInt);
{-Set the color used on the right side of the meter control}
function GetClassName : PChar; virtual;
{-Return the class name of the meter control}
end;
{========================================================================}
implementation
procedure ForceLoad; far; forward;
{-Dummy routine called to force DLLMETER to be loaded}
procedure ForceLoad; external 'DLLMETER' index 1;
procedure TMeterControl.SetMeterValue(N : Byte);
{-Set the value represented by the meter control}
begin
SendMessage(hWindow, mm_SetMeterValue, N, 0);
end;
procedure TMeterControl.SetLeftColor(Color : LongInt);
{-Set the color used on the left side of the meter control}
begin
SendMessage(hWindow, mm_SetLeftColor, 0, Color);
end;
procedure TMeterControl.SetRightColor(Color : LongInt);
{-Set the color used on the right side of the meter control}
begin
SendMessage(hWindow, mm_SetRightColor, 0, Color);
end;
function TMeterControl.GetClassName : PChar;
{-Return the class name of the meter control}
begin
GetClassName := 'dllMeterControl';
{force DLLMETER to be loaded}
ForceLoad;
end;
end.