tags:

views:

142

answers:

2

How to enable horizontal scrollbar smooth scrolling for CGridCtrl. Now it jumps by fields when I scroll it from left to right.

A: 

I assume you're talking about CGridCtrl published in this CodeProject article.

If so, then you're going to have to completely override the drawing methods to offset the columns by the current scroll position (instead of calculating the first column to display from the scroll position).

To get you started, you should begin by looking at GetScrollPos(SB_HORZ) to use as an offset to begin drawing.

Alan
Thanks, I`ll try. One more question: what method should I override? "void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)" or something else?
A: 

www.codeproject.com/KB/grid/gridctrl_redux.aspx

eram saber