NSIS隐藏窗口标题栏自带的按钮(最大化,最小化,关闭X)

这个问题实在八月份逛csdn论坛的时候偶然遇到的,当时比较好奇楼主为啥要隐藏关闭按钮,就顺口问了下,结果楼主已经弃楼,未给出原因,猜着可能是为了做自定义页面美化,无法改变按纽外观之类的,后来琢磨了下,觉得修改窗口风格比较简单,这里使用的是GetWindowLong与 SetWindowLong两个API。

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

效果图:

posted @ 2022-08-12 19:30  水晶石  Views(109)  Comments(0Edit  收藏  举报