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. How to add a Horizontal Scroll Bar to CListBox

How to add a Horizontal Scroll Bar to CListBox

Scheduled Pinned Locked Moved C / C++ / MFC
questiontutorial
4 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.
  • P Offline
    P Offline
    pandit84
    wrote on last edited by
    #1

    Hi I am using a CListBox control in my dialog. I have set the Horizontal Scroll bar property to TRUE but I am not getting horizontal scroll bar . String items added are hiding in the CListBox. Please tell me how can I do this? Thanks in advance. ......

    D B 2 Replies Last reply
    0
    • P pandit84

      Hi I am using a CListBox control in my dialog. I have set the Horizontal Scroll bar property to TRUE but I am not getting horizontal scroll bar . String items added are hiding in the CListBox. Please tell me how can I do this? Thanks in advance. ......

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Have you checked the control's horizontal extent?

      "One man's wage rise is another man's price increase." - Harold Wilson

      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

      "Man who follows car will be exhausted." - Confucius

      1 Reply Last reply
      0
      • P pandit84

        Hi I am using a CListBox control in my dialog. I have set the Horizontal Scroll bar property to TRUE but I am not getting horizontal scroll bar . String items added are hiding in the CListBox. Please tell me how can I do this? Thanks in advance. ......

        B Offline
        B Offline
        BIJU Manjeri
        wrote on last edited by
        #3

        When you add a list box with a horizontal scroll bar to a dialog box using MFC classes, the scroll bar will not automatically appear in your application. To make the scroll bar appear Set a maximum width for the widest element by calling CListBox::SetHorizontalExtent in your code. Without this value set, the scroll bar will not appear, even when the items in the list box are wider than the box. void SetHorizontalExtent( int cxExtent ); http://msdn.microsoft.com/en-us/library/1s0xed6b(VS.80).aspx Cheers, BIJU

        P 1 Reply Last reply
        0
        • B BIJU Manjeri

          When you add a list box with a horizontal scroll bar to a dialog box using MFC classes, the scroll bar will not automatically appear in your application. To make the scroll bar appear Set a maximum width for the widest element by calling CListBox::SetHorizontalExtent in your code. Without this value set, the scroll bar will not appear, even when the items in the list box are wider than the box. void SetHorizontalExtent( int cxExtent ); http://msdn.microsoft.com/en-us/library/1s0xed6b(VS.80).aspx Cheers, BIJU

          P Offline
          P Offline
          pandit84
          wrote on last edited by
          #4

          Thanks a lot ...its really working...

          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