Strange assertion :/ - Programmer

This is a discussion on Strange assertion :/ - Programmer ; Hi, there's a dialog and list control in it (with member variable 'm_ItemList'). __________________________________________ CNewSubGroupDlg dlgNewSubGroup ; if (dlgNewSubGroup.DoModal() == IDOK) { int i = dlgNewSubGroup.m_ItemList.GetItemCount() ; } __________________________________________ I don't know why I've got Debug Assertion Failed in afxcmn.inl ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Strange assertion :/

  1. Strange assertion :/

    Hi,
    there's a dialog and list control in it (with member variable 'm_ItemList').

    __________________________________________
    CNewSubGroupDlg dlgNewSubGroup ;

    if (dlgNewSubGroup.DoModal() == IDOK)
    {
    int i = dlgNewSubGroup.m_ItemList.GetItemCount() ;
    }
    __________________________________________

    I don't know why I've got Debug Assertion Failed in afxcmn.inl while running
    this code...
    Please help.

    Deli


  2. Re: Strange assertion :/

    > The dialog and all its child windows have already been destroyed after
    > DoModal is complete.
    >
    > Read up on DDX and DDV in the MFC docs.


    Ok thx, but how can I access this CListCtrl after DoModal?

    Deli

  3. Re: Strange assertion :/

    You can't. Before you exit, you have to save any values you want into the
    C++ class. You might use a Container Class (CArray, etc.)

    --
    -------------------------------------------------------------------------
    Free software - Baxter Codeworks www.baxcode.com
    -------------------------------------------------------------------------


    "Deli" wrote in message
    news:cdhkf9$eon$1@news.onet.pl...
    > > The dialog and all its child windows have already been destroyed after
    > > DoModal is complete.
    > >
    > > Read up on DDX and DDV in the MFC docs.

    >
    > Ok thx, but how can I access this CListCtrl after DoModal?
    >
    > Deli




+ Reply to Thread