Shoutbox

[?] Dynamic Range - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [?] Dynamic Range (/showthread.php?tid=83880)

[?] Dynamic Range by Spunky on 05-23-2008 at 02:57 AM

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?


RE: [?] Dynamic Range by Volv on 05-23-2008 at 03:20 AM

A cheaper (and simpler) work-around: just make the max value a large number and change the incremental amounts :p I believe that's what most applications of progress bars do anyway


RE: [?] Dynamic Range by Spunky on 05-23-2008 at 04:21 AM

It'll take a lot of "calculating" though :( lol


RE: [?] Dynamic Range by felipEx on 05-23-2008 at 04:54 AM

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