Setting ScrollBars

while using opengl in VC++ how do we set the scroll bar. the viewport map for both are different?

You should register window class whose style like this = CS_HREDRAW | CS_VREDRAW ;
2.Then in wndproc declare
SCROLLINFO si; the wm_size or when you get the screen fill this si and SetScrollInfo
4.then whenever needed,in WM_VSCROLL or WM_HSCROLL, SetScrollInfo()

This is very vaguely described explanation.You’d better check out in the User Interface chapters in MSDN.