(1)向子窗口传递消息:

::SendMessage(m_DlgLeftChild.m_hWnd, MSG_UPDATE_LEFT_CHILD, 0, 0);

(2)向父窗口发送消息 

CWnd* pWnd = dynamic_cast<CSendMsgDemoDlg*>(GetParent());

HWND hWnd = pWnd->GetSafeHwnd();

::SendMessage(hWnd, MSG_UPDATE_PARENT, 0, 0);