Skip to content
⌘ NSIS Forum Archive

SetWindowPos Not Work

2 posts

r2du-soft#

SetWindowPos Not Work

Hi
i call to System plugin for move to installer to top and left screen and that work:

!include "WinMessages.nsh"

Function .onGUIInit
System::Call "User32::SetWindowPos(i, i, i, i, i, i, i) i ($HWNDPARENT, 0, 0, 0, 0, 0, 0x201)"
FunctionEnd

Section
SectionEnd
But when change SetWindowPos to 0x204 and 0x0204 for move installer to right and top screen that not work!
And also other code WM "#Window Messages#" not work!

where is the problem?
Anders#
Why the hell would changing the flags move it to the right? Go to MSDN and read what the flags mean.

To move the window to the top right you have to first find the size of the work area on that monitor and then move it to x,0 where x = workareaWidth - yourwindowWidth.