Thread: Advice OnLButtonDblClk

  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,981

    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, 04:23 AM
  2. game engine advice?
    By stien in forum Game Programming
    Replies: 0
    Last Post: 01-23-2007, 03: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, 10:53 PM