在child函数里加一个BOOL m_bFirstOpen;在childframe的构造函数里使其为true;
重载OnFileNew函数
if(m_bFirstOpen)
{
m_bFirstOpen=FALSE;
return true;
}
重载OnFileNew函数
if(m_bFirstOpen)
{
m_bFirstOpen=FALSE;
return true;
}
解决方案 »
- 请教如何获得按钮点击时对应的按钮ID?
- 程序中如何实现:将dll中的数据段拷贝到一个数组中保存
- 输入法编程
- 问一个很弱的问题:EXE文件是否可以暴露其对外接口?
- 请问如何给treeview添加树枝和删除树枝?
- 谁有C++的读写XML的类呀,能不能给一个好用的![email protected]
- 堆栈的问题
- 程序员是吃青春饭的吗?(“中国的程序员是30岁以下,外国的是30岁以上!”)
- MFC中添加变量的位置
- 程序员考试的报名时间是什么时候?报名费是多少?北京得到哪里?问~~~~~~~~~~
- 为什么我发到应用程序的字符串都是乱码?
- 如何在COM中打开ACCESS数据库,用非DSN方式??????????
// Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
在它后面加入:
if(cmdInfo.m_nShellCommand == CCommandLineInfo::FileNew){
cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing;
}
就行了,来自《vc++内幕》
在:YourApp类的InitInstance函数中ParseCommandLine(cmdInfo)语句之后加入以下代码:
if(cmdInfo.m_nShellCommand==CCommandLineInfo::FileNew)
{
cmdInfo.m_nShellCommand=CCommandLineInfo:;FileNothing;
}
如果还不行, mailto:[email protected]
//if (!ProcessShellCommand(cmdInfo))
// return FALSE; if(cmdInfo.m_nShellCommand == CCommandLineInfo::FileNew)
{
cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing;
}