Click here to Skip to main content
15,914,419 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: allocating object in global storage Pin
Chuck O'Toole10-May-12 3:32
Chuck O'Toole10-May-12 3:32 
GeneralRe: allocating object in global storage Pin
Erudite_Eric13-May-12 21:02
Erudite_Eric13-May-12 21:02 
QuestionDigital Library system, Help needed Pin
ShayanTanwir7-May-12 13:32
ShayanTanwir7-May-12 13:32 
AnswerRe: Digital Library system, Help needed Pin
Chris Losinger7-May-12 13:35
professionalChris Losinger7-May-12 13:35 
Questiontry and catch, not sure how to handle catch Pin
jkirkerx7-May-12 10:34
professionaljkirkerx7-May-12 10:34 
AnswerRe: try and catch, not sure how to handle catch Pin
Chuck O'Toole7-May-12 10:45
Chuck O'Toole7-May-12 10:45 
GeneralRe: try and catch, not sure how to handle catch Pin
jkirkerx7-May-12 10:50
professionaljkirkerx7-May-12 10:50 
AnswerRe: try and catch, not sure how to handle catch Pin
Chuck O'Toole7-May-12 12:13
Chuck O'Toole7-May-12 12:13 
I don't do a lot of non-MFC these days because I find the classes so useful. It's also hard to show something useful without it containing a lot of stuff that's specific to my application and would make no sense to you. CDBException is for errors coming from CDatabase and CRecordset classes.

Here's my general exception catcher in the main loop of my application. Ignore things that are related to sending messages back to the user (client / server app).

C++
catch (CException * cfe)
   {
	char exceptBuf[255];
	CString ts;
	CString ccnum;
	
	if (!cfe->GetErrorMessage(exceptBuf, sizeof(exceptBuf)))
		exceptBuf[0] = '\0';		/* null out the message if no text associated with exception */
#ifdef _DEBUG
	AfxMessageBox(exceptBuf);
#endif
	if (claim_check != NULL)
		ccnum = claim_check->getClaimCheck();
	else
		ccnum = "000000";
	ts.Format("Internal Exception Trap - %s", exceptBuf);
	TheLogFile->LogThis(ccnum + CString(" : ") + ts);
	sendErrorToGUI(ts, E_DEFAULTERROR, TheCommCenter, claim_check, parsed_request, inputConfig);
   } /* catch block */

GeneralRe: try and catch, not sure how to handle catch Pin
jkirkerx7-May-12 12:58
professionaljkirkerx7-May-12 12:58 
AnswerRe: try and catch, not sure how to handle catch Pin
Aescleal8-May-12 3:55
Aescleal8-May-12 3:55 
GeneralRe: try and catch, not sure how to handle catch Pin
jkirkerx8-May-12 6:55
professionaljkirkerx8-May-12 6:55 
QuestionCan not Find Functions In Static Library Pin
AmbiguousName7-May-12 1:37
AmbiguousName7-May-12 1:37 
AnswerRe: Can not Find Functions In Static Library Pin
Chris Meech7-May-12 4:10
Chris Meech7-May-12 4:10 
AnswerRe: Can not Find Functions In Static Library Pin
Albert Holguin7-May-12 7:33
professionalAlbert Holguin7-May-12 7:33 
GeneralRe: Can not Find Functions In Static Library Pin
AmbiguousName7-May-12 7:42
AmbiguousName7-May-12 7:42 
AnswerRe: Can not Find Functions In Static Library Pin
Chuck O'Toole7-May-12 8:09
Chuck O'Toole7-May-12 8:09 
AnswerRe: Can not Find Functions In Static Library Pin
AmbiguousName7-May-12 18:47
AmbiguousName7-May-12 18:47 
AnswerRe: Can not Find Functions In Static Library Pin
Chuck O'Toole7-May-12 19:41
Chuck O'Toole7-May-12 19:41 
GeneralRe: Can not Find Functions In Static Library Pin
AmbiguousName7-May-12 20:10
AmbiguousName7-May-12 20:10 
AnswerRe: Can not Find Functions In Static Library Pin
Chuck O'Toole8-May-12 3:46
Chuck O'Toole8-May-12 3:46 
AnswerRe: Can not Find Functions In Static Library Pin
AmbiguousName8-May-12 9:06
AmbiguousName8-May-12 9:06 
QuestionCRichEditCtrl interface question Pin
ForNow6-May-12 6:32
ForNow6-May-12 6:32 
AnswerRe: CRichEditCtrl interface question Pin
enhzflep6-May-12 7:21
enhzflep6-May-12 7:21 
GeneralRe: CRichEditCtrl interface question Pin
ForNow6-May-12 9:07
ForNow6-May-12 9:07 
GeneralRe: CRichEditCtrl interface question [modified] Pin
enhzflep6-May-12 10:14
enhzflep6-May-12 10:14 

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.