CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2001
    Location
    ROMANIA
    Posts
    30

    NM_CLICK and NM_DBLCLK : is it me or what ???

    hello !

    this post might be a little stupid for you guys that are more advanced like me, but i have no idea why this is happening...

    in a listview, i need to see when the user clicks or double-clicks on a item...

    ON_NOTIFY_REFLECT(NM_CLICK, OnClick)
    ON_NOTIFY_REFLECT(NM_DBLCLK, OnDblclk)

    the only problem is that when i get a NM_DBLCLK i also get a NM_CLICK before it, like if the user clicks, and then double-clicks the same item very fast...

    i know that there might be a simple workaround for this, but i haven't found it yet...

    anybody help ?

    thanks...

  2. #2
    Join Date
    May 2000
    Location
    Scotland, Livingston.
    Posts
    728
    I think this is normal behaviour.
    You get a NM_CLICK from the first click and a NM_DBLCLK if there is another click within the double click "period".
    Dave Mclelland.

  3. #3
    Join Date
    Dec 2001
    Location
    ROMANIA
    Posts
    30

    to use GetTickCount ?

    so, i guess that i must use GetTickCount to see if i'm in that "period"...

    but do you have any ideea how to get that double-click period from the system ? i know that it can be set up ...

    if i make my program for the period that is in my system, then on another system that has a greater period, user will get confused for not being able to double click an item

    i know that i can make the user to set this parameter, but it is not too elegant...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured