- NSIS Discussion
- newAdvSplash problem
Archive: newAdvSplash problem
arfgh
13th April 2007 16:46 UTC
newAdvSplash problem
Banner::show /NOUNLOAD 'blahblah'
IntOp $0 $0 + 1
Sleep 10
StrCmp $0 100 0 -2
Banner::destroy
newadvsplash::show /NOUNLOAD 1000 500 500 -1 /BANNER /PASSIVE 'a.bmp'
Pop $0
i have this code. And it works. But a so strange anomaly appears in the image. Yes, the image make its effect but only in the dekstop. If i have some window opened, the image is not visible.
If i remove the banner, then i can see the image over all.
How can i fix this problem ?
Takhir
13th April 2007 17:40 UTC
Remove /passive key, this should make AdvSplash window topmost after application have lost focus after banner was destroyed. And I guess /nounload has no effect for Banner::show.
arfgh
14th April 2007 02:43 UTC
yes, this works.
but now i have other problem with the banner. Look this code
y use 2 banners and 1 newAdvSplash
Banner::show /NOUNLOAD 'blah'
IntOp $0 $0 + 1
Sleep 10
StrCmp $0 100 0 -2
Banner::destroy
newadvsplash::show /NOUNLOAD 2250 500 500 -1 /BANNER 'a.bmp'
Pop $0
Banner::show /NOUNLOAD 'Ready'
IntOp $0 $0 + 1
Sleep 10
StrCmp $0 100 0 -2
Banner::destroy
newadvsplash::wait
The problem is, the second banner i want to use, not appear, onyl on the taskbar. But it appear in the middle of the screen if i use the /PASSIVE on the newAdvSplash
is so strange
Takhir
14th April 2007 05:56 UTC
Sorry, /nounload required for modeless nsis banner. Second banner is hidden by topmost advsplash window if it is not /passive. Another problem is how Windows moves focus to other application if main (the only) window was destroyed (first banner). Try to set banner position outside advsplash rect using System plug-in & MoveWindow or SetWindowPos calls.
arfgh
14th April 2007 13:18 UTC
You mean is possible to move this banners to other location ?
how ??
Takhir
14th April 2007 13:52 UTC
Why not? :) Archive search http://nsis.sourceforge.net/Special:...ulltext=Search
or just
...
Banner::getWindow /NOUNLOAD
Pop $0
System::Call "user32::MoveWindow(i r0, i 0, i 0, i 200, i 100) i r2"
...
Looks a bit ugly if banner first appear in the center and jumps to corner after this only, but a bit animation can solve the problem.
arfgh
14th April 2007 14:14 UTC
System::Call "user32::MoveWindow(i r0, i 0, i 0, i 200, i 100) i r2"
I know to use this api, but i not understand that 'i'
i r0 = the handle of the window. Where you get that ?
and the other 'i' on the position and size ?
Is possible to get the current position to a var and then apply this value + 100 pixels for example ?
thx
EDIT: maybe the trick to fix this problem is use the SetWindowLong Api to make the banner appears in front of the image. But i dont knwo how to do that on nsis :(
Takhir
14th April 2007 16:37 UTC
Use IntOp to update int value.
'i' described in Start->Programs->NSIS->Contrib->System Readme
Link in my previous post describes how to get current position and window size.
arfgh
14th April 2007 17:07 UTC
but Takhir maybe the trick to fix this problem is use the SetWindowLong Api to make the banner appears in front of the image. But i dont knwo how to do that on nsis
Takhir
14th April 2007 20:38 UTC
Forum search can help you in most cases, for SetWindowLong I see http://forums.winamp.com/showthread....=SetWindowLong (while I guess this is usefull on the dialog init step only, but this is available in the plug-in source code only). Attached script I wrote right now, looks funny ;)