for those who want to know -
<code>
in OnCreate():
CRect rect;
::GetClientRect

:GetParent(lpCreateStruct->hwndParent),&rect);
m_VScrollBar.Create(
SBS_VERT | SBS_RIGHTALIGN | WS_CHILD| WS_VISIBLE,
CRect(rect.left-15, 0, rect.right,rect.bottom), this, 1999);
SCROLLINFO ScrollInfo;
ScrollInfo.cbSize = sizeof(ScrollInfo); // size of this structure
ScrollInfo.fMask = SIF_ALL; // parameters to set
ScrollInfo.nMin = 0; // minimum scrolling position
ScrollInfo.nMax = 100; // maximum scrolling position
ScrollInfo.nPage = 40; // the page size of the scroll box
ScrollInfo.nPos = 0; // initial position of the scroll box
ScrollInfo.nTrackPos = 0; // immediate position of a scroll box that the user is dragging
m_VScrollBar.SetScrollInfo(&ScrollInfo);
</code>
VScrollBar is defined in the header
now just override OnSize:
<code>
COleControl::OnSize(nType, cx, cy);
int size=GetSystemMetrics(SM_CXVSCROLL);
m_VScrollBar.SetWindowPos(NULL,cx-size,0,size,cy-size,SWP_NOZORDER);
</code>
and handle the scroll events
------------------------
dev at viewmoresoft.com
tools for your database