danielkza
10th July 2007 01:15 UTC
Marquee Style Progress Bar
Is it possible to make a progress bar has "floating" value like this one:
http://img136.imagevenue.com/loc400/..._122_400lo.jpg
I tried this code
Function SetMarquee
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $0 $HWNDPARENT 1004
IntOp $1 ${WM_USER} + 10
SendMessage $0 $1 1 200 $2
FunctionEnd
WM_USER + 10 is the same as PBS_SETMARQUEE,the message to set a progress bar to marquee mode,but it didn't work.Does anybody know how to do it?
Thank you for the attention
kichik
13th July 2007 10:18 UTC
There are two problems in your code.
- The progress bar doesn't have the PBS_MARQUEE style.
- You passed $HWNDPARENT to GetDlgItem instead of $0.
So, fix those two and you get:
Function SetMarquee
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $0 $0 1004
System::Call user32::GetWindowLong(ir0,i-16)i.r1
IntOp $1 $1 | 8 # PBS_MARQUEE
System::Call user32::SetWindowLong(ir0,i-16,ir1)
IntOp $1 ${WM_USER} + 10
SendMessage $0 $1 1 200 $2
FunctionEnd
phunkydizco
12th November 2008 15:29 UTC
Is it possible to make the marquee a little bit smoother? The progress sometimes runs faster and suddenly it is slower.
Zinthose
20th November 2009 23:31 UTC
Just to clarify...[list=1][*]XPStyle must be set to on[*]Use 0x400 in place of ${WM_USER} to remove dependency[*]To remove the Marquee effect just XOr instead of Or[/list=1]
Here is my version as a macro I'm using during installation of third party software when the installation time is unknown.
!define SetMarquee `!insertmacro PBS_MARQUEE |`
!define RemMarquee `!insertmacro PBS_MARQUEE ^`
!macro PBS_MARQUEE PBS_MARQUEE_OP
Push $0
Push $1
Push $2
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $0 $0 1004
System::Call user32::GetWindowLong(ir0,i-16)i.r1
IntOp $1 $1 ${PBS_MARQUEE_OP} 8 # PBS_MARQUEE = 8
System::Call user32::SetWindowLong(ir0,i-16,ir1)
IntOp $1 0x400 + 10 # ${WM_USER} = 0x400
SendMessage $0 $1 1 200 $2
Pop $2
Pop $1
Pop $0
!macroend
Masternoob
3rd April 2012 09:46 UTC
is there a way to set the marquee speed?
i found this http://msdn.microsoft.com/de-de/libr...=vs.80%29.aspx
but i dont know how to use that in nsis :/
Anders
3rd April 2012 20:37 UTC
Originally posted by Masternoob
is there a way to set the marquee speed?
i found this http://msdn.microsoft.com/de-de/libr...=vs.80%29.aspx
but i dont know how to use that in nsis :/
That is .NET stuff, you need to send
PBM_SETMARQUEE