go to BetaPatchClientDlg.cpp
sreach
paste under thisPHP Code:// Progress
ComplieCode:m_Total_Progress.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(255, 0, 0)); m_File_Progress.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(36, 0, 255));
go to BetaPatchClientDlg.cpp
sreach
paste under thisPHP Code:// Progress
ComplieCode:m_Total_Progress.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(255, 0, 0)); m_File_Progress.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(36, 0, 255));
Nice!
nice.
how can i change the normal GreenBlockDesign to a Colored Line (red 0% -> green 100%)?
Make IFs or loops in source of patcher based on progressbar percentage
i think something like this
Code:for (int i;i<100;i++) { int value=(255/(100/i)); m_Total_Progress.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(255, 0, 0)); m_File_Progress.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(value, 0, 255)); }
im not a pro coder...learning...hmmmm......this works fine:
// Progress ÃʱâÈ
m_Total_Progress.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(0, 153, 0));
m_File_Progress.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(255, 0, 0));
m_File_Progress.SetPos(0);
m_Total_Progress.SetPos(0);
but this gives an error (warning C4700: local variable 'i' used without having been initialized)
// Progress ÃʱâÈ
for (int i;i<100;i++)
{
int value=(255/(100/i));
m_Total_Progress.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(255, 0, 0));
m_File_Progress.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(value, 0, 255));
}
m_File_Progress.SetPos(0);
m_Total_Progress.SetPos(0);
Can anyone help pls?
i was not initialized meaning i is still an open variable. You need to make i = something first before using it.
Secondly, you need to make this run on the % of how much is completed, which it isn't. It's just a random i loop currently, I think.Code:int i; for( i = 0; i < 100; i++)
If you wanted it to be random upon start up with the division that you currently have it set to, you could do this:
Code:int RNG = ( 255 / ( 101 / (( rand() % 100 ) + 1)) ); m_Total_Progress.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(255, 0, 0)); m_File_Progress.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(RNG, 0, 255));
Last edited by Fenris; 21-02-14 at 07:12 PM.
or simply
for (int i = 0; etc etc)
this is basics in programming
@Xakzi: ya ik! but it gives me an exe crash after compiling
// Progress ÃʱâÈ
for ( int i = 0; i < 100; i++ )
{
int value=(255/(100/i));
m_Total_Progress.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(255, 0, 0));
m_File_Progress.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(value, 0, 255));
}
m_File_Progress.SetPos(0);
m_Total_Progress.SetPos(0);
My Source is in VS2003, it is important?
how can i do this?
![]()
#bump #
#bump #
._. Just do
int i;
for ( int i = 0; i < 100; i++ )
{
int value=(255/(100/i));
m_Total_Progress.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(255, 0, 0));
m_File_Progress.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(value, 0, 255));
}
m_File_Progress.SetPos(0);
m_Total_Progress.SetPos(0);