Progress Bar control help

Function help:

Real API_Progress_Create (Real Parent Handle, Real X, Real Y, Real Width, Real Height, Real Style Flags, Real Extended Style Flags);

This function creates a new progress bar control.

Argument list:
(0) Parent Handle: Identifies the window handle of the window to create this control on.
(1) X: The horizontal position of the control in pixels, relative to the parent window.
(2) Y: The vertical position of the control in pixels, relative to the parent window.
(3) Width: The horizontal size of the control in pixels.
(4) Height: The vertical size of the control in pixels.
(5) Style Flags: The style flags, supports the Global Control Styles and the following styles:

PBS_MARQUEE
The progress indicator does not grow in size but instead moves repeatedly along the length of the bar, indicating activity without specifying what proportion of the progress is complete.

PBS_SMOOTH
The progress bar displays progress status in a smooth scrolling bar instead of the default segmented bar.
Note This style is supported only in the Windows Classic theme. All other themes override this style.

PBS_VERTICAL
The progress bar displays progress status vertically, from bottom to top.

Style flags can be separated by a bitwise or '|' operator.

(6) Extended Style Flags: This can be any combination of the Global Extended Control Styles.

Return value:
If this function succeeds, it returns the Control ID of the control, otherwise it returns 0.


Real API_Progress_GetPos ( Real Control ID)

This function returns the current position of the progress bar.

Return value:
Returns the position of the progress bar.
Real API_Progress_GetRange ( Real Control ID, Real Range type)

This function returns the current range of the progress bar.

Range types:
0 - Return min value
1 - Return max value

Return value:
Returns the range value.
Real API_Progress_SetPos ( Real Control ID, Real Position)

This function changes the position of the progress bar.

Return value:
Returns the previous position.
Real API_Progress_SetRange ( Real Control ID, Real Minimum, Real Maximum )

This function changes the range of the progress bar.

Return value:
If this function succeeds, it returns true (1), otherwise it returns false (0).
Real API_Progress_SetMarquee ( Real Control ID, Real Enable Marquee, Real Update time)

Argument list:
0: Control ID: The Control ID, returned by API_Progress_Create.
1: Enable marquee: Use 1 to enable marquee mode, or use 0 to disable it.
2: Update Time: Update time in miliseconds, for example 100 miliseconds makes the marquee refresh 10 times a second.

Return value:
Always returns true (1).

Example code:

is
Progress1 = API_Progress_Create ( Win, 5,5, 100, 20, 0, 0);

API_Progress_SetRange (Progress1, 0, 100); // The progress bar pos can range from 0 to 100.

API_Progress_SetPos (Progress1,50); // The progress bar is set to 50, it's half way filled.

Return to help index