ToolbarMessages Enumeration

The system sends or posts a system-defined message when it communicates with an application.

It uses these messages to control the operations of applications and to provide input and other information for applications to process.

An application can also send or post system-defined messages.

Applications generally use these messages to control the operation of control windows created by using preregistered window classes.

Definition

Namespace: DevCase.Win32.Enums
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public enum ToolbarMessages

Remarks

https://msdn.microsoft.com/en-us/library/windows/desktop/ff486063%28v=vs.85%29.aspx

The definitions can be found in the Windows SDK file: CommCtrl.h

Members

Null 0 The Null message performs no operation.

An application sends the Null message if it wants to post a message that the recipient window will ignore.

EnableButton 1,025 Enables or disables the specified button in a ToolBar control.

wParam Command identifier of the button to enable or disable.

lParam The LOWORD is a Boolean value that indicates whether to enable or disable the specified button.

If , the button is enabled. If , the button is disabled.

Returns: if successful, or otherwise.

PressButton 1,027 Presses or releases the specified button in a ToolBar control.

wParam Command identifier of the button to press or release.

lParam The LOWORD is a Boolean value that indicates whether to press or release the specified button. If , the button is pressed. If , the button is released.

The HIWORD must be zero

Returns: if successful, otherwise.

HideButton 1,028 Hides or shows the specified button in a ToolBar control.

wParam Command identifier of the button to hide or show.

lParam The LOWORD is a Boolean value that indicates whether to hide or show the specified button.

If , the button is hidden. If , the button is shown.

The HIWORD must be zero.

Returns: if successful, otherwise.

Indeterminate 1,029 Sets or clears the indeterminate state of the specified button in a toolbar.

wParam Command identifier of the button whose indeterminate state is to be set or cleared.

lParam The LOWORD is a Boolean that indicates whether to set or clear the indeterminate state. If , the indeterminate state is set. If , the state is cleared.

The HIWORD must be zero.

Returns: Returns if successful, or otherwise.

MarkButton 1,030 Sets the highlight state of a given button in a toolbar control.

wParam Command identifier for a toolbar button.

lParam The LOWORD is a Boolean that indicates the new highlight state. If , the button is highlighted. If , the button is set to its default state.

The HIWORD must be zero

Returns: Returns if successful, or otherwise.

IsButtonEnabled 1,033 Determines whether the specified button in a ToolBar control is enabled.

wParam Command identifier of the button.

lParam Must be zero.

Returns: Returns if the button is enabled, otherwise.

IsButtonChecked 1,034 Determines whether the specified button in a toolbar is checked.

wParam Command identifier of the button.

lParam Must be zero.

Returns: Returns if the button is checked, zero otherwise.

IsButtonPressed 1,035 Determines whether the specified button in a ToolBar control is pressed.

wParam Command identifier of the button.

lParam Must be zero.

Returns: Returns if the button is pressed, otherwise.

IsButtonHidden 1,036 Determines whether the specified button in a ToolBar control is hidden.

wParam Command identifier of the button.

lParam Must be zero.

Returns: Returns if the button is hidden, otherwise.

IsButtonIndeterminate 1,037 Determines whether the specified button in a toolbar is indeterminate.

wParam Command identifier of the button.

lParam Must be zero.

Returns: Returns if the button is indeterminate, otherwise.

IsButtonHighlighted 1,038 Checks the highlight state of a toolbar button.

wParam Command identifier of the button.

lParam Must be zero.

Returns: Returns if the button is highlighted, otherwise.

SetState 1,041 Sets the state for the specified button in a toolbar.

wParam Command identifier of the button.

lParam The LOWORD is a combination of values listed in ToolbarButtonStates enumeration. The HIWORD must be zero.

Returns: Returns if successful, or otherwise.

GetState 1,042 Retrieves information about the state of the specified button in a toolbar, such as whether it is enabled, pressed, or checked.

wParam Command identifier of the button for which to retrieve information.

lParam Must be zero.

Returns: Returns the button state information if successful, or -1 otherwise.

AddButtonsAnsi 1,044 Adds one or more buttons to a toolbar.

wParam Number of buttons to add.

lParam An array of ToolbarButton structures that contain information about the buttons to add.

There must be the same number of elements in the array as buttons specified by wParam.

Returns: Returns if the button is indeterminate, otherwise.

InsertButtonAnsi 1,045 Inserts a button in a ToolBar control.

wParam Zero-based index of a button. The message inserts the new button to the left of this button.

lParam A pointer to a ToolbarButton structure containing information about the button to insert.

Returns: if successful, otherwise.

