Invalidate (MFC) debug assertion failed error message

Posted by kobac on Stack Overflow See other posts from Stack Overflow or by kobac
Published on 2010-04-21T09:00:28Z Indexed on 2010/04/21 9:03 UTC
Read the original article Hit count: 424

Filed under:
|
|

I've made a custom control, and when I want it to repaint on the screen I call Invalidate(), and afterwards UpdateWindow(), but i get message:

debug assertion failed for a file afxwin2.inl in line 150 which is:

AFXWIN_INLINE void CWnd::Invalidate(BOOL bErase)

    { ASSERT(::IsWindow(m_hWnd)); ::InvalidateRect(m_hWnd, NULL, bErase); }

The thing is that when I run the same app in release mode, it doesn't report any message! So this clue makes me think it's about some environment configuration I should change.

What do you think?

Thanks.

© Stack Overflow or respective owner

Related posts about vc++

Related posts about c++