Gets the toolbar's current position.
#include "LtTLB.h"
L_LTTLB_API L_INT L_TBGetPosition(pToolbar, lpptPos, dwFlags)
Pointer to a toolbar handle.
Pointer to a POINT structure to be updated with the toolbar's position. The coordinates are with respect to the screen.
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. |
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes |
To set the position of the toolbar, call L_TBSetPosition.
LTTLB
For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.
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 ;
}