« Previous | Next»

Windows CE: Assertion failed in wincore.cpp line 1034

Posted by coldtobi | 19 Jun, 2011, 23:31

For home automation, I grabbed my old PDA and started coding for it, using the Microsoft embedded Visual C++ Studio 3.0 (was free at that time ;-))

As soon as you start debugging, you immediatly get an assert: "Assertion failed in file wincore.cpp, line 1034". This only happens on the "emulated" PDA, but even with the wizard generated files.

However, I solved this already on another project, but I needed to google it up again, so its time to document this:

  • In your project, open the Class Wizard (in the View menu)
  • Select your App-Class
  • Add the Message Handler "PreTranslateMessage"
  • Double click on the now listed member function
  • Make the member function look this like, adding the bold lines:
BOOL <your-app-name>App::PreTranslateMessage(MSG* pMsg)
{
#ifdef _WIN32_WCE_EMULATION
    if( ! ::IsWindow(pMsg->hwnd))
        return TRUE;
#endif
   
    return CWinApp::PreTranslateMessage(pMsg);
}

 




Blog and Website | Comments (0) | Trackbacks (0)

Related Articles:

0 Comments | "Windows CE: Assertion failed in wincore.cpp line 1034" »

Add comment

 

 This is the ReCaptcha Plugin for Lifetype

Due to German legislation, all comments are moderated. If you get NO error message, your comment is accepted by the system and will be released at the earliest opportunity. Sorry for the inconvenience this might cause.

Inappropiate comments might be edited or not accepted.