Hi Guys,
Sorry for the bad english. I need urgent help on this.
I have add the button in msgsres.dll using ResHacker and it is perfectly showing in the Messenger Main window. Here is the code for the button
code:
<button class="HIGToolbarButton" padding=rcrect(20136) layout=BorderLayout() id=atom(gamedsdlg) cmdid="40371" AccRole="44" AccDefAction=rcstr(20500) Tooltip=true active=7 accname="Game Dialog" accdesc="Game Dashboard">
<ButtonIcon class="HIGToolbarIcon" content=rcimg("msgr",1491) ContentAlign=middlecenter padding=rcrect(20140)/>
<element layoutpos=right ContentAlign=middlecenter layout=FillLayout()>
<ButtonText Id=atom(gamedsdlgbtntxt) class="HIGToolbarText" content="" FontSize=rcint(20958)pt ContentAlign=middlecenter padding=rcrect(20141) Shortcut=1/>
</element>
</button>
The Proxy DLL and hooked functions are working fine (Thanks Sunheart for this he send me the code).
The other button named : "Change conact list layout"
If I intercept it with its cmdid="40370" I am getting the MessageBox but when I try to intercept mine cmdid="40371" I am not getting the MessageBox here is the code for hooking.
code:
LRESULT CALLBACK MyHookProc(int nCode,WPARAM wParam,LPARAM lParam)
{
MSG *pMsg=(MSG *)lParam;
if(pMsg->message == WM_COMMAND ) //
{
//if(pMsg->wParam ==44344) //you should use your command ID
if(pMsg->wParam == 40370)
{
//here you can do anything
MessageBox(NULL, L"I am just trying my wedding dress", L"MyCommand", NULL);
//pMsg->message=WM_NULL;
}
if(pMsg->wParam == 40371)
{
//here you can do anything
MessageBox(NULL, L"I am just trying my wedding dress", L"MyCommand", NULL);
//pMsg->message=WM_NULL;
}
}
return CallNextHookEx(g_hHook, nCode, wParam, lParam );
}
Where I am doing Wrong.