cad新学生 发表于 2009-11-20 18:31:00

[求助]executeInApplicationContext为什么报错

<p>void CCreateEnity::CreateDoc(void *pData) <br/>{ </p><p><br/>&nbsp;AcApDocument* pDoc = acDocManager-&gt;curDocument(); <br/>&nbsp;if (acDocManager-&gt;isApplicationContext())<br/>&nbsp;{ <br/>&nbsp;&nbsp;acDocManager-&gt;appContextNewDocument((const ACHAR *)pData); <br/>&nbsp;} <br/>&nbsp;else <br/>&nbsp;&nbsp;acutPrintf(L"\nERROR To Create Doc!\n"); <br/>}</p><p><font color="#e61a1a">static ACHAR pData[] =L"acad.dwt";&nbsp;<br/>&nbsp;acDocManager-&gt;executeInApplicationContext(CreateDoc,(void *)pData);</font>
        </p><p>为甚麽执行会出错?</p><p>error C3867: 'CCreateEnity::CreateDoc': function call missing argument list; use '&amp;CCreateEnity::CreateDoc' to create a pointer to member</p><p>网上例子很多?错在哪了?</p><p>各位大侠帮帮忙?快疯掉了~</p><p></p>

cad新学生 发表于 2009-11-20 19:03:00

我发现,如果把CreateDoc(void *pData)函数放到全局函数执行不会报错,为甚麽在添加的类就编译不了呢?
页: [1]
查看完整版本: [求助]executeInApplicationContext为什么报错