Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - ASSERT after inplace edit finish
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ASSERT after inplace edit finish

 Post Reply Post Reply
Author
Message
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1007
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Topic: ASSERT after inplace edit finish
    Posted: 02 June 2017 at 5:47am
HI;

I'm using the report control inside a modal dialog box. Whenever i finish editing (by pressing return or escape or ...) I get an ASSERT in CWnd::AssertValid() (line 902 in wincore.cpp).
#ifdef _DEBUG
void CWnd::AssertValid() const
{
    if (m_hWnd == NULL)
        return;     // null (unattached) windows are valid

    // check for special wnd??? values
    ASSERT(HWND_TOP == NULL);       // same as desktop
    if (m_hWnd == HWND_BOTTOM)
        ASSERT(this == &CWnd::wndBottom);
    else if (m_hWnd == HWND_TOPMOST)
        ASSERT(this == &CWnd::wndTopMost);
    else if (m_hWnd == HWND_NOTOPMOST)
        ASSERT(this == &CWnd::wndNoTopMost);
    else
    {
        // should be a normal window
        ASSERT(::IsWindow(m_hWnd));    <--- ASSERT happens here

        // should also be in the permanent or temporary handle map
        CHandleMap* pMap = afxMapHWND();
        ASSERT(pMap != NULL);

        CObject* p=NULL;


And here is the call stack:



How can I avoid this assert?
Martin

Product: Xtreme Toolkit v 15.3.1, new Projects v 18.0.1
Platform: Windows 8.1 (64bit)
Language: VC++ 2015 U
Back to Top
astoyan View Drop Down
Admin Group
Admin Group
Avatar

Joined: 24 August 2013
Status: Offline
Points: 171
Post Options Post Options   Thanks (0) Thanks(0)   Quote astoyan Quote  Post ReplyReply Direct Link To This Post Posted: 05 June 2017 at 12:59am
Hello,

There is almost no indication that the assertion is caused by any of XTP classes as the only evidence of Codejock components being involved is the presence of CXTPDialogBase::OnWndMsg call on your stack. But that's not enough for fixing or reproducing that bug. You also haven't mentioned the version of the Toolkit you have issue with.

Have you had a chance to test the same or similar functionality the closest  available options? If not please try that first, then submit as much as possible information or try to make a simple sample.

Regards,
   Alexander

Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1007
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Posted: 06 June 2017 at 1:35am
It's always happening when the edit control is loosing focus.
I will try to create a sample based on your report samples.
In my case a modeless dialog calls a modal dialog .
The assert happens because the AssertValid is called for the Inplace Edit control and this window no longer exists.
Martin

Product: Xtreme Toolkit v 15.3.1, new Projects v 18.0.1
Platform: Windows 8.1 (64bit)
Language: VC++ 2015 U
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.094 seconds.