【发布时间】:2011-05-06 01:16:08
【问题描述】:
我有一个 MFC MDI 应用程序,当我运行它时,它会烦人地加载工具栏等的先前状态。我已经设置了
m_bSaveState = FALSE;
在 App 构造函数中......但它没有效果。所以我试图重载 LoadState() 方法,如下所示:
// added this to the MainApp.h file
virtual BOOL LoadState(CWnd* pFrame, LPCTSTR lpszSectionName = NULL );
和...
// added the following to the MainApp.cpp
BOOL CDrumGenMDIApp::LoadState (CWnd* pFrame, LPCTSTR lpszSectionName )
{
// do nothing to pre-load the state from the Registry
return TRUE;
}
...但是这个方法似乎永远不会被调用。当系统正在加载 Frames 时,我很确定它正在调用 LoadState() 的一些配置文件……但是如何让它调用我的重载方法?
谢谢
【问题讨论】: