The TBN_QUERYDELETE notification message notifies the toolbar’s parent window whether a button may be deleted from a toolbar while the user is customizing a toolbar. This message is sent in the form of a WM_NOTIFY message.
TBN_QUERYDELETE ptbn = (TBNOTIFY FAR *) lParam;
Returns TRUE to allow the button to be deleted or FALSE to prevent the button from being deleted.