Does anyone know the best strategy for updating the enabled/disabled state of toolbar buttons?
Say you have an application with edit controls and a toolbar with Copy, Cut, Paste and Undo buttons. The same commands appear on the Edit/Context menus. Updating the menu items is easy because you do it when processing %WM_INITMENU. You simple check for any text selection, any text in clipboard, check the undo buffer, and then enable/disable the menu items appropriately. The problem with updating the toolbar buttons is that their state must be updated immediately there are changes to the selection/clipboard/undo buffer. Are there a set of notification messages than can be intercepted, for instance?
Thanks, Keith
------------------
Say you have an application with edit controls and a toolbar with Copy, Cut, Paste and Undo buttons. The same commands appear on the Edit/Context menus. Updating the menu items is easy because you do it when processing %WM_INITMENU. You simple check for any text selection, any text in clipboard, check the undo buffer, and then enable/disable the menu items appropriately. The problem with updating the toolbar buttons is that their state must be updated immediately there are changes to the selection/clipboard/undo buffer. Are there a set of notification messages than can be intercepted, for instance?
Thanks, Keith
------------------
Comment