Setting Container Offsets

Start with the project you created in Setting Container Metrics.

  1. Add the following argument to the OnSize function definition, after "HWND hWnd,":

    pCONTAINERHANDLE pContainer, 

  2. 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 ) ; 

  3. Add the following argument to the OnHScroll function definition, after "L_UINT code,":

    pCONTAINERHANDLE pContainer, 

  4. 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 ) ; 

  5. Add the following argument to the OnVScroll function definition, after "L_UINT code,":

    pCONTAINERHANDLE pContainer, 

  6. 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 ) ; 

  7. Add the following argument to the OnSize function call, in the WndProc function, after the argument "hWnd," :

    pContainer, 

  8. Add the following argument to the OnHScroll function call, in the WndProc function, after the argument "LOWORD ( wParam ),":

    pContainer, 

  9. Add the following argument to the OnVScroll function call, in the WndProc function, after the argument "LOWORD ( wParam ),":

    pContainer, 

  10. Compile and run the project by selecting Build->Rebuild Solution from the menu, and then Debug->Start Without Debugging.

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Container and Automation C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.