Does anyone have src or info on how to display a progress bar as a file is being compressed with APLib (or similar)? I have programmed one in, using the add in procedure AND a thread attempt but both only produce a bar once the compression has finished even though the update progress bar routine is being run. eg. call apack, src, dest, offset my_routine ..... my_routine call SendDlgItemMessage, hwnd, ID_PROGRESS, IDM_SETPOS, current_stuff The routine definitely runs multiple times during compression so I know that, but the bar doesnt appear till the end... FK
Posted on 2001-02-08 06:53:00 by Freddy K
You need to force the progress bar to update by calling InvalidateRect followed by UpdateWindow after each call.
Posted on 2001-02-08 09:37:00 by Iczelion
Are you sure, cause i use progress bars that do update themselves. If you look back, make sure your are using "msctls_progress32" window class, also there are other styles and messages not defiend in windows.inc PBS_SMOOTH equ 1h ;bar is drawn in solid in smooth increments PBS_VERTICAL equ 4h ;bar goes verticly PBM_SETRANGE32 equ WM_USER + 6 ;lParam=high range, wParam = low range - same as PBM_SETRANGE except supports 32bit range PBM_SETBARCOLOR equ WM_USER + 9 ;lParam = bar color PBM_SETBKCOLOR equ CCM_SETBKCOLOR ;lParam = bkColor Im sorry but i dont have any idea as to how to get the text drawn in the bar showing the percent complete
Posted on 2001-02-09 06:01:00 by X
Icz' info IS correct - but only relevant for the situation Im talking aobut (and it works well - have a look at the PENightmare2 prog I u/l to here, or my site). If the progress bar change is done via a normal call as a function is running rather than when something else is executing (which is what you are talking of) then you dont need to do it. BTW DOES ANYONE KNOW HOW TO DO THE TEXT IN THE PROGRESS BAR STUFF??? ALEXY???
Posted on 2001-02-10 06:44:00 by FreddyK