https://bugs.winehq.org/show_bug.cgi?id=44329
Bug ID: 44329 Summary: Listview custom draw in report mode uses wrong state of LV_ITEM using LVIS_STATEIMAGEMASK Product: Wine Version: 3.0-rc5 Hardware: x86-64 OS: Mac OS X Status: UNCONFIRMED Severity: normal Priority: P2 Component: comctl32 Assignee: wine-bugs@winehq.org Reporter: lisitski.segrey@gmail.com
Created attachment 60193 --> https://bugs.winehq.org/attachment.cgi?id=60193 Wrong result in WINE
I'm trying to create my own Listview in report mode, using custom draw.
When I try to check does Item have a state image using LVIS_STATEIMAGEMASK, WINE says that subItem has state image too(See attached screenshot)
By MSDN:
https://msdn.microsoft.com/en-us/library/windows/desktop/bb774760(v=vs.85).a...
Bits 12 through 15 of this member specify the state image index. The state image is displayed next to an item's icon to indicate an application-defined state. If these bits are zero, the item has no state image. To isolate these bits, use the LVIS_STATEIMAGEMASK mask. To set the state image index, use the INDEXTOSTATEIMAGEMASK macro. The state image index specifies the index of the image in the state image list that should be drawn. The state image list is specified with the LVM_SETIMAGELIST message.
Source code: https://drive.google.com/open?id=1FlwWEIn2r_CJfw_OWLJmq2Cb8N_ciruw
Executables: https://drive.google.com/open?id=1QdnYBvDQiSOEmHMWLQpYDDGLRI6ZnTTl
https://bugs.winehq.org/show_bug.cgi?id=44329
--- Comment #1 from Sergey Lisitski lisitski.segrey@gmail.com --- Created attachment 60194 --> https://bugs.winehq.org/attachment.cgi?id=60194 Expected result in Windows
https://bugs.winehq.org/show_bug.cgi?id=44329
--- Comment #2 from Nikolay Sivov bunglehead@gmail.com --- Hi, Sergey.
Thanks for the report, please attach your sources and resulting binary to this report, instead of using external links.
https://bugs.winehq.org/show_bug.cgi?id=44329
--- Comment #3 from Sergey Lisitski lisitski.segrey@gmail.com --- Created attachment 60195 --> https://bugs.winehq.org/attachment.cgi?id=60195 Executables
https://bugs.winehq.org/show_bug.cgi?id=44329
--- Comment #4 from Sergey Lisitski lisitski.segrey@gmail.com --- Created attachment 60196 --> https://bugs.winehq.org/attachment.cgi?id=60196 WINE console log
https://bugs.winehq.org/show_bug.cgi?id=44329
Sergey Lisitski lisitski.segrey@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |https://drive.google.com/op | |en?id=1FlwWEIn2r_CJfw_OWLJm | |q2Cb8N_ciruw Keywords| |download, source
https://bugs.winehq.org/show_bug.cgi?id=44329
--- Comment #5 from Sergey Lisitski lisitski.segrey@gmail.com --- (In reply to Nikolay Sivov from comment #2)
Hi, Sergey.
Thanks for the report, please attach your sources and resulting binary to this report, instead of using external links.
I have attached reqested files.
https://bugs.winehq.org/show_bug.cgi?id=44329
--- Comment #6 from Nikolay Sivov bunglehead@gmail.com --- Created attachment 60197 --> https://bugs.winehq.org/attachment.cgi?id=60197 main source file
Ok, thanks. I'm attaching main source file that triggers a problem. Looks like it's not notification related, but returned item state always contains state image bits, even when called for subitems. I'll take a look.
https://bugs.winehq.org/show_bug.cgi?id=44329
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|https://drive.google.com/op | |en?id=1FlwWEIn2r_CJfw_OWLJm | |q2Cb8N_ciruw |
https://bugs.winehq.org/show_bug.cgi?id=44329
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
https://bugs.winehq.org/show_bug.cgi?id=44329
--- Comment #7 from Nikolay Sivov bunglehead@gmail.com --- The problem is not that wrong state is returned, but actually state field is not touched at all when requesting subitem data. I'll send a fix for that after code freeze.
P.S. running your test exe is problematic, it needs mfc140, but after installing vcrun2015, it still crashes because of some ucrtbase vs api-ms-* forwards. If possible please rebuild it with older Visual Studio.
https://bugs.winehq.org/show_bug.cgi?id=44329
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Listview custom draw in |Listview does not reset |report mode uses wrong |returned state mask for |state of LV_ITEM using |subitems |LVIS_STATEIMAGEMASK |
https://bugs.winehq.org/show_bug.cgi?id=44329
--- Comment #8 from Sergey Lisitski lisitski.segrey@gmail.com --- (In reply to Nikolay Sivov from comment #7)
The problem is not that wrong state is returned, but actually state field is not touched at all when requesting subitem data. I'll send a fix for that after code freeze.
P.S. running your test exe is problematic, it needs mfc140, but after installing vcrun2015, it still crashes because of some ucrtbase vs api-ms-* forwards. If possible please rebuild it with older Visual Studio.
Wicth version of Visual Studio will be best for you?
https://bugs.winehq.org/show_bug.cgi?id=44329
--- Comment #9 from Nikolay Sivov bunglehead@gmail.com --- (In reply to Sergey Lisitski from comment #8)
(In reply to Nikolay Sivov from comment #7)
The problem is not that wrong state is returned, but actually state field is not touched at all when requesting subitem data. I'll send a fix for that after code freeze.
P.S. running your test exe is problematic, it needs mfc140, but after installing vcrun2015, it still crashes because of some ucrtbase vs api-ms-* forwards. If possible please rebuild it with older Visual Studio.
Wicth version of Visual Studio will be best for you?
Static build would be the best I think. Otherwise any version will do, if there's a reasonably simple way to install dependencies. How are you running this test with Wine?
https://bugs.winehq.org/show_bug.cgi?id=44329
--- Comment #10 from Sergey Lisitski lisitski.segrey@gmail.com --- Created attachment 60212 --> https://bugs.winehq.org/attachment.cgi?id=60212 Executables(static build)
(In reply to Nikolay Sivov from comment #9)
(In reply to Sergey Lisitski from comment #8)
(In reply to Nikolay Sivov from comment #7)
The problem is not that wrong state is returned, but actually state field is not touched at all when requesting subitem data. I'll send a fix for that after code freeze.
P.S. running your test exe is problematic, it needs mfc140, but after installing vcrun2015, it still crashes because of some ucrtbase vs api-ms-* forwards. If possible please rebuild it with older Visual Studio.
Wicth version of Visual Studio will be best for you?
Static build would be the best I think. Otherwise any version will do, if there's a reasonably simple way to install dependencies. How are you running this test with Wine?
I just install vcrun2015 and it start work. Anyway I attached static build with mfc140 as you reqest.
https://bugs.winehq.org/show_bug.cgi?id=44329
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1
--- Comment #11 from Nikolay Sivov bunglehead@gmail.com --- Yes, that worked, thanks.
https://bugs.winehq.org/show_bug.cgi?id=44329
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|wine-bugs@winehq.org |bunglehead@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=44329
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED Fixed by SHA1| |6b2675dc8fefde3d12675762581 | |f23b1f544f6c4 Assignee|bunglehead@gmail.com |wine-bugs@winehq.org
--- Comment #12 from Nikolay Sivov bunglehead@gmail.com --- Fixed with https://source.winehq.org/git/wine.git/?a=commit;h=6b2675dc8fefde3d126757625.... Please test.
https://bugs.winehq.org/show_bug.cgi?id=44329
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #13 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 3.1.
https://bugs.winehq.org/show_bug.cgi?id=44329
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |3.0.x
https://bugs.winehq.org/show_bug.cgi?id=44329
Sergey Lisitski lisitski.segrey@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |REOPENED Resolution|FIXED |---
--- Comment #14 from Sergey Lisitski lisitski.segrey@gmail.com --- Reopen because when I don't add subitem to listview, I see same error: Wine draw checkbox instead of empty subitem.
New executables, screeshots and log were attached.
https://bugs.winehq.org/show_bug.cgi?id=44329
Sergey Lisitski lisitski.segrey@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #60194|0 |1 is obsolete| |
--- Comment #15 from Sergey Lisitski lisitski.segrey@gmail.com --- Created attachment 60877 --> https://bugs.winehq.org/attachment.cgi?id=60877 Expected result in Windows(new)
https://bugs.winehq.org/show_bug.cgi?id=44329
Sergey Lisitski lisitski.segrey@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #60193|0 |1 is obsolete| |
--- Comment #16 from Sergey Lisitski lisitski.segrey@gmail.com --- Created attachment 60878 --> https://bugs.winehq.org/attachment.cgi?id=60878 Wrong result in WINE(new)
https://bugs.winehq.org/show_bug.cgi?id=44329
Sergey Lisitski lisitski.segrey@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #60195|0 |1 is obsolete| |
--- Comment #17 from Sergey Lisitski lisitski.segrey@gmail.com --- Created attachment 60879 --> https://bugs.winehq.org/attachment.cgi?id=60879 New Executables(static build)
https://bugs.winehq.org/show_bug.cgi?id=44329
Sergey Lisitski lisitski.segrey@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #60196|0 |1 is obsolete| |
--- Comment #18 from Sergey Lisitski lisitski.segrey@gmail.com --- Created attachment 60880 --> https://bugs.winehq.org/attachment.cgi?id=60880 WINE console log(new)
https://bugs.winehq.org/show_bug.cgi?id=44329
Sergey Lisitski lisitski.segrey@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|3.0-rc5 |3.4
https://bugs.winehq.org/show_bug.cgi?id=44329
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution|--- |FIXED
--- Comment #19 from Nikolay Sivov bunglehead@gmail.com --- Please open a new bug report for that. We try not to reuse closed bugs.
https://bugs.winehq.org/show_bug.cgi?id=44329
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #20 from Nikolay Sivov bunglehead@gmail.com --- Closing.
https://bugs.winehq.org/show_bug.cgi?id=44329
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|3.0.x |---
--- Comment #21 from Michael Stefaniuc mstefani@winehq.org --- Removing the 3.0.x milestone from bugs included in 3.0.1.