Click here to Skip to main content
15,888,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
I Have Installed A Hook With WH_GETMESSAGE On A DLL Using MFC.But When I Send Postmessage To My Parent Window It Is Not Received...

HWND hwndmain; //(Assigned The Value Of Main Window HWND)

static UINT snd=::RegisterWindowMessage(L"mainwnd_msg");

::PostMessage(hwndmain,snd,66,0);


The Same Message Is Declared In The Main Window To Receive The Registered Window Message And Added On register message event also But It Is Not Working Kindly Help Me I'm Not Able To Find What Is Happenning...


What I have tried:

LRESULT CALLBACK msgProc(int ncode, WPARAM wparam, LPARAM lparam)

{
if(wparam=='A')
::PostMessage(mainwnd2,snd,66,0);
return CallNextHookEx(hk, ncode, wparam, lparam);
}
Posted
Updated 1-Jan-19 22:06pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900