Click here to Skip to main content
15,889,200 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Assigning a value to a char[] Pin
vividtang13-May-04 18:31
vividtang13-May-04 18:31 
GeneralRe: Assigning a value to a char[] Pin
toxcct13-May-04 22:32
toxcct13-May-04 22:32 
GeneralRe: Assigning a value to a char[] Pin
monrobot1314-May-04 6:23
monrobot1314-May-04 6:23 
GeneralVS.NET and "picture controls" Pin
#realJSOP13-May-04 10:07
mve#realJSOP13-May-04 10:07 
GeneralRe: VS.NET and "picture controls" Pin
Michael Dunn13-May-04 18:10
sitebuilderMichael Dunn13-May-04 18:10 
GeneralActivex question Pin
Demian Panello13-May-04 8:58
Demian Panello13-May-04 8:58 
GeneralRe: Activex question Pin
BlackDice13-May-04 11:08
BlackDice13-May-04 11:08 
GeneralExit Code (0x2) from Dialog Based Apps Pin
Justin Cooke13-May-04 8:39
Justin Cooke13-May-04 8:39 
Greetings,

I have been using dialog based MFC apps for a while and just noticed that, at least in my applications, the exit codes aren't always 0 (even when things seem to be working correctly otherwise.)

If I run any of my dialog apps from the debugger in VS 6.0, and I then close the app with either System->Close, Alt-F4, or the 'X', I see the following messages:

The thread 0xBF4 has exited with code 2 (0x2).<br />
The program 'C:\Documents and Settings\justin.cooke\My Documents\MyProjects\randomNumGen\Debug\randomNumGen.exe' has exited with code 2 (0x2).


If I instead close it with the OK or Cancel buttons, the exit codes are 0, as expected.

What's going on? Does the 2 code just indicate how the app was closed? I was always under the impression that a code other than 0 indicated an error. I tried to find a list of what these codes mean in MSDN and online, but had no luck.

Thanks,
Justin
GeneralRe: Exit Code (0x2) from Dialog Based Apps Pin
David Crow13-May-04 9:24
David Crow13-May-04 9:24 
GeneralRe: Exit Code (0x2) from Dialog Based Apps Pin
Justin Cooke13-May-04 9:33
Justin Cooke13-May-04 9:33 
GeneralRe: Exit Code (0x2) from Dialog Based Apps Pin
David Crow13-May-04 9:39
David Crow13-May-04 9:39 
GeneralRe: Exit Code (0x2) from Dialog Based Apps Pin
Michael Dunn13-May-04 18:14
sitebuilderMichael Dunn13-May-04 18:14 
GeneralRe: Exit Code (0x2) from Dialog Based Apps Pin
Justin Cooke14-May-04 6:22
Justin Cooke14-May-04 6:22 
GeneralWindows XP look and feel on other applications Pin
SummerTime13-May-04 8:21
SummerTime13-May-04 8:21 
GeneralRe: Windows XP look and feel on other applications Pin
monrobot1313-May-04 10:59
monrobot1313-May-04 10:59 
GeneralRe: Windows XP look and feel on other applications Pin
Joe Woodbury13-May-04 12:49
professionalJoe Woodbury13-May-04 12:49 
GeneralRe: Windows XP look and feel on other applications Pin
Dimitris Vasiliadis24-May-04 11:40
Dimitris Vasiliadis24-May-04 11:40 
GeneralRe: Windows XP look and feel on other applications Pin
ThatsAlok3-May-05 22:25
ThatsAlok3-May-05 22:25 
QuestionToolbar bug? Pin
Deian13-May-04 8:13
Deian13-May-04 8:13 
AnswerRe: Toolbar bug? Pin
toxcct13-May-04 8:46
toxcct13-May-04 8:46 
GeneralRe: Toolbar bug? Pin
Deian13-May-04 8:53
Deian13-May-04 8:53 
GeneralRe: Toolbar bug? Pin
toxcct13-May-04 8:59
toxcct13-May-04 8:59 
GeneralRe: Toolbar bug? Pin
Deian13-May-04 9:33
Deian13-May-04 9:33 
AnswerRe: Toolbar bug? Pin
vividtang13-May-04 22:04
vividtang13-May-04 22:04 
GeneralRe: Toolbar bug? Pin
Deian14-May-04 4:44
Deian14-May-04 4:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.