my problem is related to list control
-
hi i want to increase the width of vertical scrollbar.How it is possible. thank u in advance :zzz: malik
-
hi i want to increase the width of vertical scrollbar.How it is possible. thank u in advance :zzz: malik
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 ;)
-
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 ;)
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
-
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 ;)
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]
-
hi i want to increase the width of vertical scrollbar.How it is possible. thank u in advance :zzz: malik
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]
-
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]
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 ;)
-
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
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 ;)
-
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 ;)
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]
-
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]
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 ;)
-
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 ;)
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]
-
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]
: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
-
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]
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
-
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
rajneshmalik wrote:
BACKGROUNDMACRO
Where is that flag? U can chnage only the channel color of the scroll using FlatSB_SetScrollProp().
nave [OpenedFileFinder]