L_TBGetPosition

Summary

Gets the toolbar's current position.

Syntax

#include "LtTLB.h"

L_LTTLB_API L_INT L_TBGetPosition(pToolbar, lpptPos, dwFlags)

Parameters

pTOOLBARHANDLE pToolbar

Pointer to a toolbar handle.

LPPOINT lpptPos

Pointer to a POINT structure to be updated with the toolbar's position. The coordinates are with respect to the screen.

L_UINT32 dwFlags

Value indicating which corner of the toolbar to get. The following values are possible:

One of the following values:

Value Meaning
TOOLBAR_POSITION_LEFT The x-coordinate of the specified point is the left of the toolbar.
TOOLBAR_POSITION_RIGHT The x-coordinate of the specified point is the right of the toolbar.

Must be combined using the bitwise OR with one of these values:

Value Meaning
TOOLBAR_POSITION_TOP The y-coordinate of the specified point is the top of the toolbar.
TOOLBAR_POSITION_BOTTOM The y-coordinate of the specified point is the bottom of the toolbar.

Returns

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

Comments

To set the position of the toolbar, call L_TBSetPosition.

Required DLLs and Libraries

See Also

Functions

Topics

Example

L_INT TBGetPositionExample( pTOOLBARHANDLE pLeadToolbar,L_INT pPostiion ) 
{ 
   L_INT nRet; 
   /* check the validity of the toolbar handle */ 
   nRet = L_TBIsValid ( pLeadToolbar ); 
   if (nRet == SUCCESS  ) 
   { 
      POINT ptPos00, ptPos01 ;  
 
      /* get the toolbar position */ 
      nRet = L_TBGetPosition ( pLeadToolbar, &ptPos00, TOOLBAR_POSITION_LEFT | TOOLBAR_POSITION_TOP ) ; 
      if(nRet != SUCCESS) 
         return nRet; 
      nRet = L_TBGetPosition ( pLeadToolbar, &ptPos01, TOOLBAR_POSITION_RIGHT | TOOLBAR_POSITION_TOP ) ; 
      if(nRet != SUCCESS) 
         return nRet; 
 
      pPostiion =  ( ptPos01.x - ptPos00.x ) ; 
      return SUCCESS;  
   } 
   else 
      return  nRet ; 
 
} 
Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

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