To all lost souls out there, a cry for help from the land of perpetual darkness (England)

problem: flat scrollbar is displayed in listview but scrolling is not activated (i.e. I can't scroll :) )

question: how do I make the god**** thing work?

synopsis: In a galaxy far far away ... ops, wrong thread.
For a reason unknown to me, few days ago a weird idea entered my brain. Why not use one of those totally useless new extended styles MS has added to common controls several moons ago?
And in particular, why not display scrollbars in a listview with that ugly and quite honestly pathetic FLAT style? So here we are ... the castrated scrollbars are indeed displayed but (dramatic pause) HORROR, no scroll?? Now I ask, what's the use of a scrollbar if you cannot freely scroll around??

So here's the code which I hope will prompt many wise and enlightened responses



; InitCommonControlsEx is called somewhere else

invoke CreateWindowEx, NULL, ADDR szListViewClass,
NULL, WS_CHILD or WS_VISIBLE or LVS_REPORT,
0, 0, 0, 0, [hwnd], NULL, [hInstance], NULL
mov [hListView], eax
invoke SendMessage, [hListView],
LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0
or eax, LVS_EX_FLATSB
invoke SendMessage, [hListView],
LVM_SETEXTENDEDLISTVIEWSTYLE, 0, eax



Here it is ? in all it?s splendour and total uselessness

What?s missing?? Again, the scrollbar is displayed correctly, just without the scrolling bit (you know, the rectangle that goes up and down, alas right and left if you want)

To you the hard response.

Random
Posted on 2002-02-08 03:23:20 by random
i never have problems using the flat scrollbars. dont know what really happening but try this instead:

get rid of LVM_GETEXTENDEDLISTVIEWSTYLE

and send your message like this instead:

invoke SendMessage,,LVM_SETEXTENDEDLISTVIEWSTYLE,0,LVS_EX_FLATSB
Posted on 2002-02-08 09:16:27 by smurf
try to avoid WS_VISIBLE and use ShowWindow instead after SendMessage (just a guess)
Posted on 2002-02-08 10:11:10 by japheth
nope ... still getting those handicapped bars
Posted on 2002-02-08 11:03:09 by random
are you interested in posting your source code? some will probably be able to pinpoint your problem easily.
Posted on 2002-02-08 17:34:50 by smurf
try this...


invoke FlatSB_EnableScrollBar,hList,SB_BOTH,ESB_ENABLE_BOTH ;..ups!..ListView coder forget this! soo we must do it :/


cyaz...

jean / coder7345
Posted on 2002-02-08 18:34:31 by coder