keep item selected when list control loses focus
-
Hi, I have a List Control in my project. When the user clicks anywhere outside the listcontrol view (the control loses focus) the item that was selected loses it's selection. How can I keep this item selected, even if the control loses focus? I am already using the LVS_SHOWSELALWAYS style. this is how I create the list control: CListCtrl cList; cList.CreateEx( WS_EX_STATICEDGE | LVS_EX_TWOCLICKACTIVATE | LVS_EX_DOUBLEBUFFER , LVS_ICON | LVS_SHOWSELALWAYS | LVS_ALIGNTOP | LVS_OWNERDATA | WS_BORDER | WS_TABSTOP |WS_VISIBLE | LVS_SINGLESEL, ClientRect, this, IDC_LIST) Thanks
-
Hi, I have a List Control in my project. When the user clicks anywhere outside the listcontrol view (the control loses focus) the item that was selected loses it's selection. How can I keep this item selected, even if the control loses focus? I am already using the LVS_SHOWSELALWAYS style. this is how I create the list control: CListCtrl cList; cList.CreateEx( WS_EX_STATICEDGE | LVS_EX_TWOCLICKACTIVATE | LVS_EX_DOUBLEBUFFER , LVS_ICON | LVS_SHOWSELALWAYS | LVS_ALIGNTOP | LVS_OWNERDATA | WS_BORDER | WS_TABSTOP |WS_VISIBLE | LVS_SINGLESEL, ClientRect, this, IDC_LIST) Thanks
Have you tried playing around with those styles to see if the presence of one is possibly negating the effects of
LVS_SHOWSELALWAYS
?"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne