Title: [MSVC] Dll and Dialog Question

Hi All

I am trying to call a dialog that is in a DLL. I get it right to have the
dialog display but the controls (ie tab and defaukt enter) do not function.
What gives?


Code in DLL

int CAccessCodeDlg::DoModal()
 {
     int RetCode = 0;
    AFX_MANAGE_STATE(AfxGetStaticModuleState());
    RetCode = CDialog::DoModal();
    return RetCode;
}

Code in Windows app.

void CResetCodeDlg::OnOK()
 {
 // TODO: Add extra validation here
 UpdateData(TRUE);
 COleDateTime Reset;
 Reset.SetDate(m_Year,m_Month, m_Day);
 if (Reset.GetStatus() == COleDateTime::valid)
  {
  CAccessCodeDlg CA(NULL); -- Exported class from DLL
  CA.DoModal(); //------ >dialog is called here
  CA.ResetFile(&Reset);
  CDialog::OnOK();
  }
 else
  {
  MessageBox("Date is not valid");
  }
 }

Any advice welcome. The code does assert in debug mode but completes if I
click ignore.

Hylton

Reply via email to