quote:
Originally posted by SpunkyLoveMuff
I'm trying to make a progress bar, but I need the maximum range value to update every now and then, without re-writing the XML file and preferably without closing the window at all. I'm assuming there must be some sort of API to take care of this?
Yes, you can do it by sending some messages to your Progressbar control ;)
quote:
Originally posted by Progress Bar Control Reference @ MSDN
PBM_SETRANGE Message
Sets the minimum and maximum values for a progress bar and redraws the bar to reflect the new range.
PBM_SETPOS Message
Sets the current position for a progress bar and redraws the bar to reflect the new position.
code:
var PBM_SETRANGE = 0x0401;
var PBM_SETPOS = 0x0402;
code:
var _min = 0;
var _max = 100;
PlusWnd.SendControlMessage("Your_Progressbar", PBM_SETRANGE, 0, (_min & 0xFFFF) | ((_max & 0xFFFF) << 16));
code:
var _newposition = 50;
PlusWnd.SendControlMessage("Your_Progressbar", PBM_SETPOS, _newposition, 0);
* see also:
Progress Bar Control Reference