Archive: how to disable the minimize button


how to disable the minimize button
how to disable the minimize button on the window?


Only just leave Close(X) button on the windows.

how to do it?


You could probably remove WS_MINIMIZEBOX with GetWindowLong/SetWindowLong, but you would have to call them with the system plugin.


hmmm, could you give me the code to remove the button.


Why do you want to restrict your users like this?

!define APPNAME "Remove Minimize&Maximize"
name "${APPNAME}"
outfile "$%temp%\${APPNAME}.exe"
showInstDetails show
!include MUI.nsh
installdir "$Temp\NSIS-Test"

Function myGUIInit
System::Call 'user32::GetWindowLong(i $hwndparent,i -16)i.r0'
intop $1 0x30000 ~
intop $0 $0 & $1
System::Call 'user32::SetWindowLong(i $hwndparent,i -16,i $0)i'
FunctionEnd

!define MUI_CUSTOMFUNCTION_GUIINIT myGUIInit

Section "dummy"
SetOutPath -
SectionEnd

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"

Thank you for helping me out. The code really works for me.
somehow, we just don't want our users to run in minimize window...