Click here to Skip to main content
15,908,173 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Unhandled exception at 0x00413c39 in 23-3apr.exe: 0xC00000FD: Stack overflow.


C++
     BOOL CDialog::PreTranslateMessage(MSG* pMsg)
      {

     if (pMsg->message == WM_KEYDOWN)
     {
         if(pMsg->wParam == VK_SPACE && pMsg->wParam == VK_SHIFT)
      {
                AfxMessageBox("Key is pressed");
       }

         return CDialog::PreTranslateMessage(pMsg);
}
Posted
Updated 24-Apr-13 19:33pm
v3
Comments
[no name] 24-Apr-13 7:15am    
You are getting a stack overflow because you are recursively calling CDialog::PreTranslateMessage

1 solution

Using "return TRUE;" after the "AfxMessageBox".
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900