[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
oMsg := oWnd:oMsgBar := TMSGBAR():New( oWnd, cMsg, lCenter, lClock,;
lDate, lKeyBoard, nClrFore,;
nClrBack, oFont, lInset )
-------------------------------------------------------------------------------
DEFINE MESSAGE [ BAR ] <oMsg> ;
[ OF <oWin> ] ;
[ PROMPT <cMsg> ] ;
[ FONT <oFont> ] ;
[ COLOR | COLORS <nClrFore> [,<nClrBack> ] ] ;
[ CENTER | CENTERED ] ;
[ CLOCK | TIME ] ;
[ DATE ] ;
[ KEYBOARD ] ;
[ NO INSET | NOINSET ]
or:
SET MESSAGE [ OF <oWin> ] ;
[ TO <cMsg> ] ;
[ FONT <oFont> ] ;
[ COLOR | COLORS <nClrFore> [,<nClrBack> ] ] ;
[ CENTER | CENTERED ] ;
[ CLOCK | TIME ] ;
[ DATE ] ;
[ KEYBOARD ] ;
[ NO INSET | NOINSET ]
PARAMETER:
<oMsg> Is the reference to the message bar object that will be
created. This is the only difference between DEFINE MESSAGE
and SET MESSAGE, the later use <oMsg>
<oWin> Is the Owner window of the MessageBar. The MsgBar-Object
will be stored in the iVar oWin:oMsgbar after creation.
<cMsg> A string with that will become the message text
<oFont> The font that will be used for the message bar
<nClrFore> The foreground color that is used to draw on the message bar.
This can either be a Windows COLOR number or a Clipper color
string (ie "R/G"), in which case the nClrBack parameter
will be ignored.
<nClrBack> The background color of the dialog box. This has to be a a
Windows COLOR number.
<CENTER> This Keyword centeres the message prompt on the text area
of the message bar
<CLOCK> Install a clock on the righmost part of the bar
<DATE> Shows the current date just before the clock on the bar
<KEYBOARD> Monitors and paints the current status of the NUM, CAPS, INS
and DEL Key.
<NOINSET> By default, the message text is framed with an Inset Frame.
With this Keyword it is written on the message bars surface.
DESCRIPTION:
With this command you can easily create a segmented, MS-Word look-alike
message bar. While normally only Windows have message bars, you also
attach one to a dialog by using the ON INIT clause of the ACTIVATE DIALOG.
Please be aware, that CLOCK, DATE and KEYBOARD Infos are periodically
updated by a Timer, which eats performance and may lead to Stack problems
when you use code DLL's.
Such DLL's use the data segment of the calling app as their stack segmnet.
Timers also use lots of stack because they must be reentrant and may
overlay a running process - this can be a dangerous composition ...
EXAMPLE:
+-------------------------------------------------------------+
| /* Create a 'lets have them all' message bar */ |
| DEFINE MESSAGE oMsg OF oWin ; |
| PROMPT "This is FiveWin" ; |
| CENTER ; |
| CLOCK ; |
| DATE ; |
| KEYBOARD |
+-------------------------------------------------------------+
See Also:
DEFINE MSGITEM
ACTIVATE DIALOG
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson