In our application I tried to centralize all icon handling. Instead of adding icons to each toolbar and menu like this:
button = new CMFCToolBarButton( commandId, imageIndex );
I added a central instace that tied each commandId to an icon, and the icons appear at the right places in the menus and toolbars.
button = new CMFCToolBarButton( commandId, NULL, NULL, TRUE, FALSE );
GetCmdMgr()->SetCmdImage( commandId, imageIndex, false );
My problem is that the toolbars are customizable, and if the user uses the customize function (the little down arrow on the toolbar) and selects
Reset toolbar, all icons will be replaced by the NULL icon (the first registered with the SetCmdImage-command).
Can I somehow change the behaviour of the Reset toolbar-command, or change the registration of the icons so that they are considered default when resetting?
Regards,
Robert M