Click to See Complete Forum and Search --> : Scorlling in diffrent controls


Quell
January 24th, 2006, 05:45 PM
Hello.
I was wondering how to set the position of the output in things like listview, rich edit controls and so on with win apis.
Thx

kirants
January 24th, 2006, 05:58 PM
What do you mean by position ?
For list views you can add rows and columns.. So you don't have much control on position except the row and column. Is this what you mean ?

Quell
January 24th, 2006, 06:18 PM
bascily i got a 10 page text in rich edit, and i wanted to set page to 3 for starting position. Also i wanted to know how to generaly something like that is done in diffrent controls. Basicly the handling of the movemnet of the scrollbar msg, but which one is it?
Thx

Bornish
January 29th, 2006, 06:23 AM
Are you talking about handling WM_VSCROLL & WM_HSCROLL?
If yes, read in MSDN about wParam's possible values (SB_LINEUP, SB_LINEDOWN, SB_PAGEUP, SB_PAGEDOWN,... SB_THUMBPOSITION, SB_THUMBTRACK).
General APIs for scrolling: EnableScrollBar, ShowScrollBar, GetScrollPos / GetScrollInfo, SetScrollPos / SetScrollInfo, GetScrollRange, SetScrollRange and ScrollWindow / ScrollWindowEx / ScrollDC.

Note: WM_MOUSEWHEEL needs to be handled for mice with no enhanced scroll mode support, or if your control (window) doesn't have scrolling styles (WS_VSCROLL, WS_HSCROLL) set.

Regards,