Thread: Extracting the wParam and lParam from the WM_COMMAND function

  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,868
    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, 07: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, 11:40 PM
  4. button in function
    By algi in forum Windows Programming
    Replies: 1
    Last Post: 03-21-2005, 11:12 PM
  5. opengl program as win API menu item
    By SAMSAM in forum Game Programming
    Replies: 1
    Last Post: 03-03-2003, 07:48 PM