Author Topic: Windows - disable Close Button on Window  (Read 838 times)

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1784
    • View Profile
Is there a way to grey out the windows close button or circumvent it?
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2747
    • View Profile
Re: Windows - disable Close Button on Window
« Reply #1 on: 2021-Feb-08 »
The code necessary can be found in this SO answer. Will need a bit of inlining though... https://stackoverflow.com/questions/13189791/disable-x-button-icon-on-the-top-of-the-right-in-messagebox-using-c-win32-api 
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1784
    • View Profile
Re: Windows - disable Close Button on Window
« Reply #2 on: 2021-Feb-09 »
Cheers, I'll see if i can work it out!
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3956
    • View Profile
    • Space Fractal
Re: Windows - disable Close Button on Window
« Reply #3 on: 2021-Feb-10 »
im meant im a day implmented it secrets as SETSCREEN x,x,2. Im do not sure its still works or not removed as im used its international.

Currectly it not officiel to do that throught, so dont bug me at all.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.