nsis drag and drop for nsdialogs

88 views Asked by At

i want to drag and drop the window by image , i mean : you hold the mouse1 on main image or on a little label to get drag and drop on the window(left right , up down ) . enter image description here

i have already tried code like this:

System::Call "user32::GetCursorPos(lp$MoveSize)"
System::Call "user32::ScreenToClient(i$HWNDPARENT, lp$MoveSize)"
System::Call "user32::SendMessage(i$HWNDPARENT, i$WM_SYSCOMMAND, i$SIZE, i0)"

but these functions is not talking to me. seem to works with old file "nsWindows.nsh"

SendMessage $HWNDPARENT ${WM_NCLBUTTONDOWN} ${HTCAPTION} $0 
2

There are 2 answers

0
DIMM_V2 On BEST ANSWER

thx @ Anders , working example .

 RequestExecutionLevel User
!include "MUI2.nsh"
!insertmacro MUI_PAGE_INSTFILES
!define MUI_CUSTOMFUNCTION_GUIINIT GuiInit
!insertmacro MUI_LANGUAGE "English"

 


Section
DetailPrint Hello
Sleep 1234
SectionEnd


Function GuiInit 
MoveAnywhere::Hook # MoveAnywhere.dll
FunctionEnd
5
Anders On

You can try the MoveAnywhere plug-in.