Hi,

I have problems with AfxMessageBox. It always give me the debug assertion failed message :
File:appui1.cpp
Line: 215

This happens with the ff. scenario:
I have multiple documents MFC application. That application uses a dll. In the dll, I call AfxMessageBox(); The said function works fine when no document is open and I try to open a documentfile and display that message. But then the above assertion failed problem occurs when a document file is already opened. I try to open another document file (with both the open function and recent file list files), so in my code, i close the childframe window plus document (in fact i just call my childframe::OnClose() function) then dispay that AfxMessageBox(). That's when the debug assertion failed. I found out that the debug assertion is triggered in the

CFameWnd* PASCAL CCmdTarget::GetRoutingFrame_(){
ASSERT_VALID(pFrame);




so can u give me some ideas to solve this?
thank you very much....