rodrigocfd / windigo

Windows API and GUI in idiomatic Go.

Home Page:https://pkg.go.dev/github.com/rodrigocfd/windigo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LVM_SETITEMSTATE failed when pressing Ctrl-A to co.LVS_SINGLESEL flagged ListView

Hoto-Cocoa opened this issue · comments

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.

LVM_SETITEMSTATE fails to select all items if the list view has LVS_SINGLESEL style. This is an undocumented behavior, apparently.

Thanks for fix!