Click here to Skip to main content
15,891,184 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Exit Code Level 2 Pin
Mark Salsbery5-Nov-07 12:31
Mark Salsbery5-Nov-07 12:31 
GeneralRe: Exit Code Level 2 Pin
Llasus5-Nov-07 12:43
Llasus5-Nov-07 12:43 
GeneralRe: Exit Code Level 2 Pin
Mark Salsbery5-Nov-07 12:47
Mark Salsbery5-Nov-07 12:47 
GeneralRe: Exit Code Level 2 Pin
Llasus5-Nov-07 12:48
Llasus5-Nov-07 12:48 
GeneralRe: Exit Code Level 2 Pin
Mark Salsbery5-Nov-07 12:56
Mark Salsbery5-Nov-07 12:56 
GeneralRe: Exit Code Level 2 Pin
Llasus5-Nov-07 13:04
Llasus5-Nov-07 13:04 
GeneralRe: Exit Code Level 2 Pin
Mark Salsbery5-Nov-07 13:32
Mark Salsbery5-Nov-07 13:32 
GeneralRe: Exit Code Level 2 Pin
Llasus5-Nov-07 13:47
Llasus5-Nov-07 13:47 
Hi Mark. Thanks for your continuous help. I did some experiment and it actually worked by returning exit code 0. Though what I did may not be the right step. Since I don't really edit the ExitInstance() (as I have never used it before) I tried to check on my OnClose() function. By switching the original CDialog::OnClose() with PostQuitMessage(0), it actually returned the proper exit code of 0. But it may not be right since I forced it to return 0. Could you please check on this one?

void CApplicationDlg::OnClose() <br />
{<br />
	SomeClass.CleanUp();<br />
<br />
	CWnd*   ThisDlg;<br />
	ThisDlg= GetDlgItem(IDC_LEFTPICBOX);<br />
	ThisDlg->ReleaseDC(&GlobalLeftPicDC);<br />
	GlobalLeftPicDC.DeleteDC();<br />
	ThisDlg= GetDlgItem(IDC_RIGHTPICBOX);<br />
	ThisDlg->ReleaseDC(&GlobalRightPicDC);<br />
	GlobalRightPicDC.DeleteDC();<br />
<br />
	CDialog::OnClose(); //Switch this with PostQuitMessage(0);<br />
}


I may be somehow going away from my problem here but I just want to prove that exit codes doesn't really have an effect on my program. Again, thank you for your help!
QuestionRe: Exit Code Level 2 Pin
David Crow5-Nov-07 16:25
David Crow5-Nov-07 16:25 
AnswerRe: Exit Code Level 2 Pin
Llasus5-Nov-07 16:50
Llasus5-Nov-07 16:50 
AnswerRe: Exit Code Level 2 Pin
Llasus5-Nov-07 17:10
Llasus5-Nov-07 17:10 
GeneralRe: Exit Code Level 2 Pin
David Crow6-Nov-07 2:45
David Crow6-Nov-07 2:45 
GeneralRe: Exit Code Level 2 Pin
Llasus6-Nov-07 14:45
Llasus6-Nov-07 14:45 
QuestionBuilding VC++ Samples from windows platform sdk server 2003 r2 Pin
shatterstar64575-Nov-07 11:15
shatterstar64575-Nov-07 11:15 
AnswerRe: Building VC++ Samples from windows platform sdk server 2003 r2 Pin
Mark Salsbery5-Nov-07 11:21
Mark Salsbery5-Nov-07 11:21 
GeneralRe: Building VC++ Samples from windows platform sdk server 2003 r2 Pin
shatterstar64575-Nov-07 11:53
shatterstar64575-Nov-07 11:53 
GeneralRe: Building VC++ Samples from windows platform sdk server 2003 r2 Pin
Mark Salsbery5-Nov-07 12:08
Mark Salsbery5-Nov-07 12:08 
GeneralRe: Building VC++ Samples from windows platform sdk server 2003 r2 Pin
Mark Salsbery5-Nov-07 12:51
Mark Salsbery5-Nov-07 12:51 
QuestionCan I create two Cbrush object at same time? [modified] Pin
Gofur Halmurat5-Nov-07 10:53
Gofur Halmurat5-Nov-07 10:53 
QuestionRe: Can I create two Cbrush object at same time? Pin
Mark Salsbery5-Nov-07 10:56
Mark Salsbery5-Nov-07 10:56 
AnswerRe: Can I create two Cbrush object at same time? Pin
Gofur Halmurat5-Nov-07 10:59
Gofur Halmurat5-Nov-07 10:59 
GeneralRe: Can I create two Cbrush object at same time? Pin
Mark Salsbery5-Nov-07 11:12
Mark Salsbery5-Nov-07 11:12 
GeneralRe: Can I create two Cbrush object at same time? Pin
Gofur Halmurat5-Nov-07 11:18
Gofur Halmurat5-Nov-07 11:18 
GeneralRe: Can I create two Cbrush object at same time? Pin
Mark Salsbery5-Nov-07 11:17
Mark Salsbery5-Nov-07 11:17 
GeneralRe: Can I create two Cbrush object at same time? Pin
Gofur Halmurat5-Nov-07 11:25
Gofur Halmurat5-Nov-07 11:25 

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.