Skip to content
⌘ NSIS Forum Archive

animate bgimage - how to get handle?

9 posts

Comm@nder21#

animate bgimage - how to get handle?

i'm trying to animate bgimage using this command:
System::Call	"user32::AnimateWindow(i $HWNDPARENT, i '500', i '${AW_HIDE}|${AW_BLEND}') i."
of course, $HWNDPARENT only works with the nsis window itself.

win32spy told me that the window class is "NSISBGImage", so i tried the following code:
	Push	$0
FindWindow $0 "NSISBGImage"
StrCmp $0 "0" +2
System::Call "user32::AnimateWindow(i $0, i '500', i '${AW_HIDE}|${AW_BLEND}') i."
Pop $0
BgImage:😁estroy
but didn't work.
and, yes, i defined the flags correctly, works with the main window 🙂
anyone could help me getting the handle to the backround image?
DrO#
have you looked at the code for bgimage to see how it creates the window and to then go from there? (i'd look if i had access to the source myself but tricky to do at work 🙁 )

-daz
kichik#
Comm@nder21, if you pass a number, it shouldn't be in quotes. Quotes are only for strings.

DrO, the source is always accessible 😉
Comm@nder21#
@dro: i'm sry, my skills are not enough in c++ to understand the code. i tried it 🙂

@kichik: the system call itself works fine for me, but only with $HWNDPARENT as handle (so, for the main installer window).
DrO#
kichik: that's true but it's a bit tricky to view it when you're not meant to be looking at code 😉

Comm@nder21: my bad, you seemed to know what you were doing with the system plugin so i sort of assumed you knew c/c++

-daz
Comm@nder21#
indeed i've some very low skills in c++, not enough to write somethin really usefull, though.
so, the nsis scripting language and the way, the system plugin handles api calls is not that complicated than it's in c++.
atleast a basic understanding of code itself i really do have, but not enough for that case.
so, if anyone could read the code for me and get the answer, i'd be really happy 🙂