Customizing toolbar
-
I am trying to make a toolbar with rearrangable buttons. After not being able to figure this out, I've settled for trying to allow my toolbar to be customized, which does drag/drop automatically. According to MSDN docs, the customize dialog sends the messages TBN_QUERYDELETE and TBN_QUERYINSERT, and expects booleans returned. If those are WM_NOTIFY messages, then I only know how to handle them with afx_msg void functions. Any help with this would be appreciated, including anything about dragging toolbar buttons :(( thanks a lot, Jake
-
I am trying to make a toolbar with rearrangable buttons. After not being able to figure this out, I've settled for trying to allow my toolbar to be customized, which does drag/drop automatically. According to MSDN docs, the customize dialog sends the messages TBN_QUERYDELETE and TBN_QUERYINSERT, and expects booleans returned. If those are WM_NOTIFY messages, then I only know how to handle them with afx_msg void functions. Any help with this would be appreciated, including anything about dragging toolbar buttons :(( thanks a lot, Jake
Store the return value in the handler's *pResult parameter. --Mike-- http://home.inreach.com/mdunn/ "Make sure that if you are using a blow torch that you don't set anything on fire." -- Chris Maunder
-
I am trying to make a toolbar with rearrangable buttons. After not being able to figure this out, I've settled for trying to allow my toolbar to be customized, which does drag/drop automatically. According to MSDN docs, the customize dialog sends the messages TBN_QUERYDELETE and TBN_QUERYINSERT, and expects booleans returned. If those are WM_NOTIFY messages, then I only know how to handle them with afx_msg void functions. Any help with this would be appreciated, including anything about dragging toolbar buttons :(( thanks a lot, Jake
My main problem here is that when the Customize dialog begins to show, it disappears again. It's there for less than a second, and my functions to handle the query delete and insert never get called. In the message map: ON_NOTIFY(TBN_QUERYDELETE, IDR_TOOLBAR1, OnQueryDelete) ON_NOTIFY(TBN_QUERYINSERT, IDR_TOOLBAR1, OnQueryInsert) In the header file: afx_msg void OnQueryDelete(TBNOTIFY *tbn, LRESULT *result); afx_msg void OnQueryInsert(TBNOTIFY *tbn, LRESULT *result); Why is the dialog vanishing without ever calling these functions? :confused: thanks, Jake