Advice OnLButtonDblClk

This is a discussion on Advice OnLButtonDblClk within the Windows Programming forums, part of the Platform Specific Boards category; I need advice on some MFC code... From the msdn docs: "Double-clicking the left mouse button actually generates four events: ...

  1. #1
    Registered User
    Join Date
    Aug 2003
    Posts
    470

    Advice OnLButtonDblClk

    I need advice on some MFC code... From the msdn docs: "Double-clicking the left mouse button actually generates four events: WM_LBUTTONDOWN, WM_LBUTTONUP messages, the WM_LBUTTONDBLCLK call, and another WM_LBUTTONUP message when the button is released." What I want to do is generate a popup menu when a user double left clicks and draw a tile when the user single left clicks. The problem is that before the double left click message is handled, the single left click is handled. Is their anyway to have this behavior without delaying the handling of the single left click?

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,669

    Re: Advice OnLButtonDblClk

    Originally posted by okinrus
    ... without delaying the handling of the single left click?
    Not that I know of.
    Shouldn't be too hard to implement - some state information and a WM_TIMER message should be enough to delay the single click long enough to determine that it isn't part of a double click.

    gg

  3. #3
    Registered User
    Join Date
    Aug 2003
    Posts
    470
    Ok, think I got it working.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Advice on C Programming with MSVC++ 2008
    By IT_Guy in forum Windows Programming
    Replies: 1
    Last Post: 03-06-2009, 03:23 AM
  2. game engine advice?
    By stien in forum Game Programming
    Replies: 0
    Last Post: 01-23-2007, 02:46 PM
  3. Resume advice
    By Zughiaq in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 04-15-2005, 02:16 PM
  4. girl friend advice (prob. the wrong place)
    By B0bDole in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 10-22-2004, 06:38 PM
  5. Partitioning advice?
    By mart_man00 in forum Tech Board
    Replies: 6
    Last Post: 01-10-2003, 09:53 PM

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