(Not really an urgent problem to fix).
I'm using a CMFToolbar with some custom buttons in them (edit box).
In the handler of AFX_WM_RESETTOOLBAR, I create and replace the toolbar button with a CMFCToolBarEditBoxButton .
LRESULT CMainFrame::OnToolbarReset(WPARAM wp,LPARAM)
UINT uiToolBarId = (UINT) wp;
if ( uiToolBarId == ID_MY_TOOLBAR)
This works, and will create an edit box with a width of 75 in the toolbar.
This also works for other kind of controls in the toolbar.
But now, if I want to increase the width of the editbox to 100 (for example), I will change the code to
This will not automatically be reflected when the program is executed because the actual size is stored in the registry.
User either have to scrap the registry entry or go in the customize dialog and rest the toolbar.
Is there a clean built-in way to have the toolbar marked as "dirty" so that its settings will not be loaded from the registry (once) ?
I can think of many ways to hack that into place, but I feel it will cause more harm than necessary.