Gets the toolbar's current position.
#include "ltwrappr.h"
POINT LToolbar::GetPosition (dwFlags)
Sets of flags that will specify how the lpptPos argument (in LToolbar::SetPosition) will be set. Choose one value from each category, and combine them using the bitwise OR operator ( | ).
Value | Meaning |
---|---|
TOOLBAR_POSITION_LEFT | The specified point x will become the left of the toolbar window. |
TOOLBAR_POSITION_RIGHT | The specified point x will become the right of the toolbar window. |
Value | Meaning |
---|---|
TOOLBAR_POSITION_TOP | The specified point y will become the top of the toolbar window. |
TOOLBAR_POSITION_BOTTOM | The specified point y will become the bottom of the toolbar window. |
A POINT structure that contains the current position.
To set the position of the toolbar, call LToolbar::SetPosition.
L_INT LToolbar__GetPositionExample( LToolbar &Toolbar, L_INT* pnWidth)
{
// check the validity of the toolbar handle
if (Toolbar.IsValid () )
{
POINT ptPos00, ptPos01 ;
// get the toolbar position
ptPos00 = Toolbar.GetPosition (TOOLBAR_POSITION_LEFT | TOOLBAR_POSITION_TOP ) ;
ptPos01 = Toolbar.GetPosition (TOOLBAR_POSITION_RIGHT | TOOLBAR_POSITION_TOP ) ;
*pnWidth = ptPos01.x - ptPos00.x ;
}
else
{
return FAILURE;
}
return SUCCESS;
}