-
-
Save NKid/8a403c0861f766eee8a1 to your computer and use it in GitHub Desktop.
Disable Close Button
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SetTitleMatchMode, 2 | |
RUN "C:\Program Files\Microsoft Office\OFFICE11\OUTLOOK.EXE" /recycle /nopreview | |
WinWaitActive,Microsoft Outlook | |
DisableCloseButton(WinExist("Microsoft Outlook")) | |
DisableCloseButton(hWnd="") { | |
hSysMenu:=DllCall("GetSystemMenu","Int",hWnd,"Int",FALSE) | |
nCnt:=DllCall("GetMenuItemCount","Int",hSysMenu) | |
DllCall("RemoveMenu","Int",hSysMenu,"UInt",nCnt-1,"Uint","0x400") | |
DllCall("RemoveMenu","Int",hSysMenu,"UInt",nCnt-2,"Uint","0x400") | |
DllCall("DrawMenuBar","Int",hWnd) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment