Archive: Custom Show function on Back button


Custom Show function on Back button
I have AnimGif plug-in request from zeeh3. He uses plug-in on the Welcome page, 'play' in 'show' function and 'stop' in 'leave' one. Atached script displays gif on the Welcome page on the forward move, but fails if user presses 'Back' button on the Directory page and returns back to Welcome one. I added


FindWindow $0 '#32770' '' $HWNDPARENT
MessageBox MB_OK "childdlg=$0"

to the 'show' function and now I know 'why': on the 'Back' move Welcome page 'show' function runs on the still presenting Directory page. So my questions: is this correct? How to address (hwnd) this 'ready to show' previous page on the back move?
Edited:
I can add that I see 2 '#32770' childs after 'Back' click, but how i can determine from plug-in the 'incoming' one? Is it always hidden window? Or last child? Can I rely this will be repeatable in 2.15? :)

The page still exists, but hidden, to reduce flicker. If it's a custom page, you shouldn't use FindWindow, but the HWND InstallOptions returns on the stack. From the MUI readme:

In the Show function of Welcome page and the Finish page, $MUI_HWND contains the HWND of the inner dialog