Re: Progressbar steping range problem
BTW, PBM_SETRANGE32 still limits you to 4GB files. If you
want to support larger files you may want to use a coarser
resolution than a single byte. E.g. Say you need to support
up to 4TB files. Then you delete the file size by 1024 and
each time you set the position you also delete the file offset
by 1024.
Ah, and I forgot to mention your range should start from zero,
not one - to represent no data available altogether.
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@mvps.org
MVP VC FAQ: http://vcfaq.mvps.org
=====================================
"Alexander Nickolov" <agnickolov@mvps.org> wrote in message
news:elAR4yUSHHA.1600@TK2MSFTNGP05.phx.gbl...
Use PBM_SETRANGE32. Currently you are limited to files
under 64KB.
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@mvps.org
MVP VC FAQ: http://vcfaq.mvps.org
=====================================
<sujeeshlal@gmail.com> wrote in message
news:1170587428.696856.206090@v45g2000cwv.googlegroups.com...
hi,
I have a progress bar for receivng data and it works fine for small
files. But when i tried to recieve a big file , it shows the that the
percentage bar fills quickly to 100%. Why that happends so..
my code is like this..
on start receiveing..
hProgress =::GetDlgItem(m_hWnd,IDC_PROGRESS1);
SendMessage(hProgress , PBM_SETPOS, 0, 0);
SendMessage(hProgress , PBM_SETRANGE, 1,(LPARAM) MAKELONG (1,
lenght));
::SendMessage(hSlider, PBM_SETSTEP, 1, 0L);
SendMessage(hSlider, PBM_STEPIT, 0, 0);
SetTimer(ID_TIMER_POSITION,500);
and on timer...