Wouldn't it be possible
to share the view record set with the dialog ? :)
class CYourView : public CView
{
CYourRecordset m_cRecrdset;
..
public:
..
CYourRecrdset* GetRecordset() { return &m_cRecordset; };
void UpdateView() { .. };
..
};
class CYourDialog : public CDialog
{
CYourView* m_pcView;
..
public:
CYourDialog(CYourView* pcView)
: CDialog(pcView, CYourDialog::IDD), m_pcView(pcView)
{
ASSERT(pcView);
};
..
virtual void OnOK()
{
if (m_pcView) {
CYourRecordset* pcRecordset(m_pcView->GetRecordset());
if (pcRecordset) {
..
m_pcView->UpdateView();
}
}
CDialog::OnOK();
};
};
CYourView* pcView = ..;
CYourDialog cDlg(pcView);
cDlg.DoModal();