SendMessage()
is part of CWnd (although there is also one that is directly part of WinAPI), meaning any CWnd derived class contains this call... if you need to message between two CDialogs, which are CWnd derived, you just need to give them each others handles, either as CWnd or as CDialog, then you can just message between them directly.
say you have...
CDialog MainDialog;
that owns...
CDialog ChildDialog1;
CDialog ChildDialog2;
within either the constructor or InitDialog() of MainDialog...
ChildDialog1.m_hDialog = &ChildDialog2;
ChildDialog2.m_hDialog = &ChildDialog1;
now for them to message each other directly,
m_hDialog->SendMessage(...);
[edit]
You're missing the point... if you have a handle to any CWnd, you can message to it.
CMainDialog::OnButtonClick()
{
COtherDialog Child;
Child.m_hParent = this;
Child.DoModal();
}
COtherDialog::OnButtonClickity()
{
m_hParent->SendMessage(...);
...yada, yada, yada...
return;
}
[/edit]