OCX Controls & software technologies

 


Precision Advanced Progress Indicator


Overview


Purpose
Precision Advanced Progress Indicator is a powerful OCX control for your applications which displays a bar that lineary fills according to a value which can vary in a specified range. The completed and the remaining part of the bar can be filled with solid colors, gradients or stretched images.
Optimization
Precision Advanced Progress Indicator was written entirely in C++ and is composed of strongly optimized code. The only required libraries are the MFC and MSVCRT dll that are shipped with every version of Microsoft Windows. You do not need any additional libraries.
Small size
Advanced Progress Indicator is only 50k in size ! This means that it is very fastly loaded into your application and it does not significantly increase your final application size.
High customisability
Precision Advanced Progress Indicator has 15+ parameters you can freely set to fully customise the graphic appearance and functionality of the control.
Flicker-free refresh
Precision Advanced Progress Indicator makes use of a double-buffering technology in order to avoid unpleasant flickering effects: every graphic manipulation is done in memory and only eventually the final result is transferred to the video buffer, using all the available hardware optimizations that the graphic card provides for the BitBlt.
Any special requirement ?
If you are developing an application and found Precision Advanced Progress Indicator nearly perfect for you needs except for small details, please feel free to contact us: let's talk about it !
Documentation
All the documentation you may need on Precision Advanced Progress Indicator is on line !


QuickStart



Properties


Preliminary note: the progress bar is composed of two rectangles, which are called the completed portion and the remaining portion. The size of this two portions depends on the value that the Position property assumes. When the Position property assumes the same value of the MinimumValue property, the completed portion is empty and the remaining portion occupies the whole bar area. Conversely, when the Position property assumes the same value of the MaximumValue property, the remaining portion is empty and the completed portion occupies the whole bar area.
CompletedPortionFirstColor
Allowed values: any color
Meaning: this is the first color used in drawing the color gradient which fills the completed portion of the progress bar. If you do not want a color gradient but a single solid color, set this value equal to the value of the CompletedPortionSecondColor property. This value is actually used only if FillingStyle is equal to 0 (colors), and it is ignored if FillingStyle is equal to 1 (images).
CompletedPortionPicture
Allowed values: any image
Meaning: this is the image which is stretched in order to fill the completed portion of the progress bar. This value is actually used only if FillingStyle is equal to 1 (images), and it is ignored if FillingStyle is equal to 0 (colors).
CompletedPortionSecondColor
Allowed values: any color
Meaning: this is the second color used in drawing the color gradient which fills the completed portion of the progress bar. If you do not want a color gradient but a single solid color, set this value equal to the value of the CompletedPortionFirstColor property. This value is actually used only if FillingStyle is equal to 0 (colors), and it is ignored if FillingStyle is equal to 1 (images).
DrawTextShadow
Allowed values: True, False
Meaning: indicates whether the text of the control is to be drawn with a shadow. The shadow is drawn using the selected color and offset. Refer to the ShadowColor and ShadowOffset properties.
FillingStyle
Allowed values: 0, 1
Meaning: indicates whether the two parts of the bar are to be filled with color gradients (if the value is equal to 0) or with stretched images (if the value is equal to 1).
Font
Allowed values: any font
Meaning: this is the font with which the text of the control is draw on the bar.
HorizontalLayout
Allowed values: True, False
Meaning: if this property is set to True, the completed portion of the bar is a rectangle which grows from the left to the right, otherwise it grows from the bottom to the top.
MaximumValue
Allowed values: any real value
Meaning: this is the maximum value which the Position property can assume. For example, if you want to represent a percentage, you should set this property to 100.
MinimumValue
Allowed values: any real value
Meaning: this is the minimum value which the Position property can assume. For example, if you want to represent a percentage, you should set this property to 0.
Position
Allowed values: any real value between MinimumValue and MaximumValue
Meaning: this is the istantaneous actual value you want to represent. The sizes of the completed portion of the bar and of the remaining portion are calculated on the differences (Position - MinimumValue) and (MaximumValue - Position).
RemainingPortionFirstColor
Allowed values: any color
Meaning: this is the first color used in drawing the color gradient which fills the remaining portion of the progress bar. If you do not want a color gradient but a single solid color, set this value equal to the value of the RemainingPortionSecondColor property. This value is actually used only if FillingStyle is equal to 0 (colors), and it is ignored if FillingStyle is equal to 1 (images).
RemainingPortionPicture
Allowed values: any image
Meaning: this is the image which is stretched in order to fill the remaining portion of the progress bar. This value is actually used only if FillingStyle is equal to 1 (images), and it is ignored if FillingStyle is equal to 0 (colors).
RemainingPortionSecondColor
Allowed values: any color
Meaning: this is the second color used in drawing the color gradient which fills the remaining portion of the progress bar. If you do not want a color gradient but a single solid color, set this value equal to the value of the CompletedPortionFirstColor property. This value is actually used only if FillingStyle is equal to 0 (colors), and it is ignored if FillingStyle is equal to 1 (images).
ShadowColor
Allowed values: any color
Meaning: this color is used to draw the text shadow. The text shadow is actually drawn only if DrawTextShadow property is set to True, and it is actually visible only if you specify a ShadowOffset different from zero, otherwise the text will exactly overlap its shadow, therefore hiding it.
ShadowOffset
Allowed values: any integer value
Meaning: this value indicates the number of pixels the text shadow is shifted with respect to the text. If this value is positive, the text shadow is drawn down and right of the text (therefore simulating a light positioned on the top-left angle of the monitor); otherwise, if this value is negative, the text shadow is drawn up and left of the text (therefore simulating a light positioned on the bottom-right angle of the monitor). The text shadow is actually drawn only if DrawTextShadow property is set to True.
StepValue
Domain:any real number (recommended less than or equal in modulus to the difference between MaximumValue and MinimumValue).
Default value:1
Meaning: this is the increment value added to Value every time the StepIt method is invoked. You can set a negative increment, thus causing a decrement every time StepIt is called.
TextColor
Allowed values: any color
Meaning: this color is used to draw the text. The text is actually drawn only if the TextFormatString property brings to a non-null string.
TextFormatString
Allowed values: any appropriate format string
Meaning: this is a standard C format string. If you do not want a text label on your control, you can simply set this property to an empty string. If you want to specify a simple text string, set this property to the desired string. Otherwise, you can use a format string in order to display the value that is currently assumed by the Position property. The format string is a stringe composed by a preceeding text, the placeholder for the value and a following text. The placeholder is composed of a percent sign, an (optional) padding size indicator, an (optional) precision indicator (preceeded by a dot) and an "f" character. Examples are provided in the following table. Since the percent character is used to indicate the placeholder, if you want to represent the percent sign itself, you will use two percent sign.

Format string Result
%f 50.000000
value=%f value=50.000000
%.2f percent 50.00 percent
%06.2f 050.00
%.0f %% 50 %
blah %.0f blah blah 50 blah


Methods


StepIt
Parameters: none
Meaning: calling this method, you cause the increment of the Position property by StepValue.