[求助]打开指定文件后,对话框没有紧接着出现?
<div>请教各位大侠,我想打开一个模板文件test.dwg后,紧接着弹出对话框(代码如下),而实际运行结果:</div><div>test.dwg文件能正常打开,可对话框没有紧接出现,只有关闭test.dwg文件后,对话框才出现。请赐教。</div><div><br/></div><div>void OpenDwg( void *pData)</div><div>{</div><div> AcApDocument* pDoc = acDocManager->curDocument();</div><div> if (acDocManager->isApplicationContext()) </div><div> acDocManager->appContextOpenDocument((const TCHAR *)pData);</div><div> else</div><div> acutPrintf(L"\nUNABLE TO FIND TEST.DWG!\n");</div><div>}</div><div><br/></div><div>void OpenTemplate()</div><div>{</div><div> // 直接打开系统中存在的某个图形文件</div><div>static TCHAR pData[] = _T("c:\\test.dwg");</div><div>acDocManager->executeInApplicationContext(OpenDwg, (void *)pData);</div><div>}</div><div><br/></div><div><br/></div><div>void dialogCreate()</div><div>{</div><div>OpenTemplate();打开模板文件test.dwg</div><div><br/></div><div>CAcModuleResourceOverride resOverride;</div><div>// Create the dialog</div><div>AsdkAcUiDialogSample *pDlg = new AsdkAcUiDialogSample();</div><div>pDlg->DoModal(); </div><div>pDlg->DestroyWindow();</div><div>delete pDlg;</div><div>}</div>
页:
[1]