LToolbar::RemoveButton
#include "ltwrappr.h"
L_INT LToolbar::RemoveButton(uButtonId)
L_UINT uButtonId; |
/* button Id */ |
Removes a button from the toolbar.
Parameter |
Description |
uButtonId |
Button identifier that indicates the button to be removed. Note if this button is the only remaining button in its tool, the whole tool is removed too. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
To add a button to a toolbar, call LToolbar::AddButton.
Required DLLs and Libraries
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.
See Also
Functions: |
LToolbar::AddButton, LToolbar::GetButtonInfo, LToolbar::SetButtonInfo, LToolbar::GetToolbarInfo, LToolbar::SetToolbarInfo, Class Members |
Topics: |
Example
/* This example will remove all the buttons from a toolbar*/
LToolbar tlb;
L_VOID ToolbarTest ( HWND hWnd )
{
LTOOLBARINFO ToolbarInfo;
L_UINT i, j;
/* get toolbar info */
ToolbarInfo.uStructSize = sizeof( LTOOLBARINFO );
tlb.GetToolbarInfo (&ToolbarInfo , sizeof(LTOOLBARINFO) );
/* iterate through tools */
for( i = 0; i < ToolbarInfo.uToolsCount; i++ )
{
/* remove all buttons of this tool */
for( j = 0; j < ToolbarInfo.pTools[ i ].uButtonsCount; j++ )
tlb.RemoveButton (ToolbarInfo.pTools[ i ].pButtons[ j ].uID);
}
/* free the info structure */
tlb.FreeToolbarInfo (&ToolbarInfo);
}