1.在你两个程序都应有
UINT msg;
msg=::RegisterWindowMessage("MyMessage");
2.在你的要接收消息的Doc类的.cpp中你能找到消息循环,如下
BEGIN_MESSAGE_MAP(CGMPKDoc, CDocument)
//{{AFX_MSG_MAP(CGMPKDoc)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
ON_REGISTERED_MESSAGE(msg,OnMsg); //在消息循环中添加你的消息响应函数即可
END_MESSAGE_MAP()
1.在你两个程序都应有
UINT msg;
msg=::RegisterWindowMessage("MyMessage");
2.在你的要接收消息的Doc类的.cpp中你能找到消息循环,如下
BEGIN_MESSAGE_MAP(CGMPKDoc, CDocument)
//{{AFX_MSG_MAP(CGMPKDoc)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
ON_REGISTERED_MESSAGE(msg,OnMsg); //在消息循环中添加你的消息响应函数即可
END_MESSAGE_MAP()