Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CListView

CListView

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AlexEg
    wrote on last edited by
    #1

    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

    M J 2 Replies Last reply
    0
    • A AlexEg

      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

      M Offline
      M Offline
      Matt Newman
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • A AlexEg

        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

        J Offline
        J Offline
        Joaquin M Lopez Munoz
        wrote on last edited by
        #3
        1. 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. Use GetListCtrl().ModifyStyle(0,LVS_NOCOLUMNHEADER,TRUE) instead. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo
        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups