[Win32Api] List View Report questions and bugs (?)

okay, so I'm creating a listview with report style, however I'm having some troubles with it, I'm creating it in .rc not via function, like this

CONTROL "", IDC_LIST, WC_LISTVIEW, WS_TABSTOP | WS_BORDER | LVS_REPORT, 5, 10, 180, 150

now for the problems;

1. it is possible to select an item, however only by selecting the first column, not any other (I also need to click on the first ~half of the column, otherwise it wont select)
2. when I select an item, it will allign it to the left, while normally it is alligned to the center and it will stay alligned to the left even after unselect

here's the screenshot, I need to click to the highlighted area in order to select an item, the item will get selected (only item, not full row - row wont get selected even with LVS_EX_FULLROWSELECT) and alligned to the left - permanently

http://filebeam.com/2e7521c7899d6c9890cd0bde9f6ae804.jpg

now what I want to do is a possibility to select a full row (item and it's subitems) WITHOUT breaking my code (when I use LVS_EX_FULLROWSELECT it wont load data properly and will mess them up) and alligning the stuff to the left

source code:

http://pastebin.com/BzTzHWTv

p.s.: please ignore the comments as this is school project and I have to comment everything
Last edited on
Maybe you should use a grid control, you have an example here:
http://www.codeproject.com/Articles/681771/Simple-Grid-A-Win32-message-based-grid-control
edit, nvm, doesnt work, looks like he's using unicode, while im using multi-byte char set

is anyone here who actually can work with these broken list view reports by microsoft?
Last edited on
On the listview extended styles page on MSDN it says:

Use the LVM_SETEXTENDEDLISTVIEWSTYLE message or one of the ListView_SetExtendedListViewStyle or ListView_SetExtendedListViewStyleEx macros to employ these extended list-view control styles.

http://msdn.microsoft.com/en-us/library/windows/desktop/bb774732%28v=vs.85%29.aspx
Last edited on
Topic archived. No new replies allowed.