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. my problem is related to list control

my problem is related to list control

Scheduled Pinned Locked Moved C / C++ / MFC
help
13 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.
  • N Nelek

    By subclassing and using OWNERDRAW can be one solution. But... why to make it? (If I may ask). List Ctrl is annoying enough to worry about the scrollbars :P

    Greetings. -------- M.D.V. If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you “The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson ;)

    N Offline
    N Offline
    Naveen
    wrote on last edited by
    #4

    Nelek wrote:

    By subclassing and using OWNERDRAW can be one solution

    How? ASFAIK Owner draw allows only to draw the Client area of list control. Scroll bar lies in the non client area. So I think it is not possible with the owner draw.

    nave [OpenedFileFinder]

    N 1 Reply Last reply
    0
    • R rajneshmalik

      hi i want to increase the width of vertical scrollbar.How it is possible. thank u in advance :zzz: malik

      N Offline
      N Offline
      Naveen
      wrote on last edited by
      #5

      The width can be increased if you enable the flat scroll bar in the list control. check the LVS_EX_FLATSB style, FlatSB_EnableScrollBar() FlatSB_SetScrollProp() But MSDN says "Flat scroll bar APIs are implemented in Comctl32.dll versions 4.71 through 5.82. Comctl32.dll versions 6.00 and higher do not support flat scroll bars".

      nave [OpenedFileFinder]

      R 1 Reply Last reply
      0
      • N Naveen

        Nelek wrote:

        By subclassing and using OWNERDRAW can be one solution

        How? ASFAIK Owner draw allows only to draw the Client area of list control. Scroll bar lies in the non client area. So I think it is not possible with the owner draw.

        nave [OpenedFileFinder]

        N Offline
        N Offline
        Nelek
        wrote on last edited by
        #6

        Is it not possible to override and put a bigger user defined scrollbar over the other one? Then use it as you want? On the other hand, I have given him the links to two articles, the XListCtrl and the ResizingControlBars of Hans Dietrich. I guess are the best examples to achieve it

        Greetings. -------- M.D.V. If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you “The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson ;)

        N 1 Reply Last reply
        0
        • R rajneshmalik

          you wrote "By subclassing and using OWNERDRAW can be one solution" can u give me some light with the help of coding you wrote Why do we have to worry about i want to develop an application for touch screen so i need the scroll size same to fingure tip malik

          N Offline
          N Offline
          Nelek
          wrote on last edited by
          #7

          Ok, I didn't thought about it. Is a good reason ;) Sorry, I don't know how to do it, but This article[^] and This article[^] can maybe help you

          Greetings. -------- M.D.V. If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you “The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson ;)

          1 Reply Last reply
          0
          • N Nelek

            Is it not possible to override and put a bigger user defined scrollbar over the other one? Then use it as you want? On the other hand, I have given him the links to two articles, the XListCtrl and the ResizingControlBars of Hans Dietrich. I guess are the best examples to achieve it

            Greetings. -------- M.D.V. If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you “The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson ;)

            N Offline
            N Offline
            Naveen
            wrote on last edited by
            #8

            Nelek wrote:

            Is it not possible to override and put a bigger user defined scrollbar over the other one?

            Actaully we cannot overide. I check the link you suggested him. In that also they some how hide the original scroll bar and puts our own scroll bar. When i tried, had a problem that some part of the last column gets under the vertical scroll bar. But this is not a problem if the text in the last column is a little less than the column width.

            nave [OpenedFileFinder]

            N 1 Reply Last reply
            0
            • N Naveen

              Nelek wrote:

              Is it not possible to override and put a bigger user defined scrollbar over the other one?

              Actaully we cannot overide. I check the link you suggested him. In that also they some how hide the original scroll bar and puts our own scroll bar. When i tried, had a problem that some part of the last column gets under the vertical scroll bar. But this is not a problem if the text in the last column is a little less than the column width.

              nave [OpenedFileFinder]

              N Offline
              N Offline
              Nelek
              wrote on last edited by
              #9

              I think that this is easily avoidable setting the width of the column higher than the text that is going to contain with LV_COLUMN lvCol; i.e. lvCol.cx = nDesiredWidth; when inserting the items.

              Greetings. -------- M.D.V. If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you “The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson ;)

              N 1 Reply Last reply
              0
              • N Nelek

                I think that this is easily avoidable setting the width of the column higher than the text that is going to contain with LV_COLUMN lvCol; i.e. lvCol.cx = nDesiredWidth; when inserting the items.

                Greetings. -------- M.D.V. If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you “The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson ;)

                N Offline
                N Offline
                Naveen
                wrote on last edited by
                #10

                No no you didnt understand what I mean. Setting the width of the column is not the pblm here try this. Create a list control with a 250 pixel wide insert a column with width 200 pixel. Reduce the client area of list control by 100 pixel( using OnNcCalcSize() function) You can see the effect. Now you can no more reseize the column using the mouse.

                nave [OpenedFileFinder]

                N 1 Reply Last reply
                0
                • N Naveen

                  No no you didnt understand what I mean. Setting the width of the column is not the pblm here try this. Create a list control with a 250 pixel wide insert a column with width 200 pixel. Reduce the client area of list control by 100 pixel( using OnNcCalcSize() function) You can see the effect. Now you can no more reseize the column using the mouse.

                  nave [OpenedFileFinder]

                  N Offline
                  N Offline
                  Nelek
                  wrote on last edited by
                  #11

                  :doh: I didn't try the CListCtrl so far to find this issue :rolleyes: In my application the CFormView that contains the CListCtrl must not be resized, so I have not that problem

                  Greetings. -------- M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you “The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson

                  1 Reply Last reply
                  0
                  • N Naveen

                    The width can be increased if you enable the flat scroll bar in the list control. check the LVS_EX_FLATSB style, FlatSB_EnableScrollBar() FlatSB_SetScrollProp() But MSDN says "Flat scroll bar APIs are implemented in Comctl32.dll versions 4.71 through 5.82. Comctl32.dll versions 6.00 and higher do not support flat scroll bars".

                    nave [OpenedFileFinder]

                    R Offline
                    R Offline
                    rajneshmalik
                    wrote on last edited by
                    #12

                    hi thank u very much i have implimented ur approach,but i also want to color the scrollbar.I use function FlatSB_setScrollProp(handle,BACKGROUNDMACRO,color,BOOL) but color is not appear,Am i missing something,please reply:rose: malik

                    N 1 Reply Last reply
                    0
                    • R rajneshmalik

                      hi thank u very much i have implimented ur approach,but i also want to color the scrollbar.I use function FlatSB_setScrollProp(handle,BACKGROUNDMACRO,color,BOOL) but color is not appear,Am i missing something,please reply:rose: malik

                      N Offline
                      N Offline
                      Naveen
                      wrote on last edited by
                      #13

                      rajneshmalik wrote:

                      BACKGROUNDMACRO

                      Where is that flag? U can chnage only the channel color of the scroll using FlatSB_SetScrollProp().

                      nave [OpenedFileFinder]

                      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