Link to home
Start Free TrialLog in
Avatar of gothick
gothick

asked on

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.
ASKER CERTIFIED SOLUTION
Avatar of NickRepin
NickRepin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of NickRepin
NickRepin

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


Avatar of gothick

ASKER

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!