ListView oddity

Fabian Cenedese Cenedese at
Wed Feb 18 05:41:20 CST 2004


I had a problem with the ListView control. I could circumvent it by changing
(correcting?) my application. But I thought I'd still report it.

I have an MFC-app which uses a CListCtrl-derived list. In the OnRButtonDown
handler of my class I didn't call the baseclass handler from CListCtrl. Upon
release of the right mouse button the context menu would appear on Windows.
That's how it worked.

On wine I can see that the LISTVIEW_RButtonDown function is never called.
Understandable as I didn't call the base class. But in this handler is a flag
called bRButtonDown which would be set to TRUE. In the corresponding
handler LISTVIEW_RButtonUp this flag is again tested. As it was never
set in my case the handler never sent the WM_CONTEXTMENU message.

What is this flag for? Is this to detect drag'n'drops with the right button or
something like that? As my app worked on Windows I guess it's not
necessary that the ButtonDown handler is called as in wine. Or this
flag should be set earlier and not in the (maybe not called) down handler.
Or it could be cleared from mouse move messages, don't know.

As I said I corrected my app to always call the base class handler and so
it works now. But that's a difference to Windows that may need to be
changed sometimes. I wonder why it worked on Windows anyway :)


bye  Fabi

More information about the wine-devel mailing list