If you can do this depends a bit upon your code structure.
You could do it this way (but I'm not sure):
///////////////////////////////////////////////////////
CYourFirstDlg: public CDialog
{
//initialisation
CDialog* pSecondDlg; //CDialog because the code does not know CYourSecondDialog by now.
//But CDialog will usually be good enough
BOOL IsOtherControlEmpty(if(pSecondDlg->GetDlgItemText(ID_NAME)/*or ItemInt*/== _T(""

)return FALSE;}//should not be inline
}
CYourSecondDlg: public CDialog
{
//initialisation
CYourFirstDlg* pFirstDlg;
/*IsOtherControlEmpty can be used just like in the first dialog, but here you have the exact dialog from your template; this means you can access your control variables after updating, like pFirstDlg->UpdateData(); if(pFirstDlg->m_controlVar.IsEmpty()) return FALSE;*/
}
CYourDocument: public CDocument
{
//initialisation
CYourFirstDlg* dlgA;//init in your constructor (new CYourFirstDlg() etc.)
CYourSecondDlg* dlgB;//init in your constructor
void InitDlgs(dlgA->pSecondDlg= (CDialog*) dlgB; dlgB->pFirstDlg= dlgA;};//call this after you have created the dialogs on the heap
};
////////////////////////////////////////////////////////
I hope this is what you wanted to know and that it works and helped