Re: Strange ListCtrl behaviour
"AnRil" <jacekd@platan.pl> wrote in message
news:op.ttwxg0zt1x5afh@jacekd.platan...
The problem is that it doesn't even enter the OnSelChanged event, it stops
responding after finishing function handling NM_RELEASEDCAPTURE notify.
It's nowhere in my code. And I can't comment out asm lines from dlls in
memory (even _AfxDispatchCmdMsg kind of functions, because MSVC doesn't
allow that). I've already tried to coment out several lines of code, but
it hasn't changed anything. And once again: the same code with the same
dlls loaded under one user profile in Xp causes the dialog to not respond,
while run under another user doesn't behave like that in any way.
Flags correspod to:
0x14E5D8 - LVIF_GROUPID (0x0100) | LVIF_COLUMNS
(0x0200) |LVIF_STATE (0x0008) mask
0x14DF60 - LVIF_NORECOMPUTE (0x0800) | LVIF_GROUPID
(0x0100) |
LVIF_COLUMNS (0x0200) mask
,but I don't know how to force program to have just one of this type of
mask every time. All items in my ListCtrl have masks of LVIF_TEXT |
LVIF_IMAGE.
Yeah, OK. Maybe there is some kind of utility running in the faulty user
profile -- maybe some sort of mouse enhancement that intercepts mouse
clicks. But if a standard list control, such as the ones appearing in
Explorer work, than it's some interaction with your special list control.
That's why I suggested you make your list control as standard as possible by
commenting out the custom parts.
The flags that are different are:
LVIF_NORECOMPUTE - The control will not generate LVN_GETDISPINFO to retrieve
text information if it receives an LVM_GETITEM message. Instead, the pszText
member will contain LPSTR_TEXTCALLBACK.
LVIF_STATE - The state member is valid or must be set.
Since LVIF_STATE only indicates that the field in the struct is valid, it
doesn't affect behavior. So it seems that in the faulty case
LVIF_NORECOMPUTE is part of the problem. It causes the LVM_GETITEM message
to be called (presumably when you click on an item, it must paint in the
selected color, so it needs to get the text to paint). Do your list items
use the LPSTR_TEXTCALLBACK for custom text? If so, does that callback get
called corrrectly after you click on it?
-- David