how to prevent the user from closing the program? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

how to prevent the user from closing the program?

27th Apr 2018, 8:39 AM
Firuz
Firuz - avatar
10 Answers
+ 4
That doesn't seem like great idea.
27th Apr 2018, 9:25 AM
Akib
Akib - avatar
+ 1
While i think like Jan Markus you can do it but not with standard c++ ... In particular its not language job handle styling of windows but you must use platform API for do this... In Windows you can set the window style throght win32 api but on other platform i dont know... anyway you must search the right way for your platform
27th Apr 2018, 11:28 AM
KrOW
KrOW - avatar
+ 1
Yes its possible but its not a standard language feature... This mean that you must use some library for accomplish this (at example on windows using win32 API)
27th Apr 2018, 11:41 AM
KrOW
KrOW - avatar
0
No, I just want my program to not close from pressing the cross and from the introduction of the command
27th Apr 2018, 10:26 AM
Firuz
Firuz - avatar
0
On c++ this is possible, I saw with my own eyes.
27th Apr 2018, 11:39 AM
Firuz
Firuz - avatar
0
Yes! But which?
27th Apr 2018, 11:42 AM
Firuz
Firuz - avatar
27th Apr 2018, 11:45 AM
KrOW
KrOW - avatar
0
KrOW. There is nothing about C ++
27th Apr 2018, 11:53 AM
Firuz
Firuz - avatar
0
Win32 API are a set of functions/structures/constants for handling windows programming specifically and its possible use they with C language (then C++ also)
27th Apr 2018, 12:08 PM
KrOW
KrOW - avatar
0
What about Win32?
28th Apr 2018, 7:40 PM
Firuz
Firuz - avatar