DeleteButton 1,046 Deletes a button from a ToolBar control.

wParam Zero-based index of the button to delete.

lParam Must be zero.

Returns: if successful, or otherwise.

GetButton 1,047 Retrieves information about the specified button in a ToolBar control.

wParam Zero-based index of the button for which to retrieve information.

lParam A pointer to a ToolbarButton structure that receives the button information.

Returns: if successful, otherwise.

ButtonCount 1,048 Retrieves a count of the buttons currently in a ToolBar control.

wParam Must be zero.

lParam Must be zero.

Returns: The count of the buttons

CommandIdToIndex 1,049 Retrieves the zero-based index for the button associated with the specified command identifier on a ToolBar control.

wParam Command identifier associated with the button.

lParam Must be zero.

Returns: The zero-based index for the button or -1 if the specified command identifier is invalid.

Customize 1,051 Displays the Customize Toolbar dialog box.

wParam Must be zero.

lParam Must be zero.

Returns: No return value.

GetItemRect 1,053 Retrieves the bounding rectangle of a button in a toolbar.

wParam Zero-based index of the button for which to retrieve information.

lParam Pointer to a NativeRectangle structure that receives the client coordinates of the bounding rectangle.

Returns: Returns if successful, or otherwise.

SetButtonSize 1,055 Sets the size of buttons on a toolbar.

wParam Must be zero.

lParam The LOWORD specifies the width, in pixels, of the buttons. The HIWORD specifies the height, in pixels, of the buttons.

Returns: Returns if successful, or otherwise.

AutoSize 1,057 Causes a toolbar to be resized.

wParam Must be zero.

lParam Must be zero

Returns: No return value.

GetBitmapFlags 1,065 Retrieves the flags that describe the type of bitmap to be used.

wParam Must be zero.

lParam Must be zero.

Returns: Returns a DWORD value that describes the type of bitmap that should be used.

If this return value has the TBBF_LARGE flag set, applications should use large bitmaps (24 x 24); otherwise, applications should use small bitmaps (16 x 16). All other bits are reserved.

SetCommandId 1,066 Sets the command identifier of a ToolBar control.

wParam Zero-based index of the button whose command identifier is to be set.

lParam The new Command identifier.

Returns: if successful, or otherwise.

GetBitmapIndex 1,068 Retrieves the index of the bitmap associated with a button in a toolbar.

wParam Command identifier of the button whose bitmap index is to be retrieved.

lParam Must be zero.

Returns: Returns the index of the bitmap if successful, or zero otherwise.

GetButtonTextAnsi 1,069 Retrieves the display text (in ANSI) of a button on a ToolBar control.

wParam Command identifier of the button whose text is to be retrieved.

lParam A pointer to a buffer that receives the button text.

Returns: The length, in characters, of the string pointed to by lParam. The length does not include the terminating null character. If unsuccessful, the return value is -1.

SetImageList 1,072 Sets the image list that the toolbar uses to display buttons that are in their default state.

wParam The index of the list.

If you use only one image list, or an earlier version of the common controls, set wParam to zero.

lParam Handle to the image list to set.

If this parameter is Zero, no images are displayed in the buttons.

Returns: Returns the handle to the image list previously used to display buttons in their default state, or Zero if no image list was previously set.

GetImageList 1,073 Retrieves the image list that a toolbar control uses to display buttons in their default state.

A toolbar control uses this image list to display buttons when they are not hot or disabled.

wParam Must be zero.

lParam Must be zero.

Returns: Returns the handle to the image list, or Zero if no image list is set.

GetRect 1,075 Retrieves the bounding rectangle for a specified toolbar button.

wParam Command identifier of the button.

lParam Pointer to a NativeRectangle structure that will receive the bounding rectangle information.

Returns: Returns if successful, or otherwise.

GetButtonSize 1,082 Retrieves the current width and height of toolbar buttons, in pixels.

wParam Must be zero.

lParam Must be zero.

Returns: Returns a DWORD value that contains the width and height values in the low word and high word, respectively.

SetButtonWidth 1,083 Sets the minimum and maximum button widths in the toolbar control.

wParam Must be zero.

lParam The LOWORD specifies the minimum button width, in pixels. Toolbar buttons will never be narrower than this value.

The HIWORD specifies the maximum button width, in pixels. If button text is too wide, the control displays it with ellipsis points.

Returns: Returns if successful, or otherwise.

GetButtonInfoUnicode 1,087 Retrieves extended information for a button in a ToolBar control.

wParam Command identifier of the button.

lParam A pointer to a ToolBarButtonInfoW structure that receives the button information.

