Thanks Paul. You are right. Actually I am implementing my own tab control and use a CObArray container to store any listbox, button, edit box, etc...
And I use tabCtrl.GetDlgItem(IDC_LISTBOX_XXX) to get my own list box control (not via COBArray). Although the debugger shows an assertion at the point I am stepping through at this line
Code:
m_coDetails.Add((CObject*)lpszDetail);
and before the line
Code:
return CListBox::AddString(lpszItem);
.
I believe it could be the problem that the MS Visual Studio compiler is unable to catch that. It is because, as you mentioned, if I use any private member (e.g. CString, CStringArray, vector, etc...) it will also get the assertion.
Cheers~~!