Skip to main content
GameDev.net gamedev.net
🔒 Locked

Need help with ListView

Started by kollesofthome Aug 12, 2002 at 5:09 AM 0 replies 250+ views
Original Post
kollesofthome
kollesofthome
I''m using a ListView (CListCtrl) in an MFC app. The list has the following styles: LVS_EX_FULLROWSELECT | LVS_EX_HEADERDRAGDROP and view:report. The thing is that when the list losts focus the selected rows get deselected. Maybe not but the background color of the selected rows turns white when you click on a button and then you don''t know which row(s) that were selected. Any style constant I''ve forgotten?
n/a
kollesofthome
kollesofthome
Found a way:

DWORD dwStyle = GetWindowLong(m_serverinfo.GetSafeHwnd(), GWL_STYLE);
dwStyle |= LVS_SHOWSELALWAYS;
SetWindowLong(m_mylist.GetSafeHwnd(),GWL_STYLE,dwStyle);

Now the selected rows have grey background. Is it possible to use the blue "highlighted color" instead without ownerdraw?
n/a

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.