CListView
-
Hallo, can anybody help me with CListView class? 1) I can use only one column with width on all view window. Problem is with scroll bar. I get the size of scroll bar in CListView::InitDialog using GetListCtrl().GetScrollBarCtrl()->GetWindowRect(). But at this time is not scroll bar known. So what is the good way? 2) I can't select any row in list control. I filter callbacks on mouse click but how about keyboard click? 3) I can't show header. I used GetListCtrl().SetExtendedStyle(LVS_NOCOLUMNHEADER); in the CListView::InitDialog but it has no effect. Thanks, Alex. Alex
-
Hallo, can anybody help me with CListView class? 1) I can use only one column with width on all view window. Problem is with scroll bar. I get the size of scroll bar in CListView::InitDialog using GetListCtrl().GetScrollBarCtrl()->GetWindowRect(). But at this time is not scroll bar known. So what is the good way? 2) I can't select any row in list control. I filter callbacks on mouse click but how about keyboard click? 3) I can't show header. I used GetListCtrl().SetExtendedStyle(LVS_NOCOLUMNHEADER); in the CListView::InitDialog but it has no effect. Thanks, Alex. Alex
I have been looking at this to I find this very annoying. If you don't have a header (unless you have more that one column or it won't work) don't insert a column and the only what it should scroll is if the contents is wider that the view. Hopefully I was helpful or somebody has a better suggestion. -:suss:Matt Newman:suss: -:suss:Matt Newman:suss: -Sonork ID: 100.11179:BestSnowman
-
Hallo, can anybody help me with CListView class? 1) I can use only one column with width on all view window. Problem is with scroll bar. I get the size of scroll bar in CListView::InitDialog using GetListCtrl().GetScrollBarCtrl()->GetWindowRect(). But at this time is not scroll bar known. So what is the good way? 2) I can't select any row in list control. I filter callbacks on mouse click but how about keyboard click? 3) I can't show header. I used GetListCtrl().SetExtendedStyle(LVS_NOCOLUMNHEADER); in the CListView::InitDialog but it has no effect. Thanks, Alex. Alex
- I'm not sure I understood your question, but seems what you're after is calculating the width of the view minus the width of the vertical scrollbar so that you can adjust the column to its maximum extent without the horizontal scrollbar appearing. Am i right? If so,
::GetSystemMetrics(SM_CXVSCROLL)
might be what you're looking for. 2) I don't quite understand your question. Sorry. 3)LVS_NOCOLUMNHEADER
is not an extended style. UseGetListCtrl().ModifyStyle(0,LVS_NOCOLUMNHEADER,TRUE)
instead. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo
- I'm not sure I understood your question, but seems what you're after is calculating the width of the view minus the width of the vertical scrollbar so that you can adjust the column to its maximum extent without the horizontal scrollbar appearing. Am i right? If so,