本帖最后由 sanhen 于 2011-1-13 20:43 编辑
禁用的可以这样:
#include <winapi.au3>
#include <WindowsConstants.au3>
#include <Constants.au3>
#include <GuiMenu.au3>
Const $MF_BYCOMMAND = 0x0
$hWnd=WinGetHandle("我的文档","")
_GUICtrlMenu_RemoveMenu(_GUICtrlMenu_GetSystemMenu($hWnd,FALSE),$SC_MINIMIZE,$MF_BYCOMMAND)
_GUICtrlMenu_RemoveMenu(_GUICtrlMenu_GetSystemMenu($hWnd,FALSE),$SC_MAXIMIZE,$MF_BYCOMMAND)
_GUICtrlMenu_RemoveMenu(_GUICtrlMenu_GetSystemMenu($hWnd,FALSE),$SC_RESTORE,$MF_BYCOMMAND)
_GUICtrlMenu_RemoveMenu(_GUICtrlMenu_GetSystemMenu($hWnd,FALSE),$SC_CLOSE,$MF_BYCOMMAND)
全部去掉的,可以这样:
_Winapi_SetWindowLong($hWnd,$GWL_STYLE,BitXOR (_Winapi_GetWindowLong($hWnd,$GWL_STYLE), $WS_SYSMENU))
|