WM_FORWARDMSG
WPARAM - DWORD dwUserData
LPARAM - LPMSG pMsg
Return Value
Nonzero if the message was processed, zero if not.
Parameters
DWORD dwUserData = (DWORD)wParam
Data defined by user.
LPMSG pMsg = (LPMSG)lParam
A pointer to a MSG structure that contains information about a message.
Remarks
WM_FORWARDMSG is defined by ATL. Use WM_FORWARDMSG to forward a message received by a window to another window for processing. In the following example, hWndOther
represents the other window that receives this message.
Example
LRESULT CMyWindow::OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
MSG msg = { m_hWnd, uMsg, wParam, lParam, 0, { 0, 0 } };
LRESULT lRet = SendMessage(hWndOther, 0, (LPARAM)&msg);
if(lRet == 0) // not handled
bHandled = FALSE;
return 0;
}