
NM_KEYDOWN
lpnmk = (LPNMKEY) lParam;
Sent by a control when the control has the keyboard focus and the user presses a key. This notification message is sent in the form of a WM_NOTIFY message.
Currently, only the toolbar control sends this notification.
Version 4.71
NM_RCLICK
lpnmmouse = (LPNMMOUSE) lParam;
Sent by a toolbar control when the user clicks on the toolbar with the right mouse button. This notification message is sent in the form of a WM_NOTIFY message.
This notification is identical to the standard NM_RCLICK notification except that the toolbar supplies an NMMOUSE structure instead of an NMHDR structure for the lParam.
Version 4.71. Prior versions send a standard NM_RCLICK message.
NM_RDBLCLK
lpnmh = (LPNMHDR) lParam;
Notifies a control's parent window that the user has double-clicked the right mouse button within the control. NM_RDBLCLK is sent in the form of a WM_NOTIFY message.
NM_RELEASEDCAPTURE
lpnmh = (LPNMHDR) lParam;
Notifies a toolbar control's parent window that the control is releasing mouse capture. This notification is sent in the form of a WM_NOTIFY message.
Version 4.71.
TBN_BEGINADJUST
lpnmhdr = (LPNMHDR) lParam;
Notifies a toolbar's parent window that the user has begun customizing a toolbar. This message is sent in the form of a WM_NOTIFY message.
TBN_BEGINDRAG
lpnmtb = (LPNMTOOLBAR) lParam;
Notifies a toolbar's parent window that the user has begun dragging a button in a toolbar. This message is sent in the form of a WM_NOTIFY message.
TBN_CUSTHELP
lpnmhdr = (LPNMHDR) lParam;
Notifies a toolbar's parent window that the user has chosen the Help button in the Customize Toolbar dialog box. This message is sent in the form of a WM_NOTIFY message.
TBN_DELETINGBUTTON
lpnmtb = (LPNMTOOLBAR) lParam;
Sent by a toolbar control when a button is about to be deleted.
Version 4.71
TBN_DRAGOUT
lpnmtb = (LPNMTOOLBAR) lParam;
Sent by a toolbar control when the user clicks a button and then moves the cursor off the button. This notification message is sent in the form of a WM_NOTIFY message.
This notification allows an application to implement drag-and-drop functionality for toolbar buttons. When processing this notification, the application will begin the drag-and-drop operation.
Version 4.71
TBN_DROPDOWN
lpnmtb = (LPNMTOOLBAR) lParam;
Sent by a toolbar control when the user clicks a button that uses the TBSTYLE_DROPDOWN style. This notification message is sent in the form of a WM_NOTIFY message.
| TBDDRET_DEFAULT | The drop-down was handled. |
| TBDDRET_NODEFAULT | The drop-down was not handled. |
| TBDDRET_TREATPRESSED | The drop-down was handled, but treat the button like a regular button. |
In version 4.71 and greater, this notification is only sent when the user clicks on the drop-down arrow portion of the button. In previous versions, this notification is sent when the user clicks on any portion of the button.
Version 4.70
TBN_ENDADJUST
lpnmhdr = (LPNMHDR) lParam;
Notifies a toolbar's parent window that the user has stopped customizing a toolbar. This message is sent in the form of a WM_NOTIFY message.
TBN_ENDDRAG
lpnmtb = (LPNMTOOLBAR) lParam;
Notifies the toolbar's parent window that the user has stopped dragging a button in a toolbar. This message is sent in the form of a WM_NOTIFY message.
TBN_GETBUTTONINFO
lpnmtb = (LPNMTOOLBAR) lParam;
Retrieves toolbar customization information and notifies the toolbar's parent window of any changes being made to the toolbar. This is sent in the form of a WM_NOTIFY message.
The pszText member specifies the address of the current button text, and cchText specifies its length in characters. The application should fill the structure with information about the button.
The toolbar control allocates a buffer, and the receiver (parent window) must copy the text into that buffer. The cchText member contains the length of the buffer allocated by the toolbar when TBN_GETBUTTONINFO is sent to the parent window.
TBN_GETBUTTONINFO
lptbdi = (LPNMTBDISPINFO) lParam;
Retrieves display information for a toolbar item. This notification is sent in the form of a WM_NOTIFY message.
TBN_GETOBJECT
lpnmon = (LPNMOBJECTNOTIFY) lParam;
Sent by a toolbar control that uses the TBSTYLE_REGISTERDROP style to request a drop target object when the pointer passes over one of its buttons.
To provide an object, an application must set values in some members of the NMOBJECTNOTIFY structure at lpnmon. The pObject member must be set to a valid object pointer, and the hResult member must be set to a success flag. To comply with Component Object Model (COM) standards, always increment the object's reference count when providing an object pointer.
If an application does not provide an object, it must set pObject to NULL and hResult to a failure flag.
Version 4.71
TBN_HOTITEMCHANGE
lpnmhi = (LPNMTBHOTITEM) lParam;
Sent by a toolbar control when the hot (highlighted) item changes. This notification message is sent in the form of a WM_NOTIFY message.
Version 4.71
TBN_QUERYDELETE
lpnmtb = (LPNMTOOLBAR) lParam;
Notifies the toolbar's parent window whether a button may be deleted from a toolbar while the user is customizing the toolbar. This message is sent in the form of a WM_NOTIFY message.
TBN_QUERYINSERT
lpnmtb = (LPNMTOOLBAR) lParam;
Notifies the toolbar's parent window whether a button may be inserted to the left of the specified button while the user is customizing a toolbar. This message is sent in the form of a WM_NOTIFY message.
TBN_RESET
lpnmhdr = (LPNMHDR) lParam;
Notifies the toolbar's parent window that the user has reset the content of the Customize Toolbar dialog box. This message is sent in the form of a WM_NOTIFY message.
TBN_TOOLBARCHANGE
lpnmhdr = (LPNMHDR) lParam;
Notifies the toolbar's parent window that the user has customized a toolbar. This message is sent in the form of a WM_NOTIFY message.
This section contains information about the structures used with toolbar controls.
typedef struct _COLORMAP {
COLORREF from;
COLORREF to;
} COLORMAP, FAR* LPCOLORMAP;
Contains information used by the CreateMappedBitmap function to map the colors of the bitmap.
typedef struct _NMTBCUSTOMDRAW {
NMCUSTOMDRAW nmcd;
HBRUSH hbrMonoDither;
HBRUSH hbrLines;
HPEN hpenLines;
COLORREF clrText;
COLORREF clrMark;
COLORREF clrTextHighlight;
COLORREF clrBtnFace;
COLORREF clrBtnHighlight;
COLORREF clrHighlightHotTrack;
RECT rcText;
int nStringBkMode;
int nHLStringBkMode;
} NMTBCUSTOMDRAW, * LPNMTBCUSTOMDRAW;
Contains information specific to an NM_CUSTOMDRAW notification message sent by a toolbar control.
Version 4.71
typedef struct{
NMHDR hdr;
DWORD dwMask;
int idCommand;
DWORD lParam;
int iImage;
LPTSTR pszText;
int cchText;
} NMTBDISPINFO, *LPNMTBDISPINFO;
Contains and receives display information for a toolbar item. This structure is used with the TBN_GETDISPINFO notification.
| TBNF_IMAGE | The item's image index is being requested. The image index must be placed in the iImage member. |
| TBNF_TEXT | Not currently implemented. The item's text is being requested. The text must be copied to the buffer pointed to by the pszText member. |
The receiving application can add the TBNF_DI_SETITEM flag to this member, in which case the control will store the display information and not request it again.
Version 4.71
typedef struct tagNMTBHOTITEM {
NMHDR hdr;
int idOld;
int idNew;
DWORD dwFlags;
} NMTBHOTITEM, FAR* LPNMTBHOTITEM;
Contains information used with the TBN_HOTITEMCHANGE notification.
| HICF_ACCELERATOR | The change in the hot item resulted from an accelerator. |
| HICF_ARROWKEYS | The change in the hot item resulted from an arrow key. |
| HICF_DUPACCEL | Modifies HICF_ACCELERATOR. If this flag is set, more than one item has the same accelerator character. |
| HICF_ENTERING | Modifies the other reason flags. If this flag is set, there is no previous hot item and idOld does not contain valid information. |
| HICF_LEAVING | Modifies the other reason flags. If this flag is set, there is no new hot item and idNew does not contain valid information. |
| HICF_MOUSE | The change in the hot item resulted from a mouse event. |
| HICF_OTHER | The change in the hot item resulted from an event that could not be determined. This will most often be due to a change in focus or the TB_SETHOTITEM message. |
| HICF_RESELECT | The change in the hot item resulted from the user entering the accelerator for an item that was already hot. |
Version 4.71
typedef struct tagNMTOOLBAR {
NMHDR hdr;
int iItem;
TBBUTTON tbButton;
int cchText;
LPTSTR pszText;
} NMTOOLBAR, FAR* LPNMTOOLBAR;
Contains information used to process toolbar notification messages. This structure supersedes the TBNOTIFY structure.
Version 4.70
typedef struct {
HINSTANCE hInst;
UINT nID;
} TBADDBITMAP, *LPTBADDBITMAP;
Adds a bitmap that contains button images to a toolbar.
| IDB_STD_LARGE_COLOR | Adds large, color standard bitmaps. |
| IDB_STD_SMALL_COLOR | Adds small, color standard bitmaps. |
| IDB_VIEW_LARGE_COLOR | Adds large, color view bitmaps. |
| IDB_VIEW_SMALL_COLOR | Adds small, color view bitmaps. |
The Windows header files provide the following values to be used as indexes to the standard and view bitmaps.
| STD_COPY | Specifies the copy image. |
| STD_CUT | Specifies the cut image. |
| STD_DELETE | Specifies the delete image. |
| STD_FILENEW | Specifies the new file image. |
| STD_FILEOPEN | Specifies the open file image. |
| STD_FILESAVE | Specifies the save file image. |
| STD_FIND | Specifies the find image. |
| STD_HELP | Specifies the help image. |
| STD_PASTE | Specifies the paste image. |
| STD_PRINT | Specifies the print image. |
| STD_PRINTPRE | Specifies the print preview image. |
| STD_PROPERTIES | Specifies the properties image. |
| STD_REDOW | Specifies the redo image. |
| STD_REPLACE | Specifies the replace image. |
| STD_UNDO | Specifies the undo image. |
| VIEW_DETAILS | Specifies the view details image. |
| VIEW_LARGEICONS | Specifies the view large icons image. |
| VIEW_LIST | Specifies the view list image. |
| VIEW_SMALLICONS | Specifies the view small icons image. |
| VIEW_SORTDATE | Specifies the sort by date image. |
| VIEW_SORTNAME | Specifies the sort by name image. |
| VIEW_SORTSIZE | Specifies the sort by size image. |
| VIEW_SORTTYPE | Specifies the sort by type image. |
The TBADDBITMAP structure is used with the TB_ADDBITMAP message.
typedef struct _TBBUTTON {
int iBitmap;
int idCommand;
BYTE fsState;
BYTE fsStyle;
DWORD dwData;
int iString;
} TBBUTTON, NEAR* PTBBUTTON, FAR* LPTBBUTTON;
Contains information about a button in a toolbar.
typedef struct {
UINT cbSize;
DWORD dwMask;
int idCommand;
int iImage;
BYTE fsState;
BYTE fsStyle;
WORD cx;
DWORD lParam;
LPTSTR pszText;
int cchText;
} TBBUTTONINFOA, *LPTBBUTTONINFOA;
Contains or receives information for a specific button in a toolbar.
| TBIF_COMMAND | The idCommand member contains valid information or is being requested. |
| TBIF_IMAGE | The iImage member contains valid information or is being requested. |
| TBIF_LPARAM | The lParam member contains valid information or is being requested. |
| TBIF_SIZE | The cx member contains valid information or is being requested. |
| TBIF_STATE | The fsState member contains valid information or is being requested. |
| TBIF_STYLE | The fsStyle member contains valid information or is being requested. |
| TBIF_TEXT | The pszText member contains valid information or is being requested. |
Version 4.71
typedef struct {
int iButton;
DWORD dwFlags;
} TBINSERTMARK, * LPTBINSERTMARK;
Contains information on the insertion mark in a toolbar control.
| 0 | The insertion mark is to the left of the specified button. |
| TBIMHT_AFTER | The insertion mark is to the right of the specified button. |
| TBIMHT_BACKGROUND | The insertion mark is on the background of the toolbar. This flag is only used with the TB_INSERTMARKHITTEST message. |
typedef struct {
HINSTANCE hInstOld;
UINT nIDOld;
HINSTANCE hInstNew;
UINT nIDNew;
int nButtons;
} TBREPLACEBITMAP, *LPTBREPLACEBITMAP;
Used with the TB_REPLACEBITMAP message to replace one toolbar bitmap with another.
typedef struct {
HKEY hkr;
LPCTSTR pszSubKey;
LPCTSTR pszValueName;
} TBSAVEPARAMS;
Specifies the location in the registry where the TB_SAVERESTORE message stores and retrieves information about the state of a toolbar.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.