• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1241
  • Last Modified:

WM_LBUTTONUP received after double-click in "open file" dialog

Hi folks,

A friend of mine is having difficulties with a rogue WM_LBUTTONUP being sent to his window when using the open file dialog box (he's using TCL, but I've reproduced it with a straight GetOpenFileName() call and with the CFileDialog MFC class.)

Everything's fine unless you choose a file in the dialog by double-clicking on a file in the list.  If you double-click, the file is chosen correctly, but the window behind the open file dialog gets a WM_LBUTTONUP message -- presumably from the last LBUTTONUP event of the double click.

Is this normal?  Is there any way to make the open file dialog "eat" the stray message?  Any other suggestions?  I don't know much about this bit of Windows, myself, so all help gratefully received.
  • 2
1 Solution
MSG msg;

It's normal. Common dialog box closes on WM_LBUTTONDBLCLK, and WM_LBUTTONUP goes to your window.

gothickAuthor Commented:
Thanks; although it didn't help him solve his problem, it was good to know it was normal, and I think that your answer was the best that I could have hoped for without finding a TCL guru.

Sorry it's taken so long to grade, but I've just started a new contract, so I'm a bit busy at the moment!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now