Hi,
reading beginner, I thinked... ,now it is clear !
You have to define a USER message :
#define WM_MYMESSAGE WM_MESSAGE+1
In the class of DialogBox add a pointer to caller view
m_pView, and load it by "this" before launch dialog box.
In the function CMyDialog::OnOK, call
if( m_pView != NULL )
m_pView->PostMessage( WM_MYMESSAGE, IDOK ) ;
Then in the calling message loop add
after BEGIN_MESSAGE_MAP and
before AFX_MSG_MAP
ON_MESSAGE( WM_MYMESSAGE, OnMyRefresh )
define
LRESULT CMyView::OnMyRefresh( WPARAM wParam, LPARAM lParam)
{
...
Reload Listbox
}
In header file of calling View add
afx_msg LRESULT OnMyRefresh(WPARAM,LPARAM)
(before DECLARE_MASSAGE_MAP()
after //}}AFX_MSG