Extra System Menu Appearing



I'm attempting to change the menu on a CMDIFrameWnd derived class when the
program enters certain states...

m_system_menu.LoadMenu(IDR_SYSTEM);
SetMenu(&m_system_menu);
DrawMenuBar();

There are 3 different states and this is all using the same document, the
menu change occurs fine.

But when I change to a different document an additional system menu icon and
a set of min, max, and close buttons is added. Each time I switch to a
document that causes the SetMenu to be called and switch back an additional
set of icons is added. The far left system menu continues to work properly,
clicking on any of the others results in an exception. All the min, max,
close buttons function normally.

Any help will be appreciated.

Db


.