WM_NOTIFY message

This is a discussion on WM_NOTIFY message within the Windows Programming forums, part of the Platform Specific Boards category; How can I extract the NMHDR information from the lParam in the the WM_NOTIFY message? I have a WM_NOTFIY case ...

  1. #1
    ShinobiSoft
    Join Date
    Jan 2003
    Location
    Knoxville, Tn
    Posts
    7

    Question 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.

    Any suggestions are greatly appreciated.

    Thanks in advance.

  2. #2
    Used Registerer jdinger's Avatar
    Join Date
    Feb 2002
    Posts
    1,065
    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;

  3. #3
    ShinobiSoft
    Join Date
    Jan 2003
    Location
    Knoxville, Tn
    Posts
    7
    Thanks to you jdinger. Exactly what I needed to know.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Strange string behavior
    By jcafaro10 in forum C Programming
    Replies: 2
    Last Post: 04-07-2009, 07:38 PM
  2. Global Variables
    By Taka in forum C Programming
    Replies: 34
    Last Post: 11-02-2007, 03:25 AM
  3. Message class ** Need help befor 12am tonight**
    By TransformedBG in forum C++ Programming
    Replies: 1
    Last Post: 11-29-2006, 10:03 PM
  4. Dialog Box Problems
    By Morgul in forum Windows Programming
    Replies: 21
    Last Post: 05-31-2005, 05:48 PM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21