Double-click madness

This is a discussion on Double-click madness within the Windows Programming forums, part of the Platform Specific Boards category; Just wondering...what's the message generated when the user double-clicks on a listbox? I don't like having to use a button ...

  1. #1
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,230

    Double-click madness

    Just wondering...what's the message generated when the user double-clicks on a listbox? I don't like having to use a button to process listbox selections when every other app in the world can just let you double-click an entry .

    Would you just do...

    Code:
    case WM_COMMAND:
           switch(LOWORD(wParam))
           {
                    case ID_LIST1:
                             switch(HIWORD(wParam))
                             {
                                      case LBN_DBLCLK:
                                             /*process*/
                             }
                              return 0;
            }
    return 0;
    I think that's the way you'd process the messages, but not quite sure...any help?
    Last edited by -KEN-; 12-28-2001 at 11:38 AM.

  2. #2
    Programming is fun, mkay?
    Join Date
    Oct 2001
    Posts
    490

    Post Try this:

    case WM_COMMAND:
    switch(LOWORD(wParam))
    {
    if(LOWORD(wParam) == ID_LIST1 && HIWORD(wParam) == LBN_DBLCLK)
    {
    // Do this
    }
    }
    break;


    I have a program that does that and it works.
    Website(s): http://www16.brinkster.com/trifaze/

    E-mail: trifaze_mattu@lycos.com

    ---------------------------------
    C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
    DirectX Version: 9.0b
    DX SDK: DirectX 8.1 SDK

  3. #3
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,230
    Oh, well considering that code does the same exact thing I guess I was right afterall...thanks.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need some help...
    By darkconvoy in forum C Programming
    Replies: 32
    Last Post: 04-29-2008, 04:33 PM
  2. Rectangular Approximation Program Help
    By Noah in forum C Programming
    Replies: 4
    Last Post: 03-15-2006, 02:23 PM
  3. Help with multi function progam
    By WackoWolf in forum C Programming
    Replies: 22
    Last Post: 10-13-2005, 03:56 AM
  4. error message, what does it mean?
    By Shy_girl_311 in forum C++ Programming
    Replies: 5
    Last Post: 11-09-2001, 09:54 PM
  5. Hi, could someone help me with arrays?
    By goodn in forum C Programming
    Replies: 20
    Last Post: 10-18-2001, 10:48 AM

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