Archive: Pbs_setpos


Pbs_setpos
I found some code on the forums from KiCHiK

System::Call user32::GetWindowLong(ir0,i-16)i.r1
IntOp $1 $1 | 10 # PBS_MARQUEE
System::Call user32::SetWindowLong(ir0,i-16,ir1)
IntOp $1 ${WM_USER} + 10
SendMessage $0 $1 1 200 $2

which works great but anyone know instead of setting marquee mode to instead set the position in non marquee mode ?
MSDN page for PBS_SETPOS
http://msdn.microsoft.com/en-us/library/bb760844(VS.85).aspx

thanks


That's not my code. My code is always wrapped in [code] :)

To send PBM_SETPOS, there's no need for SetWindowLong and only the SendMessage line is needed.


hmm wonder where I got the S from anyways tried it a few differant ways can you perhaps give me a example with $0 being the progress bar i tried
SendMessage $0 PBM_SETPOS 60 0 and a few others nothing shows on the progress bar I know im getting the right dialog item because I can hide it or set the marquee mode and it shows the animation that way

thanks again


It must be ${PBM_SETPOS} and you must have PBM_SETPOS actually defined. If it's not defined in WinMessages.nsh, you'll have to find its value and define it yourself.