mileta
asked on
Send/Receive message
Hi all,
Does anybody know why one application don't receive to message sent from another application.
In first application I have:
const UINT nMsgID = RegisterWindowMessage( "MESSAGE" );
and
void CSendMessageView::OnButton Send()
{
::SendMessage( HWND_BROADCAST, nMsgID, 0, 0 );
}
and in second:
const UINT wm_Raport = RegisterWindowMessage( "MESSAGE" );
BEGIN_MESSAGE_MAP(CReceive MsgView, CView)
//{{AFX_MSG_MAP(CReceiveMs gView)
// 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
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_D IRECT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_P REVIEW, CView::OnFilePrintPreview)
ON_REGISTERED_MESSAGE(wm_R aport, RaportMsg)
END_MESSAGE_MAP()
and
void CReceiveMsgView::RaportMsg ()
{
MessageBox( "RECEIVE" );
}
But when I click on button for sending message in first application second application is quiet (dont have any raport).
Please help me!
Mileta.
Does anybody know why one application don't receive to message sent from another application.
In first application I have:
const UINT nMsgID = RegisterWindowMessage( "MESSAGE" );
and
void CSendMessageView::OnButton
{
::SendMessage( HWND_BROADCAST, nMsgID, 0, 0 );
}
and in second:
const UINT wm_Raport = RegisterWindowMessage( "MESSAGE" );
BEGIN_MESSAGE_MAP(CReceive
//{{AFX_MSG_MAP(CReceiveMs
// 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
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_D
ON_COMMAND(ID_FILE_PRINT_P
ON_REGISTERED_MESSAGE(wm_R
END_MESSAGE_MAP()
and
void CReceiveMsgView::RaportMsg
{
MessageBox( "RECEIVE" );
}
But when I click on button for sending message in first application second application is quiet (dont have any raport).
Please help me!
Mileta.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER