Your could extend the dialog constructor:
class CYourDialog : public CDialog
{
CRecordView* m_pcView;
..
public:
CYourDialog(CRecordView* pcView, CWnd* pcParent)
: CDialog(pcParent, CYourDialog::IDD), m_pcView(pcView) {};
..
virtual void OnOK()
{
if (pcView->GetSafeHwnd()) {
}
}
..
};
..or, as Carlo said, use the OK event at the parent side:
void CMainFrame::OnRecordViewConfig()
{
CYourDialog cDlg(this);
if (IDOK == cDlg.DoModal()) {
if (m_pcRecordView->GetSafeHwnd()) {
}
}
}
:)