L_ContainerGetMetrics

Summary

Gets the current container metrics information.

Syntax

#include "LtCon.h"

L_LTCON_API L_INT L_ContainerGetMetrics(pContainer, pMetrics)

Parameters

pCONTAINERHANDLE pContainer

Pointer to a container handle.

pCONTAINERMETRICS pMetrics

Pointer to CONTAINERMETRICS structure to be updated with the current container metrics information.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Required DLLs and Libraries

See Also

Functions

Topics

Example

L_INT ContainerGetMetricsExample(pCONTAINERHANDLE pContainer) 
{ 
   L_INT nRet; 
   CONTAINERMETRICS  Metrics ; 
   HWND              hwndOwner ; 
   RECT              rcClient ; 
 
   /* Get the container owner */ 
   nRet = L_ContainerGetOwner ( pContainer, &hwndOwner ) ; 
   if(nRet == SUCCESS) 
   { 
      /* Get the owner client area */ 
      GetClientRect ( hwndOwner, &rcClient ) ; 
 
      /* Initiate the container metrics */ 
      Metrics.nSize  = sizeof ( CONTAINERMETRICS ) ; 
      Metrics.dwMask = CMF_LIMITS ; 
 
      /* Get the container metrics */ 
      nRet = L_ContainerGetMetrics ( pContainer, &Metrics ) ; 
      if(nRet != SUCCESS) 
         return nRet; 
 
      if ( ! EqualRect ( &rcClient, &Metrics.rcLimits ) ) 
      { 
 
         CopyRect ( &Metrics.rcLimits, &rcClient ) ; 
 
         /* Set the new metrics */ 
         nRet = L_ContainerSetMetrics( pContainer, &Metrics ) ; 
      } 
   } 
 
   return nRet; 
    
} 
Help Version 22.0.2022.12.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 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.