A way to point a progress bar to a specific time?
Hello all,
So I wondered if it is able to point a progressbar to a specific amount of time.
For example:
Start date: 10-01-2012
Current date: 15-01-2012
Finish date: 20-01-2012
So the progress bar's current value is 50% because we're half way of days.
I think this is the best explanation I can give.
Thanks
Re: A way to point a progress bar to a specific time?
Sure, just use PBM_SETRANGE to assign an interval that fits your need (days/hours or some other choice) and then use PBM_SETPOS to adjust it. You can also use the step functionality.
See http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx
Re: A way to point a progress bar to a specific time?
Quote:
Originally Posted by
Miraclezz
Hello all,
So I wondered if it is able to point a progressbar to a specific amount of time.
For example:
Start date: 10-01-2012
Current date: 15-01-2012
Finish date: 20-01-2012
So the progress bar's current value is 50% because we're half way of days.
I think this is the best explanation I can give.
Thanks
What would be the alternative? Progress bars would set their position randomly? Of course you can position it wherever you want. Did you read the documentation?
Re: A way to point a progress bar to a specific time?
Quote:
Originally Posted by
GCDEF
What would be the alternative? Progress bars would set their position randomly? Of course you can position it wherever you want. Did you read the documentation?
You mean I read this? : http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx ?
Yes I did, but I didn't become wiser.
I need some examples if it's possible.
Start: 10-01-2012 00:00:00
Current: 15-01-2012 12:00:00
Finish: 20-01-2012 00:00:00
Re: A way to point a progress bar to a specific time?
Re: A way to point a progress bar to a specific time?
Quote:
Originally Posted by
S_M_A
And particularly here
and here
If you're using MFC, you'll probably find the CProgressCtrl class easier.
Re: A way to point a progress bar to a specific time?
Mmm,
This is the worst example.
But how to decrease a current time with a time in, for example, a textbox.
I have this 0,0
String^ listViewDate = listView1->Items->SubItems[2]->Text;
String^ DateAndTime = tsslDATEANDTIME->Text;
int ProcessToGo = listViewDate - DateAndTime;
Re: A way to point a progress bar to a specific time?
Quote:
Originally Posted by
Miraclezz
Mmm,
This is the worst example.
But how to decrease a current time with a time in, for example, a textbox.
I have this 0,0
String^ listViewDate = listView1->Items->SubItems[2]->Text;
String^ DateAndTime = tsslDATEANDTIME->Text;
int ProcessToGo = listViewDate - DateAndTime;
That code isn't appropriate for this forum. You need one of the .net forums.
Re: A way to point a progress bar to a specific time?
Quote:
Code:
String^ listViewDate = listView1->Items->SubItems[2]->Text;
String^ DateAndTime = tsslDATEANDTIME->Text;
int ProcessToGo = listViewDate - DateAndTime;
You need to convert DateAndTime string to some Date/Time type supporting subtraction operation. Then you calculate a time span in seconds or something. Having two time spans you can calculate the progress ratio.