By default, MFC Feature Pack application automatically saves the state of menus and toolbars to the registry when application exits, and loads them at startup. The
job is done by the SaveState() and LoadState() functions of CWinAppEx. To stop this behavior, we can either override these two methods in our “CXXXApp” class, or set the CWinAppEx::m_bSaveState to FALSE in the constructor of the “CXXXApp”
class that derives from CWinAppEx.