Hello,
I need my C code Exe to exit only using Cntrol + C and the cross should be disabled. Can anyone help me with this.
Regards.
programmer321
0
Light Poster
Recommended Answers
Jump to PostMore details please. What compiler and OS and is this a GUI program or command line?
Jump to Post#define _WIN32_WINNT 0x0502 #include <stdio.h> #include <windows.h> int main ( void ) { HWND console = GetConsoleWindow(); HMENU menu = GetSystemMenu ( console, FALSE ); if ( DeleteMenu ( menu, SC_CLOSE, MF_BYCOMMAND ) ) puts ( "Can't close with the X button" ); else puts ( "Unable …
All 7 Replies
Narue
5,707
Bad Cop
Team Colleague
programmer321
0
Light Poster
Narue
5,707
Bad Cop
Team Colleague
programmer321
0
Light Poster
Nick Evan
4,005
Industrious Poster
Team Colleague
Featured Poster
programmer321
0
Light Poster
programmer321
0
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.