首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

vc2010里ProcessShellCommand二个棘手有关问题 请大家赐教

2013-01-18 
vc2010里ProcessShellCommand二个棘手问题 请大家赐教本帖最后由 litieying 于 2012-11-26 22:11:51 编辑

vc2010里ProcessShellCommand二个棘手问题 请大家赐教
本帖最后由 litieying 于 2012-11-26 22:11:51 编辑 在vc2010里写:
问题一:


CCommandLineInfo cmdInfo; 
cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing; 
ParseCommandLine(cmdInfo); 
if (!ProcessShellCommand(cmdInfo)) 
   return FALSE;

调试中执行到 if (!ProcessShellCommand(cmdInfo)) 时,弹出消息框“.....在mfc100d.dll中存在未经处理的异常....” 然后自动跳到文件winocc.cpp里的

BOOL CWnd::ShowWindow(int nCmdShow)
{
ASSERT(::IsWindow(m_hWnd) || (m_pCtrlSite != NULL));//在这!!!

if (m_pCtrlSite == NULL)
return ::ShowWindow(m_hWnd, nCmdShow);
else
return m_pCtrlSite->ShowWindow(nCmdShow);
}
我应该如何处理 谢谢赐教 我是新手

问题二:
如何写成

CCommandLineInfo cmdInfo; 
ParseCommandLine(cmdInfo); 
    if (!ProcessShellCommand(cmdInfo)) 
return FALSE;
就会弹出“创建空文档失败”消息框,然后程序自动退出了 
[解决办法]
你的文档,框架等是否初始化成功。

热点排行