求助高手!
程序中我有2个对话框,分别设置2个机构(parallel和aclinic)的参数.当输入命令行输入parallel要调用parallel所对应的对话框!输入aclinic调用aclinic)所对应的对话框!我写的程序调不出来!请教高手指点一下!<BR> CAcModuleResourceOverride resOverride;<BR> char type;<BR> int retCode;<BR> retCode = acedGetString(1, "\nTo choose frame type:", type);<BR> if(retCode = !RTNORM || type == '\0')<BR> {<BR> acutPrintf("\nInvalid type name.");<BR> return;<BR> }<BR> if(type == "parallel")<BR> { <BR> CWindoParaDlg dlg(CWnd::FromHandle(adsw_acadMainWnd()));<BR> .............................................<BR> ..............................................<BR> }<BR> else if(type == "aclinic")<BR> { <BR> CWindoAclDlg dlg(CWnd::FromHandle(adsw_acadMainWnd()));<BR> ...............................................<BR> .................................................<BR> } <P>CWindoParaDlg dlg(CWnd::FromHandle(adsw_acadMainWnd()));//这一句后面要加上下面这一句</P><P>dlg.DoModal();</P> <P>加了dlg.Modal()还是不行!执行的时候出现异常内部错误!请高手再指点一下 </P> <P>type == "parallel"</P>
<P>改为</P>
<P>strcpy(type,"parallel")</P>
<P>type == "aclinic"</P>
<P>改为</P>
<P>strcpy(type,"aclinic")</P>
<P> </P>
<P>就可以了 </P> <P>不应该用strcpy()函数,而应该用strcmp()函数</P>
<P>判断而不是拷贝</P> <P>CAcModuleResourceOverride resOverride;<BR> char type;<BR> int retCode;<BR> retCode = acedGetString(1, "\nTo choose frame type:", type);<BR> if(retCode = !RTNORM || type == '\0'){<BR> acutPrintf("\nInvalid type name.");<BR> return;<BR> }<BR> if(strcmp(type,"parallel")==0){ <BR> CWindoParaDlg dlg(CWnd::FromHandle(adsw_acadMainWnd()));<BR> dlg.DoModal();</P>
<P>.....<BR> }<BR> else if(strcmp(type,"aclinic")==0){<BR> CWindoAclDlg dlg(CWnd::FromHandle(adsw_acadMainWnd()));<BR> dlg.DoModal();</P>
<P>......<BR> }</P> 谢谢大家了!问题解决了! <P>:)</P>
<P>搞错了</P>
页:
[1]