GrafStat
Graphical Status Control version 1.0
Copyright © 1991 by Object Productivity, Inc.

Purpose

GrafStat is a custom control that displays a graphical gauge representing the status of a given process.  Currently, GrafStat can emulate one general type of gauge, the indicator.  The indicator linearly represents an integer magnitude within a given range by displaying, graphically, it's current value.  The indicator provides two styles, thermometer and needle.  The thermometer style represents process-status' as a partially "filled" value-region within a rectangular area.  The needle style similarly represents process-status', except that the value region (including and previous to the value mark) is not filled.  All GrafStat styles allow the customization of their appearance and function (e.g. display value or percent text, changing colors, orientation, etc.).  In the future, GrafStat will be extended to emulate several additional types of gauges and many different styles.  Currently, GrafStat is simple, yet is valuable in uses such as file-transfer, installation, data-acquisition, performance analysis, and compression, to name a few.

Function

The GrafStat control has 3 general areas of functionality, namely, setting the style, setting the range, and setting the current value (position).  Currently, the GrafStat control supports the two basic styles mentioned above (i.e. therm., needle), with additional options to effect the orientation of the control and the display of a current value.  When the GrafStat control is first created via CreateWindow, or instantiated via a dialog template, it's default appearance is a rectangle with a white background, red foreground, and thermometer style with percent status of 0% out of a range of 100.  When using a dialog or form editor, the user can move and resize this control to any rectangular size.  Additionally, the user can set the style of the control to an indicator type of thermometer or needle, orientation of vertical or horizontal, aspect of percent or value, progress of fill-right/down, fill-left/up, empty-right/down, or fill-left-up, and toggle the display of the current value to display or no display.  After a GrafStat control has been created via a dialog or the CreateWindow function, the developer can manipulate the control via messages as described bellow.  Please see the demonstration application GSDEMO.EXE for a "look-and-feel" of the functionality of GrafStat.

Messages

The following messages allow the developer to manipulate an instance of a GrafStat control by sending messages via the SendMessage function.  Each message is listed with a description of the word-parameter (wParam).  The long-parameter (lParam) is not used in any of these messages.  See your SDK or Windows reference for more information on this or related topics.

GSM_SETSTYLE		Set the style of the grafstat control, wParam=style.
			The style can include any combination of styles, one from each line,

			GSS_THERMOMETER or GSS_NEEDLE
			GSS_HORIZONTAL or GSS_VERTICAL
			GSS_PERCENT or  GSS_VALUE
			GSS_TEXT or GSS_NOTEXT
			GSS_FILL or GSS_EMPTY
			GSS_RIGHTDOWN or GSS_LEFTUP

		See the demonstration source-code and executable for examples of these styles and 			their appearance.

GSM_SETRANGE		Set the range of the grafstat control, wParam=integer-range (not int type).

GSM_SETPOSITION	Set the position of the grafstat control, wParam=integer-position (not int type).

GSM_DELTAPOSITION	Add to the current position, wParam=integer-delta (value to add to current position).

GSM_SETFORGCOLOR	Set the foreground (indicator) color, wParam=CREF (rgb value, see your SDK).

GSM_SETBACKCOLOR	Set the background color, wParam=CREF (rgb value).