Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Crash in CExtED Collapse All
Subject Author Date
Offer Har Jun 6, 2007 - 6:58 AM

Dear Support,
I see that you’ve added a new class in version 2.70 called CExtED.
I keep getting crashes in this class in WindowProc when I receive a WM_KILLFOCUS to my CExtEdit derived control, which I did not get in version 2.62

I see that I get to CExtED in the WM_KILLFOCUS after my control is already destroyed (0xfeefee in the hWnd) - what is the purpose of this class? How can I fix this problem?

Please help.
Thanks,
Ron

Technical Support Jun 6, 2007 - 10:32 AM

This template is used in CExtEdit and CExtEditHotKey and contains common code that is used in these classes.

Please change the following method in the CExtED template and let us know if the problem persists:

virtual void _PostRedraw()
{
    if(        m_hWnd != NULL 
        &&    ::IsWindow( m_hWnd )
        )
    {
        VERIFY(
            RedrawWindow(
            NULL,
            NULL,
            RDW_INVALIDATE | RDW_UPDATENOW
            | RDW_ERASE | RDW_ERASENOW
            | RDW_FRAME | RDW_ALLCHILDREN
            )
            );
    }
}

Offer Har Jun 6, 2007 - 7:53 AM

In the meanwhile i removed the handling of WM_KILLFOCUS from this class, and could not see any different in the behavior (now I don’t get crashed... which enables me to keep working).
Please let me know what it the motivation of this call to WM_KILLFOCUS, and why is it needed.

Thanks,
Ron.