tags:

views:

249

answers:

2

I have setup a hook on WM_SETTEXT message using WH_CALLWNDPROC.

In hook procedure

CWPSTRUCT* info = (CWPSTRUCT*) lParam;
switch(info->message)
{
case WM_SETTEXT:
break;
}

Now in the above code how can I get the string that is passed along WM_SETTEXT message? I am not able to get this information anywher..

+3  A: 

The lParam passed to WM_SETTEXT contains the string, so info->lParam should have the info you want.

Michael
This is correct. See http://msdn.microsoft.com/en-us/library/ms632644(VS.85).aspxlParamPointer to a null-terminated string that is the window text.
GalacticJello
A: 

According to http://msdn.microsoft.com/en-us/library/ms632644(VS.85).aspx

You should be able to get that with info->lParam.

m3rLinEz