The SizeOfStruct and Mask members of this structure must be filled in prior to sending this message.

Returns: The zero-based index of the button, or -1 if an error occurs.

SetButtonInfounicode 1,088 Sets the information for an existing button in a ToolBar control.

wParam Command identifier of the button.

lParam A pointer to a ToolBarButtonInfoW structure that contains the new button information.

The SizeOfStruct and Mask members of this structure must be filled in prior to sending this message.

Returns: if successful, otherwise.

GetButtonInfoAnsi 1,089 Retrieves extended information for a button in a ToolBar control.

wParam Command identifier of the button.

lParam A pointer to a ToolBarButtonInfoA structure that receives the button information.

The SizeOfStruct and Mask members of this structure must be filled in prior to sending this message.

Returns: The zero-based index of the button, or -1 if an error occurs.

SetButtonInfoAnsi 1,090 Sets the information for an existing button in a ToolBar control.

wParam Command identifier of the button.

lParam A pointer to a ToolBarButtonInfoA structure that contains the new button information.

The SizeOfStruct and Mask members of this structure must be filled in prior to sending this message.

Returns: if successful, otherwise.

InsertButtonUnicode 1,091 Inserts a button in a ToolBar control.

wParam Zero-based index of a button. The message inserts the new button to the left of this button.

lParam A pointer to a ToolbarButton structure containing information about the button to insert.

Returns: if successful, otherwise.

AddButtonsUnicode 1,092 Adds one or more buttons to a toolbar.

wParam Number of buttons to add.

lParam An array of ToolbarButton structures that contain information about the buttons to add.

There must be the same number of elements in the array as buttons specified by wParam.

Returns: Returns if the button is indeterminate, otherwise.

HitTest 1,093 Determines where a point lies in a toolbar control.

wParam Must be zero.

lParam A NativePoint structure that contains the x-coordinate of the hit test in the X member and the y-coordinate of the hit test in the Y member.

The coordinates are relative to the toolbar's client area.

Returns: Returns an integer value.

If the return value is zero or a positive value, it is the zero-based index of the nonseparator item in which the point lies.

If the return value is negative, the point does not lie within a button.

The absolute value of the return value is the index of a separator item or the nearest nonseparator item.

GetButtonTextUnicode 1,099 Retrieves the display text (in Unicode) of a button on a ToolBar control.

wParam Command identifier of the button whose text is to be retrieved.

lParam A pointer to a buffer that receives the button text.

Returns: The length, in characters, of the string pointed to by lParam. The length does not include the terminating null character. If unsuccessful, the return value is -1.

MoveButton 1,106 Moves a button from one index to another in a ToolBar control.

wParam Zero-based index of the button to be moved.

lParam Zero-based index where the button will be moved.

Returns: if successful, otherwise.

GetMaxSize 1,107 Retrieves the total size of all of the visible buttons and separators in the toolbar.

wParam Must be zero.

lParam Pointer to a NativeSize structure that receives the size of the items.

Returns: Returns if successful, or otherwise.

GetPadding 1,110 Retrieves the padding for a toolbar control.

wParam Must be zero.

lParam Must be zero.

Returns: Returns a DWORD value that contains the horizontal padding in the low word and the vertical padding in the high word, in pixels.

SetPadding 1,111 Sets the padding for a toolbar control.

wParam Must be zero.

lParam The LOWORD specifies the horizontal padding, in pixels. The HIWORD specifies the vertical padding, in pixels.

Returns: Returns a DWORD value that contains the previous horizontal padding in the LOWORD and the previous vertical padding in the HIWORD, in pixels.

SetBoundingSize 1,117 Sets the bounding size for a multi-column toolbar control.

wParam Must be zero.

lParam A NativeSize structure whose Height member contains the bounding height. The Width member is ignored.

Returns: Returns if successful, or otherwise.

SetListGap 1,120 Sets the distance between the toolbar buttons on a specific toolbar.

wParam The gap, in pixels, between buttons on the toolbar.

lParam Ignored.

Returns: No return value.

GetImageListCount 1,122 Gets the number of image lists associated with the toolbar.

wParam Must be zero.

lParam Must be zero.

Returns: Returns the number of image lists.

GetIdealSize 1,123 Gets the ideal size of the toolbar.

wParam A Boolean that indicates whether to retrieve the ideal height or width of the toolbar.

Use to retrieve the ideal height, to retrieve the ideal width.

lParam Pointer to a NativeSize structure that receives the height or width at which all buttons would be displayed.

If wParam is , only the Height member is valid. If wParam is , only the Width member is valid.

Returns: Returns if successful, or otherwise.

See Also