View Full Version : EXIT Button
Triple H
03-20-2008, 06:23 AM
Hello,
How shall I make an Exit Button in c++? What shall I put in? Need help!
Mfg Greekman
sailerboy
03-20-2008, 09:30 AM
You make a button, and send an exit message to the application
exit();
you need stdlib.h
Triple H
03-20-2008, 10:35 AM
You make a button, and send an exit message to the application
exit();
you need stdlib.h
Didn't work^^
C:ProgrammeMicrosoft Visual StudioMyProjectsexit3exit3Dlg.cpp(175) : error C2660: 'exit' : function does not take 0 parameters
Generating Code...
Error executing cl.exe.
exit3.exe - 1 error(s), 0 warning(s)
Or what have I made wrong?
Mfg Greekman
wr194t
03-20-2008, 10:37 AM
Do you have stdlib.h?
sailerboy
03-20-2008, 05:54 PM
put at the top
#include "stdlib.h"
creat a function
///add top "#include <stdlib.h>
//under top
void Exit()
{
ExitProcess(0);
}
//in your butto
Exit();
Triple H
03-21-2008, 05:21 AM
creat a function
///add top "#include <stdlib.h>
//under top
void Exit()
{
ExitProcess(0);
}
//in your butto
Exit();
Yea thx
I will copy it. Pls close it, ZeaS showed iit to me with TeamViewer. And it worked!!! Thx^^
Powered by vBulletin® Version 4.1.12 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.