Extracting the wParam and lParam from the WM_COMMAND function

This is a discussion on Extracting the wParam and lParam from the WM_COMMAND function within the Windows Programming forums, part of the Platform Specific Boards category; How exactly do you extract the wParam and lParam from the WM_COMMAND function so that if you have a group ...

  1. #1
    Registered User Finchie_88's Avatar
    Join Date
    Aug 2004
    Posts
    154

    Question Extracting the wParam and lParam from the WM_COMMAND function

    How exactly do you extract the wParam and lParam from the WM_COMMAND function so that if you have a group of buttons etc, you can respond differently to all the other buttons, thanks in advance...

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    Check out WM_COMMAND on msdn.
    Look up BN_CLICKED notification on msdn.
    Read this thread, for example, and search this board for others.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  3. #3
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,855
    There are also some handy macros in windowsx.h

    ie
    idControl = GET_WM_COMMAND_ID(wParam,lParam) ;
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Creating a Window Class
    By Dark_Phoenix in forum Windows Programming
    Replies: 2
    Last Post: 12-07-2008, 06:45 PM
  2. classmember WndProc isn't called ...
    By Greenhorn__ in forum Windows Programming
    Replies: 10
    Last Post: 07-19-2008, 11:40 AM
  3. destroywindow() problem
    By algi in forum Windows Programming
    Replies: 6
    Last Post: 03-27-2005, 10:40 PM
  4. button in function
    By algi in forum Windows Programming
    Replies: 1
    Last Post: 03-21-2005, 10:12 PM
  5. opengl program as win API menu item
    By SAMSAM in forum Game Programming
    Replies: 1
    Last Post: 03-03-2003, 06:48 PM

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