Search code examples
windowswinapipositioningnsis

Move window to corner of screen using NSIS


I am trying to reposition a nsDialogs window using the following code: http://nsis.sourceforge.net/Moving_install_window_to_a_corner_of_the_screen

I am not including the System.nsh file as if I include I get the error:

!define: "IMAGE_BITMAP" already defined!
!include: error in script: "C:\Program Files (x86)\NSIS\Examples\System\System.nsh" on line 267

If I do not include the System.nsh file then I get the following error:

unknown variable/constant "{stRECT}" detected,

What is the stRect variable? How to avoid at least one of these errors and reposition my window using NSIS? I am using the latest version of NSIS.


Solution

  • !include nsDialogs.nsh
    !undef IMAGE_BITMAP
    !include "${NSISDIR}\Examples\System\System.nsh"
    

    ...if nsDialogs.nsh is the conflicting header you probably have to !undef the other image types as well.