Assuming you are using Nomads you can uncheck the 'Close Box' attribute on your panels.
If you are manually creating Dialogue or Windows, you can include the OPT="x" (lowercase x).
If using WindX to run text mode applications and referring to the outer 'Container' window, there is no method provided to remove the 'X'. This 'X' however does generate a -1999 CTL event which is generally mapped to F4. You can disable this mapping by executing
This will make hitting the 'X' and invalid keystroke and ring the bell.
If you woulld rather it just be ignored use -1000 instead of -1099