Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Disable "x" button?
#5
Thank you, this does exactly what I need...using this plus a menu with trigger as "x" button will open a menu making sure you want to close the window.
Original disabled maximize button got rid of setwinstyle to remove max button and changed the 3 to 4 int he for statement.

Macro Macro4
Code:
Copy      Help
int hWnd=win("Untitled - Notepad" "Notepad")
int hMenuHandle lngItemCount c style
hMenuHandle = GetSystemMenu(hWnd, 0);
lngItemCount = GetMenuItemCount(hMenuHandle);
for c lngItemCount-1 4 -1
,RemoveMenu(hMenuHandle, c, MF_BYPOSITION);
DrawMenuBar(hWnd)

Thank you


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)