ListView painting (was Re: Mouse up vs Mouse click)

Dimitrie O. Paun dimi at intelliware.ca
Thu Jan 29 08:27:43 CST 2004


On Thu, 29 Jan 2004, Fabian Cenedese wrote:

> That was my weak try to explain what I see :)
> Ok, again in short what happens: I can click on a cell in the first column,
> it gets selected, I can release the mouse button, everything fine.
> But when I press on a cell in another column it shortly gets selected
> and immediately the selection again disappears, even while still
> holding the mouse button. The logical selection seems to be ok
> as I can move it to another cell with the cursor keys (and it strangely
> stays there unlike if done so with the mouse).

OK, so it seems that your app uses the listview in LVS_REPORT mode,
and that it wants to make it bahave like a spreadsheet (that is,
you want to be able to individually select any cell from the
row/column matrix of the listview). Hence the OWNERDRAW, as by
default a listview in REPORT more can either select the cell in
the first column or the entire row.

Now, I haven't used MFC before, so I don't know if this behaviour
is done in your app or in MFC code. If it's in your app, it should
be simple enough to add some print statements to figure out the
paint order and to confirm/ruleout this theory. If it's done in
MFC, I'm afraid you'll need to get creative, 'cause I can't help.

But the problem seems to be in the order of events (or some missing
notifications). Print statements are what you want: they'll help you
figure out (1) if you get all required notifications, and (2) if they
arrive in the right order.

-- 
Dimi.




More information about the wine-devel mailing list