LVM_SETITEMSTATE failed when pressing Ctrl-A to co.LVS_SINGLESEL flagged ListView
Hoto-Cocoa opened this issue · comments
Cocoa Hoto commented
I created ListView using following code:
ui.NewListView(parent, ui.ListViewOpts().
Position(location).
Size(size).
CtrlStyles(co.LVS_REPORT|co.LVS_NOSORTHEADER|co.LVS_SHOWSELALWAYS|co.LVS_SINGLESEL).
CtrlExStyles(co.LVS_EX_FULLROWSELECT|co.LVS_EX_GRIDLINES))
And If I pressing Ctrl-A, the program crashes with message: LVM_SETITEMSTATE failed.
I can confirm It crashes without any items to select.
Rodrigo commented
LVM_SETITEMSTATE
fails to select all items if the list view has LVS_SINGLESEL
style. This is an undocumented behavior, apparently.
Cocoa Hoto commented
Thanks for fix!