I will assume you have a working display and just need to scroll the DC on response to a WM_VSCROLL msg (sent to the parent of the scrollbar)
Also that the DC has been created to the correct size to display all the text and that the text is already printed on it.
When the text is drawn (or DC created) you can calc the area used for any given string and font (search here as this was asked recently).
Set the Scrollbars min to zero and max to 100 (%). SetScrollInfo()
On a WM_VSCROLL call GetScrollInfo() find the nPos (new position)
this is not 100% but will give you an idea.....
look at SCROLLINFO struct and "Types of Coordinate Systems" as there may be issues between world and device units.
GetObject(hCreatedComptBMP, sizeof( BITMAP), &BMP);
YScroll= BMP.bmHeight * ScrollInfo.nPos;
ScrollDC(hdc, 0, YScroll, NULL, NULL, NULL, &UpdateRect);
InvalidateRect(hDlg, &UpdateRect, FALSE);