Click here to Skip to main content
14,977,910 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Recursive directory search Pin
David Crow1-Aug-16 5:01
MemberDavid Crow1-Aug-16 5:01 
Questionvariadic templates problem Pin
FriendOfAsherah28-Jul-16 23:49
MemberFriendOfAsherah28-Jul-16 23:49 
QuestionTrying to understand my mistake... with pointers Pin
Blubbo28-Jul-16 8:04
MemberBlubbo28-Jul-16 8:04 
AnswerRe: Trying to understand my mistake... with pointers Pin
jeron128-Jul-16 9:30
Memberjeron128-Jul-16 9:30 
AnswerRe: Trying to understand my mistake... with pointers Pin
leon de boer29-Jul-16 17:53
Memberleon de boer29-Jul-16 17:53 
Questionhow to create a file input button in microsoft visual c ++ ? Pin
jhonganteng28-Jul-16 3:46
Memberjhonganteng28-Jul-16 3:46 
AnswerRe: how to create a file input button in microsoft visual c ++ ? Pin
Richard MacCutchan28-Jul-16 4:30
mveRichard MacCutchan28-Jul-16 4:30 
QuestionHelp With Exception Pin
ForNow26-Jul-16 12:47
MemberForNow26-Jul-16 12:47 
First I would like to start thanks to all on the CodeProject I think I am getting a little better at this (this being MFC)

Well my code works fine Under the VS 2012 debugger, However When I rebuild it in Release mode. I get a message that my program stopped working with the option of invoking the VS debugger, which I do the code points to MFC code Unhandled Exception going back via the Call Stack it points to CString code Which I will gladly post,

Well the Next thing I did seeing the code works fine in Debug mode, was code a CATCH_ALL exception handler just to see if the code with go to the CATCH_ALL block in Which I invoke AfxMessageBox(".... exception handler") and the message was displayed.

I think at this point I have to get a little more specific (as to what type of exception)

So at the point I think I'll post my code The Bold underline code seems be

where the problem is when I go bank via the Call Stack In Debug mode I check the contents
and tempstr is a Valid Null Terminated String
Can someone at least point me to where I might be able find information exception to catch the specific exception that's giving me the problem

Thanks

	 if(pMsg->message==WM_KEYDOWN)
    {
		TRY
		{
		if(pMsg->wParam==VK_RETURN)
		{
		//	DebugBreak();
			main_app = (CHERC_CMDApp *)AfxGetApp();
			memcpy((void *)main_app->mybaseeventptr->command,(void *)"REL",3);
          
		memcpy((void *)main_app->threadptr[curr_thread]->sockbuffer,(void *)"REL",3);
			main_app->threadptr[curr_thread]->num_buff = 3;
			CString tempstr = PSW.ia;
			tempstr.SetAt(16,0x00);
			tempstr.MakeUpper();
				if(tempstr == end_address)
			{
				memcpy((void *)main_app->threadptr[curr_thread]->sockbuffer,(void *)"TERM",4);
			main_app->threadptr[curr_thread]->num_buff = 4;
				
			}
  			::PostThreadMessage(main_app->threadptr[curr_thread]->m_nThreadID,WM_SEND_SOCK_MESS,22,(LPARAM) main_app->mybaseeventptr->command);
	
			::GetCaretPos(&mycursor);
			mychar = myedit->CharFromPos(mycursor);
			longchar = mychar;
			cursorline = myedit->LineFromChar(longchar);
			linelen = myedit->LineLength(cursorline);
			linelen = 125;
			linechar = myedit->LineIndex(cursorline);
			myedit->GetLine(cursorline,currline.GetBufferSetLength(linelen +1),linelen);
			buffptr = currline.GetBuffer(10);
			
            myeventptr = main_app->mybaseeventptr;
            strncpy((char *)myeventptr->command,(char *)&nu_lls[0],5);  // single step
			myeventptr->send_window = this;
             myeventptr->SetEvent();
		     }
         }
		 
		 CATCH_ALL(e)
		{
			AfxMessageBox("In ProgDebug  Exception Routine");
		//	DELETE_EXCEPTION(e);
		}
		END_CATCH_ALL
		 }

AnswerRe: Help With Exception Pin
leon de boer26-Jul-16 17:22
Memberleon de boer26-Jul-16 17:22 
GeneralRe: Help With Exception Pin
ForNow26-Jul-16 20:01
MemberForNow26-Jul-16 20:01 
GeneralRe: Help With Exception Pin
leon de boer26-Jul-16 22:33
Memberleon de boer26-Jul-16 22:33 
AnswerRe: Help With Exception Pin
Jochen Arndt26-Jul-16 21:47
professionalJochen Arndt26-Jul-16 21:47 
GeneralRe: Help With Exception Pin
ForNow27-Jul-16 2:14
MemberForNow27-Jul-16 2:14 
GeneralRe: Help With Exception Pin
Jochen Arndt27-Jul-16 2:18
professionalJochen Arndt27-Jul-16 2:18 
GeneralRe: Help With Exception you where right !!!!!!!! Pin
ForNow27-Jul-16 15:15
MemberForNow27-Jul-16 15:15 
QuestionChoosing between strings Pin
Anthony Appleyard26-Jul-16 9:47
MemberAnthony Appleyard26-Jul-16 9:47 
AnswerRe: Choosing between strings Pin
Richard MacCutchan26-Jul-16 21:11
mveRichard MacCutchan26-Jul-16 21:11 
QuestionNewbee Exception handling Guidance Pin
ForNow25-Jul-16 4:35
MemberForNow25-Jul-16 4:35 
AnswerRe: Newbee Exception handling Guidance Pin
Jochen Arndt25-Jul-16 4:57
professionalJochen Arndt25-Jul-16 4:57 
GeneralRe: Newbee Exception handling Guidance Pin
ForNow25-Jul-16 5:31
MemberForNow25-Jul-16 5:31 
AnswerRe: Newbee Exception handling Guidance Pin
Richard MacCutchan25-Jul-16 5:12
mveRichard MacCutchan25-Jul-16 5:12 
GeneralRe: Newbee Exception handling Guidance Pin
ForNow25-Jul-16 5:30
MemberForNow25-Jul-16 5:30 
GeneralRe: Newbee Exception handling Guidance Pin
ForNow25-Jul-16 6:32
MemberForNow25-Jul-16 6:32 
GeneralRe: Newbee Exception handling Guidance Pin
Richard MacCutchan25-Jul-16 6:46
mveRichard MacCutchan25-Jul-16 6:46 
QuestionRe: Newbee Exception handling Guidance Pin
David Crow25-Jul-16 16:59
MemberDavid Crow25-Jul-16 16:59 

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.