
TB_CHECKBUTTON
wParam = (WPARAM) idButton;
lParam = (LPARAM) MAKELONG(fCheck, 0);
Checks or unchecks a given button in a toolbar.
When a button is checked, it is displayed in the pressed state.
TB_COMMANDTOINDEX
wParam = (WPARAM) idButton;
lParam = 0;
Retrieves the zero-based index for the button associated with the specified command identifier.
TB_CUSTOMIZE
wParam = 0;
lParam = 0;
Displays the Customize Toolbar dialog box.
TB_DELETEBUTTON
wParam = (WPARAM) iButton;
lParam = 0;
Deletes a button from the toolbar.
TB_ENABLEBUTTON
wParam = (WPARAM) idButton;
lParam = (LPARAM) MAKELONG(fEnable, 0);
Enables or disables the specified button in a toolbar.
When a button has been enabled, it can be pressed and checked.
TB_GETANCHORHIGHLIGHT
wParam = 0;
lParam = 0;
Retrieves the anchor highlight setting for a toolbar.
Version 4.71
See also TB_SETANCHORHIGHLIGHT
TB_GETBITMAP
wParam = (WPARAM) idButton;
lParam = 0;
Retrieves the index of the bitmap associated with a button in a toolbar.
TB_GETBITMAPFLAGS
wParam = 0;
lParam = 0;
Retrieves the flags for the current bitmap.
TB_GETBUTTON
wParam = (WPARAM) iButton;
lParam = (LPARAM) (LPTBBUTTON) lpButton;
Retrieves information about the specified button in a toolbar.
TB_GETBUTTONINFO
wParam = (WPARAM)(INT) iID;
lParam = (LPARAM)(LPTBBUTTONINFO) lptbbi;
Retrieves extended information for a button in a toolbar.
Version 4.71
TB_GETBUTTONSIZE
wParam = 0;
lParam = 0;
Retrieves the current width and height of toolbar buttons, in pixels.
Version 4.70.
TB_GETBUTTONTEXT
wParam = (WPARAM) idButton;
lParam = (LPARAM) (LPSTR) lpszText;
Retrieves the text of a button in a toolbar.
TB_GETCOLORSCHEME
wParam = 0;
lParam = (LPARAM)(LPCOLORSCHEME) lpcs;
Retrieves the color scheme information from the toolbar control.
Version 4.71
See also TB_SETCOLORSCHEME
TB_GETDISABLEDIMAGELIST
wParam = 0;
lParam = 0;
Retrieves the image list that a toolbar control uses to display disabled buttons.
Version 4.70.
TB_GETEXTENDEDSTYLE
wParam = 0;
lParam = 0;
Retrieves the extended styles for a toolbar control.
Version 4.71
See also TB_SETEXTENDEDSTYLE
TB_GETHOTIMAGELIST
wParam = 0;
lParam = 0;
Retrieves the image list that a toolbar control uses to display hot buttons. A button is hot when the pointer is above it.
Version 4.70.
TB_GETHOTITEM
wParam = 0;
lParam = 0;
Retrieves the index of the hot item in a toolbar.
Version 4.71
TB_GETIMAGELIST
wParam = 0;
lParam = 0;
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.
Version 4.70.
TB_GETINSERTMARK
wParam = 0;
lParam = (LPARAM)(LPTBINSERTMARK)lptbim;
Retrieves the current insertion mark for the toolbar.
Version 4.71
See also TB_SETINSERTMARK
TB_GETINSERTMARKCOLOR
wParam = 0;
lParam = 0;
Retrieves the color used to draw the insertion mark for the toolbar.
Version 4.71
See also TB_SETINSERTMARKCOLOR
TB_GETITEMRECT
wParam = (WPARAM) iButton;
lParam = (LPARAM) (LPRECT) lprc;
Retrieves the bounding rectangle of a button in a toolbar.
This message does not retrieve the bounding rectangle for buttons whose state is set to the TBSTATE_HIDDEN value.
TB_GETMAXSIZE
wParam = 0;
lParam = (LPARAM)(LPSIZE)lpSize;
Retrieves the total size of all of the visible buttons and separators in the toolbar.
Version 4.71
TB_GETOBJECT
wParam = (WPARAM) (REFIID) iid;
lParam = (LPARAM) (LPVOID*) ppvObject;
Retrieves the IDropTarget for a toolbar control.
The toolbar's IDropTarget is used by the toolbar when objects are dragged over or dropped onto it.
Version 4.71
TB_GETPADDING
wParam = 0;
lParam = 0;
Retrieves the padding for a toolbar control.
Version 4.71
See also TB_SETPADDING
TB_GETRECT
wParam = (WPARAM)(INT) iID;
lParam = (LPARAM)(LPRECT) lprc;
Retrieves the bounding rectangle for a specified toolbar button.
Version 4.70.
TB_GETROWS
wParam = 0;
lParam = 0;
Retrieves the number of rows of buttons in a toolbar with the TBSTYLE_WRAPABLE style.
TB_GETSTATE
wParam = (WPARAM) idButton;
lParam = 0;
Retrieves information about the state of the specified button in a toolbar, such as whether it is enabled, pressed, or checked.
TB_GETSTYLE
wParam = 0;
lParam = 0;
Retrieves the styles currently in use for a toolbar control.
Version 4.70.
TB_GETTEXTROWS
wParam = 0;
lParam = 0;
Retrieves the maximum number of text rows that can be displayed on a toolbar button.
Version 4.70.
See also TB_SETMAXTEXTROWS
TB_GETTOOLTIPS
wParam = 0;
lParam = 0;
Retrieves the handle to the tooltip control, if any, associated with the toolbar.
TB_GETUNICODEFORMAT
wParam = 0;
lParam = 0;
Retrieves the UNICODE character format flag for the control.
See also TB_SETUNICODEFORMAT
TB_HIDEBUTTON
wParam = (WPARAM) idButton;
lParam = (LPARAM) MAKELONG(fShow, 0);
Hides or shows the specified button in a toolbar.
TB_HITTEST
wParam = 0;
lParam = (LPARAM)(LPPOINT)pptHitTest;
Determines where a point lies in a toolbar control.
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.
TB_INDETERMINATE
wParam = (WPARAM) idButton;
lParam = (LPARAM) MAKELONG(fIndeterminate, 0);
Sets or clears the indeterminate state of the specified button in a toolbar.
TB_INSERTBUTTON
wParam = (WPARAM) iButton;
lParam = (LPARAM) (LPTBBUTTON) lpButton;
Inserts a button in a toolbar.
TB_INSERTMARKHITTEST
wParam = (WPARAM)(LPPOINT)lppt;
lParam = (LPARAM)(LPTBINSERTMARK)lptbim;
Retrieves the insertion mark information for a point in a toolbar.
Version 4.71
TB_ISBUTTONCHECKED
wParam = (WPARAM) idButton;
lParam = 0;
Determines whether the specified button in a toolbar is checked.
TB_ISBUTTONENABLED
wParam = (WPARAM) idButton;
lParam = 0;
Determines whether the specified button in a toolbar is enabled.
TB_ISBUTTONHIDDEN
wParam = (WPARAM) idButton;
lParam = 0;
Determines whether the specified button in a toolbar is hidden.
TB_ISBUTTONHIGHLIGHTED
wParam = (WPARAM) idButton;
lParam = 0;
Checks the highlight state of a toolbar button.
Version 4.71
TB_ISBUTTONINDETERMINATE
wParam = (WPARAM) idButton;
lParam = 0;
Determines whether the specified button in a toolbar is indeterminate.
TB_ISBUTTONPRESSED
wParam = (WPARAM) idButton;
lParam = 0;
Determines whether the specified button in a toolbar is pressed.
TB_LOADIMAGES
wParam = (WPARAM)(INT) iBitmapID;
lParam = (LPARAM)(HINSTANCE) hinst;
Loads bitmaps into a toolbar control's image list.
| Bitmap ID | Description |
| IDB_HIST_LARGE_COLOR | Explorer bitmaps in large size. |
| IDB_HIST_SMALL_COLOR | Explorer bitmaps in small size. |
| IDB_STD_LARGE_COLOR | Standard bitmaps in large size. |
| IDB_STD_SMALL_COLOR | Standard bitmaps in small size. |
| IDB_VIEW_LARGE_COLOR | View bitmaps in large size. |
| IDB_VIEW_SMALL_COLOR | View bitmaps in small size. |
If your application specifies HINST_COMMCTRL, then you must use the proper image index values when you prepare TBBUTTON structures prior to sending the TB_ADDBUTTONS message. For a list of image index values for these preset bitmaps, see Toolbar Standard Button Image Index Values.
Version 4.70
TB_MAPACCELERATOR
wParam = (WPARAM)(TCHAR) chAccel;
lParam = (LPARAM)(LPUINT) pIDBtn;
Maps an accelerator character to a toolbar button.
Version 4.71
TB_MARKBUTTON
wParam = (WPARAM) idButton;
lParam = (LPARAM) MAKELONG(fHighlight,0);
Sets the highlight state of a given button in a toolbar control.
Version 4.71
TB_MOVEBUTTON
wParam = (WPARAM)(UINT)uOldPos;
lParam = (LPARAM)(UINT)uNewPos;
Moves a button from one index to another.
Version 4.71
See also TB_SETANCHORHIGHLIGHT
TB_PRESSBUTTON
wParam = (WPARAM) idButton;
lParam = (LPARAM) MAKELONG(fPress, 0);
Presses or releases the specified button in a toolbar.
TB_REPLACEBITMAP
wParam = 0;
lParam = (LPARAM) (LPTBREPLACEBITMAP) ptbrb;
Replaces an existing bitmap with a new bitmap.
TB_SAVERESTORE
wParam = (WPARAM) (BOOL) fSave;
lParam = (LPARAM) (TBSAVEPARAMS *)ptbsp;
Saves or restores the state of the toolbar.
To save and restore a toolbar's settings using the TB_SAVERESTORE message, the parent window of the toolbar control must implement a handler for the TBN_GETBUTTONINFO notification message. The toolbar uses this notification to retrieve information about the buttons as they are read out of the registry.
TB_SETANCHORHIGHLIGHT
wParam = (WPARAM)(BOOL) fAnchor;
lParam = 0;
Sets the anchor highlight setting for a toolbar.
Anchor highlighting in a toolbar means that the last highlighted item will remain highlighted until another item is highlighted. This occurs even if the cursor leaves the toolbar control.
Version 4.71
TB_SETBITMAPSIZE
wParam = 0;
lParam = (LPARAM) MAKELONG(dxBitmap, dyBitmap)
Sets the size of the bitmapped images to be added to a toolbar.
The size can be set only before adding any bitmaps to the toolbar. If an application does not explicitly set the bitmap size, the size defaults to 16 by 15 pixels.
TB_SETBUTTONINFO
wParam = (WPARAM)(INT) iID;
lParam = (LPARAM)(LPTBBUTTONINFO) lptbbi;
Sets the information for an existing button in a toolbar.
Version 4.71
TB_SETBUTTONSIZE
wParam = 0;
lParam = (LPARAM) MAKELONG(dxButton, dyButton)
Sets the size of the buttons to be added to a toolbar.
The size can be set only before adding any buttons to the toolbar. If an application does not explicitly set the button size, the size defaults to 24 by 22 pixels.
TB_SETBUTTONWIDTH
wParam = 0;
lParam = (LPARAM)(DWORD) MAKELONG(cxMin,cxMax);
Sets the minimum and maximum button widths in the toolbar control.
Version 4.70
TB_SETCMDID
wParam = (WPARAM) (UINT) index;
lParam = (WPARAM) (UINT) cmdId;
Sets the command identifier of a toolbar button.
TB_SETCOLORSCHEME
wParam = 0;
lParam = (LPARAM)(LPCOLORSCHEME) lpcs;
Sets the color scheme information for the toolbar control.
The toolbar control uses the color scheme information when drawing the 3-D elements in the control.
Version 4.71
See also TB_GETCOLORSCHEME
TB_SETDISABLEDIMAGELIST
wParam = 0;
lParam = (LPARAM)(HIMAGELIST) himlNewDisabled;
Sets the image list that the toolbar control will use to display disabled buttons.
Version 4.70
TB_SETDRAWTEXTFLAGS
wParam = (WPARAM)(DWORD) dwMask;
lParam = (LPARAM)(DWORD) dwDTFlags;
Sets the text drawing flags for the toolbar.
The dwMask parameter allows you to specify which flags will be used when drawing the text, even if these flags are turned off. For example, if you don't want the DT_CENTER flag used when drawing text, you would add the DT_CENTER flag to dwMask and not specify the DT_CENTER flag in dwDTFlags. This prevents the control from passing the DT_CENTER flag to the DrawText API.
Version 4.71
TB_SETEXTENDEDSTYLE
wParam = 0;
lParam = (LPARAM)(DWORD)dwExStyle;
Sets the extended styles for a toolbar control.
Version 4.71
See also TB_GETEXTENDEDSTYLE
TB_SETHOTIMAGELIST
wParam = 0;
lParam = (LPARAM)(HIMAGELIST) himlNewHot;
Sets the image list that the toolbar control will use to display hot buttons. A button is hot when the pointer is above it. Toolbar controls that do not have the TBSTYLE_FLAT style do not have hot items.
Version 4.70.
TB_SETHOTITEM
wParam = (WPARAM)(INT)iHot;
lParam = 0;
Sets the hot item in a toolbar. This message is ignored for toolbar controls that do not have the TBSTYLE_FLAT style.
Version 4.71
TB_SETIMAGELIST
wParam = 0;
lParam = (LPARAM)(HIMAGELIST) himlNew;
Sets the image list that the toolbar will use to display buttons that are in their default state.
A toolbar control uses himlNew to display buttons in their default state, which is when they are not hot or disabled.
Version 4.70
TB_SETINDENT
wParam = (WPARAM)(INT) iIndent;
lParam = 0;
Sets the indentation for the first button in a toolbar control.
Version 4.70
TB_SETINSERTMARK
wParam = 0;
lParam = (LPARAM)(LPTBINSERTMARK)lptbim;
Sets the current insertion mark for the toolbar.
Version 4.71
See also TB_GETINSERTMARK
TB_SETINSERTMARKCOLOR
wParam = 0;
lParam = (LPARAM)(COLORREF)clrInsertMark;
Sets the color used to draw the insertion mark for the toolbar.
Version 4.71
See also TB_GETINSERTMARKCOLOR
TB_SETMAXTEXTROWS
wParam = (WPARAM)(INT) iMaxRows;
lParam = 0;
Sets the maximum number of text rows displayed on a toolbar button.
Version 4.70
TB_SETPADDING
wParam = 0;
lParam = MAKELPARAM(cx, cy);
Sets the padding for a toolbar control.
The padding values are used to create a blank area between the edge of the button and the button's image and/or text. The horizontal padding value is applied to both the right and left of the button, and the vertical padding value is applied to both the top and bottom of the button. Padding is only applied to buttons that have the TBSTYLE_AUTOSIZE style.
Version 4.71
See also TB_GETPADDING
TB_SETPARENT
wParam = (WPARAM) (HWND) hwndParent;
lParam = 0;
Sets the window to which the toolbar control sends notification messages.
The TB_SETPARENT message does not change the parent window that was specified when the control was created. Calling the GetParent function for a toolbar control will return the actual parent window, not the window specified in TB_SETPARENT. To change the control's parent window, call the SetParent function.
TB_SETROWS
wParam = (WPARAM) MAKEWPARAM(cRows, fLarger);
lParam = (LPARAM) (LPRECT) lprc;
Sets the number of rows of buttons in a toolbar.
Because the system does not break up button groups when setting the number of rows, the resulting number of rows might differ from the number requested.
TB_SETSTATE
wParam = (WPARAM) idButton;
lParam = (LPARAM) MAKELONG(fState, 0);
Sets the state for the specified button in a toolbar.
TB_SETSTYLE
wParam = 0;
lParam = (LPARAM)(DWORD) dwStyle;
Sets the style for a toolbar control.
Version 4.70
TB_SETTOOLTIPS
wParam = (WPARAM) (HWND) hwndToolTip;
lParam = 0;
Associates a tooltip control with a toolbar.
Any buttons added to a toolbar before sending the TB_SETTOOLTIPS message will not be registered with the tooltip control.
TB_SETUNICODEFORMAT
wParam = (WPARAM)(BOOL)fUnicode;
lParam = 0;
Sets the UNICODE character format flag for the control. This message allows you to change the character set used by the control at run time rather than having to re-create the control.
See also TB_GETUNICODEFORMAT
This section contains information about the notification messages sent by toolbar controls.
NM_CHAR
lpnmc = (LPNMCHAR) lParam;
Sent by the toolbar when a character key is processed. This notification message is sent in the form of a WM_NOTIFY message.
Version 4.71
NM_CUSTOMDRAW
lpNMCustomDraw = (LPNMTBCUSTOMDRAW) lParam;
Sent by the toolbar to notify its parent window about drawing operations. This notification is sent in the form of a WM_NOTIFY message.
When dwDrawStage equals CDDS_PREPAINT:
|
When dwDrawStage equals CDDS_ITEMPREPAINT:
|
Version 4.71. Address of an NMTBCUSTOMDRAW structure that contains information about the drawing operation.
Version 4.70
See also Using Custom Draw
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.