tags:

views:

34

answers:

0

My application is MFC, MDI, and in Visual Studio 2008. It has three menu bars: one to start up with, one associated with document type A, and one associated with document type B.

Recently, we've been getting menu bar A showing up some of the times instead of the mainframe menu bar when we start without a document (such as double-clicking on the app shortcut, which links to the shared drive the app is on). It's happening apparently randomly, maybe 10-30% of the time, with no apparent difference in how it's started up. So far, I haven't gotten it to happen when running the debug version from VS in debug mode, although I got it once running the release version from VS.

So, what's going on here? Does anybody know how this could possibly be happening?

Edit: We set up the connections by adding CMultiDocTemplates with AddDocTemplate(). If it makes any difference, the menu bar that comes up improperly is the first of those. The menu bar normally comes up through the CMultiDocTemplate member function.