Start with the project you created in Setting Container Metrics.
Add the following argument to the OnSize function definition, after "HWND hWnd,":
pCONTAINERHANDLE pContainer, Add the following line just before the end of the OnSize function definition block (before it returns):
// update the container offset.L_ContainerSetOffset ( pContainer, - prcView->left, - prcView->top, 0 ) ;
Add the following argument to the OnHScroll function definition, after "L_UINT code,":
pCONTAINERHANDLE pContainer, Add the following line before the UpdateWindow function in the OnHScroll function definition:
// update the container offset.L_ContainerSetOffset ( pContainer, - prcView->left, - prcView->top, 0 ) ;
Add the following argument to the OnVScroll function definition, after "L_UINT code,":
pCONTAINERHANDLE pContainer, Add the following line before the UpdateWindow function in the OnVScroll function definition:
// update the container offset.L_ContainerSetOffset ( pContainer, - prcView->left, - prcView->top, 0 ) ;
Add the following argument to the OnSize function call, in the WndProc function, after the argument "hWnd," :
pContainer, Add the following argument to the OnHScroll function call, in the WndProc function, after the argument "LOWORD ( wParam ),":
pContainer, Add the following argument to the OnVScroll function call, in the WndProc function, after the argument "LOWORD ( wParam ),":
pContainer, Compile and run the project by selecting Build->Rebuild Solution from the menu, and then Debug->Start Without Debugging.