Can anyone point me to some info on the PBM_SETRANGE32 message in a Progress Bar. I know the define for it is 1030 but it is not operating correctly for me.


invoke GetFileSize, ...
mov FileSize, eax

invoke SendMessage, hwndProgBar, PBM_SETRANGE32, 0, FileSize


This seems like the most intuitive way to do it. Any comments?
Posted on 2001-08-20 13:07:25 by rdaneel

The PBM_SETRANGE message sets the minimum and maximum values for a progress bar and redraws the bar to reflect the new range.

wParam = 0;
lParam = MAKELPARAM(nMinRange, nMaxRange);



Minimum range value. By default, the minimum value is zero.


Maximum range value. By default, the maximum value is 100.

Return Values

Returns the previous range values if successful, or zero otherwise. The low-order word specifies the previous minimum value, and the high-order word specifies the previous maximum value.

Hope that helps in some way.

Posted on 2001-08-20 13:54:45 by latigo
Thanks, but I need info on PBM_SETRANGE32, not PBM_SETRANGE. I can only find PBM_SETRANGE32 mentioned breifly in MSDN. Thanks anyway latigo.
Posted on 2001-08-20 14:05:46 by rdaneel
from the sdk or something:

wParam = (WPARAM)(int) iLowLim;
lParam = (LPARAM)(int) iHighLim;
Sets the range of a progress bar control to a 32-bit value.

Returns a DWORD value that holds the previous 16-bit low limit in its low word and the previous 16-bit high limit in its high word. If the previous ranges were 32-bit values, the return value consists of the low words of both 32-bit limits.
A signed integer that represents the low limit to be set for the progress bar control.
A signed integer that represents the high limit to be set for the progress bar control.
To retrieve the entire high and low 32-bit values, use the PBM_GETRANGE message.
Posted on 2001-08-20 14:25:14 by SubHuman