Archive: mui_header_text macro error


mui_header_text macro error
I have a rather interesting problem with the header text of a custom page (by the way, this is my first NSIS installer). Some quick background first. I created a custom page that asks the user to confirm installation (since I couldn't find this page as part of the standard pages in MUI). I then added my own header bitmap that spans the entire header (size is 497 x 57 using MUI_HEADERIMAGE_BITMAP_NOSTRETCH). The problem started where this header was hiding the header text that is set in my custom page function:

Function ConfirmInstall
!insertmacro MUI_HEADER_TEXT "blah blah blah" "" ;no subtext
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "Confirm.ini" ;display the custom page
FunctionEnd

to fix this, I had to finagle the windows a bit by making a system call that grabs handles to the header image and the header text and forces the header image behind the header text.
Here is an example in case you're interested:

GetDlgItem $0 $HWNDPARENT 1046 ;handle to header image
GetDlgItem $1 $HWNDPARENT 1037 ;handle to header text
System::Call "User32::SetWindowPos(i, i, i, i, i, i, i) b ($1, $0, 30, 15, 497, 57, 0)"

Note, I also moved the text to the left a bit from its original position so it would not overwrite part of my header image on the right. All of this has worked as hoped (though there is likely a much better way to do it and I am open to any suggestions). The problem is that now the header text I set with the MUI_HEADER_TEXT macro shows up on subsequent pages (the "blah blah blah" is under the text of other headers). I was under the impression that this macro should only apply to the custom page in which the macro was called. If this is the case then I wonder if the act of mucking with the HWND's has somehow embedded that header text (since grabbing the dialog items by referencing 1046 or 1037 applies to each page because those numbers are consistent across pages). So does anyone know why the header text I inserted is showing up after the custom page to which is supposed to apply, and any ideas on how to fix it? Thanks in advance, and I am happy to provide more detail as necessary. Hope this makes sense and feel free to put a noobie in his place if I am way off track with these methods.


problem is not the macro
Ok, I discovered the problem is not the macro mentioned above. I am getting the text over-writing other text on the uninstaller as well which does not contain any custom pages. It seems the issue is with attempting to put the header image behind the text. For some reason the text from one header is carried over to the next header.