-
WM_NOTIFY message
How can I extract the NMHDR information from the lParam in the
the WM_NOTIFY message?
I have a WM_NOTFIY case statement in my window procedure and
need to also monitor what notification message is sent. I'm having
one hell of a time trying to figure out how to copy the lParam into
a NMHDR structure. :mad:
Any suggestions are greatly appreciated. :)
Thanks in advance.
-
Code:
//globally declared
NMHDR *pnmhdr;
//these 3 just as an exmaple
HWND hwndNotifyTest;
unsigned int uiNotifyTestFromID;
unsigned int uiNotifyTestCode;
//in your message handler
case WM_NOTIFY:
{
//point your header to the lparam (casted as an LPNMHDR)
pnmhdr=(LPNMHDR)lparam;
//assign the NMHDR's values to the example vars
hwndNotifyTest=pnmhdr->hwndFrom;
uiNotifyTestFromID=pnmhdr->idFrom;
uiNotifyTestCode=pnmhdr->code;
}break;
-
Thanks to you jdinger. Exactly what I needed to know. :)