http://bugs.winehq.org/show_bug.cgi?id=6716
--- Comment #29 from Nikolay Sivov bunglehead@gmail.com 2012-02-24 07:35:47 CST --- (In reply to comment #28)
Seems like I have found the bug. As I can tell, the problem is following:
IDOS has broken WindowProc handler for custom drawing - it returns 48 insted of CDRF_NOTIFYITEMDRAW code when the handler is called with CDDS_PREPAINT code.
48 is (CDRF_NOTIFYITEMDRAW | CDRF_NOTIFYPOSTPAINT)
According to MSDN, ListView should send NM_CUSTOMDRAW notifications _only_ if dwDrawStage equals CDDS_PREPAINT:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb775489(v=vs.85).as...
This is usually irrelevant how it's documented to be, tests are what we need.
The problem is, that wine treats cditemmode parameters as flags and compares it with "&", and not with "==".
They are bit flags.
Please, could someone double check my patch before I post it to by applied?
I think you change much more than you test shows. If I got it correctly you mean that if retvalue is not equal to CDRF_NOTIFYITEMDRAW whole custom draw sequence should be skipped, is that right? If so you need to return something else, some garbage value will work as well, or 0, and check if message sequence is empty after that.