I have an MDI app. In CChildFrame I have an CPaneDialog from where I want to update the view, like that:
void CChildFrame::OnBnClickedButtonUpdate() { // TODO: Add your control notification handler code here CDocument* pDoc = GetActiveDocument(); if(NULL != pDoc) pDoc->UpdateAllViews(GetActiveView(), DCM_UPDATE); }
in CMyView I have:
void CMyView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint) { // TODO: Add your specialized code here and/or call the base class if(DCM_UPDATE == lHint) { CWaitCursor Wait; // some code } } }
but CMyView::OnUpdateis never been called if is launched fromCChildFrame::OnBnClickedButtonUpdate() .... why ?
But if I call:
void CChildFrame::OnBnClickedButtonUpdate() { // TODO: Add your control notification handler code here CDocument* pDoc = GetActiveDocument(); if(NULL != pDoc) pDoc->UpdateAllViews(NULL, DCM_UPDATE); }
then CMyView::OnUpdate is called, but every view attached by the document is called, and I don't want that ...