robinsom 发表于 2004-5-27 14:27:00

[ARX] 请大侠帮忙,下面的2处错误什么意思

// WindoInfoDlg.cpp : implementation file<BR>//<BR><BR><BR>#include "StdArx.h"<BR>#include "resource.h"<BR>#include "WindoInfoDlg.h"<BR><BR>#ifdef _DEBUG<BR>#define new DEBUG_NEW<BR>#undef THIS_FILE<BR>static char THIS_FILE[] = __FILE__;<BR>#endif<BR><BR>HTREEITEM htCur, htPrev;<BR><BR>/////////////////////////////////////////////////////////////////////////////<BR>// CWindoInfoDlg dialog<BR><BR><BR>CWindoInfoDlg::CWindoInfoDlg(CWnd* pParent /*=NULL*/)<BR>: CAdUiDialog(CWindoInfoDlg::IDD, pParent)<BR>{<BR>//{{AFX_DATA_INIT(CWindoInfoDlg)<BR>// NOTE: the ClassWizard will add member initialization here<BR>//}}AFX_DATA_INIT<BR>}<BR><BR><BR>void CWindoInfoDlg::DoDataExchange(CDataExchange* pDX)<BR>{<BR>CDialog::DoDataExchange(pDX);<BR>//{{AFX_DATA_MAP(CWindoInfoDlg)<BR>// NOTE: the ClassWizard will add DDX and DDV calls here<BR>//}}AFX_DATA_MAP<BR>}<BR><BR><BR>BEGIN_MESSAGE_MAP(CWindoInfoDlg, CDialog)<BR>//{{AFX_MSG_MAP(CWindoInfoDlg)<BR>// NOTE: the ClassWizard will add message map macros here<BR>//}}AFX_MSG_MAP<BR>END_MESSAGE_MAP()<BR><BR>/////////////////////////////////////////////////////////////////////////////<BR>// CWindoInfoDlg message handlers<BR>BOOL CWindoInfoDlg::OnInitDialog() <BR>{<BR>CDialog::OnInitDialog();<BR><BR>m_pTreeCtrl = (CTreeCtrl*)GetDlgItem(IDC_TREE1);<BR><BR>m_imgList.Create(16, 15, FALSE, 9, 3);<BR><BR>CBitmap* pBitmap = new CBitmap;<BR>pBitmap-&gt;LoadBitmap(IDB_WINDOW);<BR>m_nIdxWindow = m_imgList.Add(pBitmap, RGB(0, 0, 0));<BR>pBitmap-&gt;LoadBitmap(IDB_RECT);<BR>m_nIdxRect = m_imgList.Add(pBitmap, RGB(0, 0, 0));<BR>pBitmap-&gt;LoadBitmap(IDB_ARCH);<BR>m_nIdxArch = m_imgList.Add(pBitmap, RGB(0, 0, 0));<BR>pBitmap-&gt;LoadBitmap(IDB_APEX);<BR>m_nIdxApex = m_imgList.Add(pBitmap, RGB(0, 0, 0));<BR>pBitmap-&gt;LoadBitmap(IDB_WIDTH);<BR>m_nIdxWidth = m_imgList.Add(pBitmap, RGB(0, 0, 0));<BR>pBitmap-&gt;LoadBitmap(IDB_HEIGHT);<BR>m_nIdxHeight = m_imgList.Add(pBitmap, RGB(0, 0, 0));<BR>pBitmap-&gt;LoadBitmap(IDB_ROWS);<BR>m_nIdxRows = m_imgList.Add(pBitmap, RGB(0, 0, 0));<BR>pBitmap-&gt;LoadBitmap(IDB_COLS);<BR>m_nIdxCols = m_imgList.Add(pBitmap, RGB(0, 0, 0));<BR>pBitmap-&gt;LoadBitmap(IDB_STARTPT);<BR>m_nIdxStartPt = m_imgList.Add(pBitmap, RGB(0, 0, 0));<BR>m_pTreeCtrl-&gt;SetImageList(&amp;m_imgList, TVSIL_NORMAL);<BR>delete pBitmap;<BR><BR>AddTreeViewItems();<BR><BR>HTREEITEM hRoot = m_pTreeCtrl-&gt;GetRootItem();<BR><BR>m_pTreeCtrl-&gt;Expand(hRoot, TVE_EXPAND);<BR><BR>return TRUE; // return TRUE unless you set the focus to a control<BR>// EXCEPTION: OCX Property Pages should return FALSE<BR>}<BR><BR>void CWindoInfoDlg::AddTreeViewItems()<BR>{<BR>CString strItem("Window");<BR><BR>htCur = AddOneItem((HTREEITEM)NULL, strItem, (HTREEITEM)TVI_ROOT, m_nIdxWindow, TRUE);<BR><BR>switch(windInfo.m_nWindType)<BR>{<BR>case 0 :<BR>strItem = "Rect";<BR>htPrev = AddOneItem(htCur, strItem, NULL, m_nIdxRect, FALSE);<BR>break;<BR><BR>case 1 :<BR>strItem = "Arch";<BR>htPrev = AddOneItem(htCur, strItem, NULL, m_nIdxArch, FALSE);<BR>break;<BR><BR>case 2 :<BR>strItem = "Apex";<BR>htPrev = AddOneItem(htCur, strItem, NULL, m_nIdxApex, FALSE);<BR>break;<BR>}<BR><BR><BR>strItem.Format("W = %.2lf", windInfo.m_dWindWt);<BR>htPrev = AddOneItem(htCur, strItem, NULL, m_nIdxWidth, FALSE);<BR><BR>strItem.Format("H = %.2lf", windInfo.m_dWindHt);<BR>htPrev = AddOneItem(htCur, strItem, NULL, m_nIdxHeight, FALSE);<BR><BR>strItem.Format("Rows = %d", windInfo.m_nRows);<BR>htPrev = AddOneItem(htCur, strItem, NULL, m_nIdxRows, FALSE);<BR><BR>strItem.Format("Cols = %d", windInfo.m_nCols);<BR>htPrev = AddOneItem(htCur, strItem, NULL, m_nIdxCols, FALSE);<BR><BR>strItem.Format("SP = (%.2lf, %.2lf)", windInfo.m_startPt.x, windInfo.m_startPt.y);<BR>htPrev = AddOneItem(htCur, strItem, NULL, m_nIdxStartPt, FALSE);<BR>}<BR><BR>HTREEITEM CWindoInfoDlg::AddOneItem( HTREEITEM hParent, <BR>CString szText, HTREEITEM hInsAfter, int iImage, BOOL bChildren)<BR>{<BR>HTREEITEM hItem; // return value<BR>TV_ITEM tvI; // item structure<BR>TV_INSERTSTRUCT tvIns; // item insert structure<BR>if(bChildren) // *** set tvI.mask member ***<BR>tvI.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_CHILDREN | TVIF_SELECTEDIMAGE; // item has children<BR>else // item has no children<BR>tvI.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE;<BR>tvI.pszText = szText.GetBuffer(szText.GetLength()); // set text, text lenght, image<BR>tvI.cchTextMax = szText.GetLength();<BR>tvI.iImage = iImage;<BR>tvI.iSelectedImage = iImage;<BR>tvI.cChildren = 1; // allow one more level down<BR>// do the insert<BR>tvIns.item = tvI;<BR>tvIns.hInsertAfter = hInsAfter;<BR>tvIns.hParent = hParent;<BR>hItem = m_pTreeCtrl-&gt;InsertItem(&amp;tvIns);<BR>return (hItem); // return (add error trap here)<BR>}// WindoTypeDlg.cpp : implementation file<BR>//<BR><BR><BR>#include "StdArx.h"<BR>#include "resource.h"<BR>#include "WindoTypeDlg.h"<BR><BR>#ifdef _DEBUG<BR>#define new DEBUG_NEW<BR>#undef THIS_FILE<BR>static char THIS_FILE[] = __FILE__;<BR>#endif<BR><BR>extern CWindoTypeDlg *g_pWindoTypeDlg;<BR>extern CAcToolBar *g_pAcToolBar;<BR>extern CTBGenWnd *g_pTBGenWnd;<BR><BR>/////////////////////////////////////////////////////////////////////////////<BR>// CWindoTypeDlg dialog<BR><BR><BR>CWindoTypeDlg::CWindoTypeDlg(CWnd* pParent /*=NULL*/)<BR>: CAdUiDialog(CWindoTypeDlg::IDD, pParent)<BR>{<BR>//{{AFX_DATA_INIT(CWindoTypeDlg)<BR>m_nWindType = windInfo.m_nWindType;<BR>m_nCols = windInfo.m_nCols;<BR>m_nRows = windInfo.m_nRows;<BR>m_dHeight = windInfo.m_dWindHt;<BR>m_dWidth = windInfo.m_dWindWt;<BR>m_dXVal = windInfo.m_startPt.x;<BR>m_dYVal = windInfo.m_startPt.y;<BR>//}}AFX_DATA_INIT<BR>}<BR><BR><BR>void CWindoTypeDlg::DoDataExchange(CDataExchange* pDX)<BR>{<BR>CDialog::DoDataExchange(pDX);<BR>//{{AFX_DATA_MAP(CWindoTypeDlg)<BR>DDX_Radio(pDX, IDC_RB_TYPERECT, m_nWindType);<BR>DDX_Text(pDX, IDC_EDIT_COLS, m_nCols);<BR>DDV_MinMaxInt(pDX, m_nCols, 1, 10);<BR>DDX_Text(pDX, IDC_EDIT_ROWS, m_nRows);<BR>DDV_MinMaxInt(pDX, m_nRows, 1, 10);<BR>DDX_Text(pDX, IDC_EDIT_HEIGHT, m_dHeight);<BR>DDV_MinMaxDouble(pDX, m_dHeight, 20., 300.);<BR>DDX_Text(pDX, IDC_EDIT_WIDTH, m_dWidth);<BR>DDV_MinMaxDouble(pDX, m_dWidth, 20., 300.);<BR>DDX_Text(pDX, IDC_EDIT_XVAL, m_dXVal);<BR>DDX_Text(pDX, IDC_EDIT_YVAL, m_dYVal);<BR>//}}AFX_DATA_MAP<BR>}<BR><BR><BR>BEGIN_MESSAGE_MAP(CWindoTypeDlg, CDialog)<BR>//{{AFX_MSG_MAP(CWindoTypeDlg)<BR>ON_BN_CLICKED(IDC_BTN_PICKPT, OnBtnPickPt)<BR>ON_BN_CLICKED(IDC_CHK_VISTB, OnChkViewToolBar)<BR>ON_BN_CLICKED(IDC_BTN_HIDEDLG, OnBtnHideDlg)<BR>ON_COMMAND(ID_MENUITEM32769, OnMenuitem_dqml)<BR>ON_COMMAND(ID_MENUITEM32772, OnMenuitem_xmg)<BR>ON_COMMAND(ID_MENUITEM32770, OnMenuitem_jhcz)<BR>ON_COMMAND(ID_MENUITEM32768, OnMenuitem_dxcz)<BR>ON_COMMAND(ID_MENUITEM32771, OnMenuitem_gy)<BR>ON_COMMAND(ID_MENUITEM32773, OnMenuitem_xjwd)<BR>ON_COMMAND(ID_MENUITEM32775, OnMenuitem_jx)<BR>ON_COMMAND(ID_MENUITEM32776, OnMenuitem_yx)<BR>ON_COMMAND(ID_MENUITEM32777, OnMenuitem_ft)<BR>ON_COMMAND(ID_MENUITEM32778, OnMenuitem_qt)<BR>ON_COMMAND(ID_MENUITEM32782, OnMenuitem_bhsj)<BR>ON_COMMAND(ID_MENUITEM32780, OnMenuitem_bzst)<BR>ON_COMMAND(ID_MENUITEM32774, OnMenuitem_gb)<BR>ON_COMMAND(ID_MENUITEM32783, OnMenuitem_biaozhu)<BR>ON_COMMAND(ID_MENUITEM32784, OnMenuitem_scwl)<BR>ON_COMMAND(ID_MENUITEM32785, OnMenuitem_zhaose)<BR>ON_COMMAND(ID_MENUITEM32786, OnMenuitem_zx)<BR>//}}AFX_MSG_MAP<BR>ON_MESSAGE (WM_ACAD_KEEPFOCUS, onAcadKeepFocus)<BR>END_MESSAGE_MAP()<BR><BR>/////////////////////////////////////////////////////////////////////////////<BR>// CWindoTypeDlg message handlers<BR><BR>LONG CWindoTypeDlg::onAcadKeepFocus(UINT, LONG) <BR>{<BR>return (TRUE) ;<BR>}<BR><BR><BR>BOOL CWindoTypeDlg::OnInitDialog() <BR>{<BR>CDialog::OnInitDialog();<BR><BR>CSpinButtonCtrl* pSpin;<BR>pSpin = (CSpinButtonCtrl*) GetDlgItem(IDC_SPIN_COLS);<BR>pSpin-&gt;SetRange(1, 10);<BR><BR>pSpin = (CSpinButtonCtrl*) GetDlgItem(IDC_SPIN_ROWS);<BR>pSpin-&gt;SetRange(1, 10);<BR><BR>return TRUE; // return TRUE unless you set the focus to a control<BR>// EXCEPTION: OCX Property Pages should return FALSE<BR>}<BR><BR>void CWindoTypeDlg::PostNcDestroy() <BR>{<BR>delete this;<BR>g_pWindoTypeDlg = NULL;<BR>CDialog::PostNcDestroy();<BR>}<BR><BR>void CWindoTypeDlg::OnCancel() <BR>{<BR>// Do NOT call CDialog::OnCancel(); <BR>// Remember we're modeless,<BR>// Call DestroyWindow() instead!<BR><BR>DestroyWindow();<BR>}<BR><BR>void CWindoTypeDlg::OnOK() <BR>{<BR>if (!UpdateData(TRUE))<BR>{<BR>return;<BR>}<BR><BR>// Transfer the values in the dialog<BR>// back to the global variables<BR><BR>windInfo.m_dWindHt = m_dHeight;<BR>windInfo.m_dWindWt = m_dWidth;<BR>windInfo.m_nCols = m_nCols;<BR>windInfo.m_nRows = m_nRows;<BR>windInfo.m_nWindType = m_nWindType;<BR>windInfo.m_startPt.x = m_dXVal;<BR>windInfo.m_startPt.y = m_dYVal;<BR><BR>drawWindo();<BR>}<BR><BR>void CWindoTypeDlg::OnBtnPickPt() <BR>{<BR>// Here we hide our modal dialog<BR>// to allow the user to pick a point<BR>AcGePoint3d pkPt;<BR>int retCode;<BR><BR>ShowWindow(SW_HIDE); // Hide our dialog<BR><BR>acedInitGet(NULL, NULL);<BR><BR>retCode = acedGetPoint(NULL, "\nPick lower left corner of window: ",<BR>asDblArray(pkPt));<BR><BR>switch(retCode)<BR>{<BR>case RTCAN :<BR>case RTNONE :<BR><BR>pkPt.set(0.0, 0.0, 0.0);<BR><BR>break;<BR><BR>case RTNORM :<BR><BR><BR><BR>break;<BR>}<BR><BR>m_dXVal = pkPt.x;<BR>m_dYVal = pkPt.y;<BR><BR>ShowWindow(SW_SHOW); // Display our dialog again<BR><BR>// Transfer the data values from the member variables<BR>// to the dialog.<BR>UpdateData(FALSE);<BR>}<BR><BR>void CWindoTypeDlg::OnBtnHideDlg() <BR>{<BR>ShowWindow(SW_HIDE); <BR>}<BR><BR>void CWindoTypeDlg::OnChkViewToolBar() <BR>{<BR>CMDIFrameWnd *pAcadFrame = acedGetAcadFrame();<BR><BR>if(g_pAcToolBar != NULL &amp;&amp; g_pAcToolBar-&gt;IsWindowVisible())<BR>{<BR>((CButton*) GetDlgItem(IDC_CHK_VISTB))-&gt;SetCheck(0);<BR>pAcadFrame-&gt;ShowControlBar(g_pAcToolBar, FALSE, FALSE);<BR>GetDlgItem(IDC_BTN_HIDEDLG)-&gt;EnableWindow(FALSE);<BR>}<BR>else if(g_pAcToolBar != NULL)<BR>{<BR>((CButton*) GetDlgItem(IDC_CHK_VISTB))-&gt;SetCheck(1);<BR>pAcadFrame-&gt;ShowControlBar(g_pAcToolBar, TRUE, FALSE);<BR>GetDlgItem(IDC_BTN_HIDEDLG)-&gt;EnableWindow(TRUE);<BR>}<BR>else<BR>{<BR>pAcadFrame-&gt;EnableDocking(CBRS_ALIGN_ANY);<BR>pAcadFrame-&gt;RecalcLayout();<BR><BR>CAcModuleResourceOverride resOverride;<BR><BR>// Does the CTBGenWnd already exist?<BR>if(g_pTBGenWnd == NULL)<BR>{<BR>g_pTBGenWnd = new CTBGenWnd;<BR>g_pTBGenWnd-&gt;Create (NULL,<BR>NULL,<BR>WS_CHILD | WS_MINIMIZE,<BR>CRect (0,0,1,1),<BR>pAcadFrame,<BR>10);<BR>}<BR><BR><BR>g_pAcToolBar = new CAcToolBar;<BR><BR>g_pAcToolBar-&gt;Create(pAcadFrame, g_pTBGenWnd);<BR>g_pAcToolBar-&gt;LoadToolBar(IDR_TB_WINDDLG);<BR>g_pAcToolBar-&gt;EnableDocking(CBRS_ALIGN_ANY);<BR>g_pAcToolBar-&gt;SetWindowText(_T("ARX Window")) ;<BR><BR>pAcadFrame-&gt;FloatControlBar(g_pAcToolBar, CPoint (100, 200), CBRS_ALIGN_TOP) ;<BR>pAcadFrame-&gt;ShowControlBar(g_pAcToolBar, TRUE, FALSE) ;<BR><BR>((CButton*) GetDlgItem(IDC_CHK_VISTB))-&gt;SetCheck(1);<BR>GetDlgItem(IDC_BTN_HIDEDLG)-&gt;EnableWindow(TRUE);<BR>}<BR><BR>}<BR><BR><BR><BR>void CWindoTypeDlg::OnMenuitem_dqml() <BR>{<BR>// TODO: Add your command handler code here<BR><BR>acedArxLoad ( "asdkInspector.arx");<BR>// acedArxUnload("app");<BR>// acedCommend("");<BR>}<BR><BR>void CWindoTypeDlg::OnMenuitem_xmg() <BR>{<BR>AcApDocument* pcurdoc;<BR>pcurdoc = acDocManager-&gt;curDocument();<BR>char *cmdstr="open\n";<BR>acDocManager-&gt;sendStringToExecute(pcurdoc,cmdstr,0);<BR>free(cmdstr);<BR>}<BR><BR>void CWindoTypeDlg::OnMenuitem_jhcz() <BR>{<BR>// TODO: Add your command handler code here<BR><BR>acedArxLoad ( "zbzd.arx");<BR>AcApDocument* pcurdoc;<BR>pcurdoc = acDocManager-&gt;curDocument();<BR>char *cmdstr="zbzd\n";<BR>acDocManager-&gt;sendStringToExecute(pcurdoc,cmdstr,0);<BR>free(cmdstr);<BR>}<BR><BR>void CWindoTypeDlg::OnMenuitem_dxcz() <BR>{<BR>// TODO: Add your command handler code here<BR>acedArxLoad ( "trop.arx");<BR>AcApDocument* pcurdoc;<BR>pcurdoc = acDocManager-&gt;curDocument();<BR>char *cmdstr="_windo\n";<BR>acDocManager-&gt;sendStringToExecute(pcurdoc,cmdstr,0);<BR>free(cmdstr);<BR>}<BR><BR>void CWindoTypeDlg::OnMenuitem_gy() <BR>{<BR>// TODO: Add your command handler code here<BR>AfxMessageBox("毕业设计");<BR>}<BR><BR>void CWindoTypeDlg::OnMenuitem_xjwd() <BR>{<BR>// TODO: Add your command handler code here<BR>AcApDocument* pcurdoc;<BR>pcurdoc = acDocManager-&gt;curDocument();<BR>char *cmdstr="_new\n";<BR>acDocManager-&gt;sendStringToExecute(pcurdoc,cmdstr,0);<BR>free(cmdstr);<BR>}<BR><BR>void CWindoTypeDlg::OnMenuitem_jx() <BR>{<BR>// TODO: Add your command handler code here<BR>AcApDocument* pcurdoc;<BR>pcurdoc = acDocManager-&gt;curDocument();<BR>char *cmdstr="_rectang\n";<BR>acDocManager-&gt;sendStringToExecute(pcurdoc,cmdstr,0);<BR>free(cmdstr);<BR>}<BR><BR>void CWindoTypeDlg::OnMenuitem_yx() <BR>{<BR>// TODO: Add your command handler code here<BR>AcApDocument* pcurdoc;<BR>pcurdoc = acDocManager-&gt;curDocument();<BR>char *cmdstr="_circle\n";<BR>acDocManager-&gt;sendStringToExecute(pcurdoc,cmdstr,0);<BR>free(cmdstr);<BR>}<BR><BR>void CWindoTypeDlg::OnMenuitem_ft() <BR>{<BR>// TODO: Add your command handler code here<BR>AcApDocument* pcurdoc;<BR>pcurdoc = acDocManager-&gt;curDocument();<BR>char *cmdstr="_ai_box\n";<BR>acDocManager-&gt;sendStringToExecute(pcurdoc,cmdstr,0);<BR>free(cmdstr);<BR>}<BR><BR>void CWindoTypeDlg::OnMenuitem_qt() <BR>{<BR>// TODO: Add your command handler code here<BR>AcApDocument* pcurdoc;<BR>pcurdoc = acDocManager-&gt;curDocument();<BR>char *cmdstr="_ai_sphere\n";<BR>acDocManager-&gt;sendStringToExecute(pcurdoc,cmdstr,0);<BR>free(cmdstr);<BR>}<BR><BR>void CWindoTypeDlg::OnMenuitem_bhsj() <BR>{<BR>// TODO: Add your command handler code here<BR>AcApDocument* pcurdoc;<BR>pcurdoc = acDocManager-&gt;curDocument();<BR>char *cmdstr="_3dorbit\n";<BR>acDocManager-&gt;sendStringToExecute(pcurdoc,cmdstr,0);<BR>free(cmdstr);<BR>}<BR><BR>void CWindoTypeDlg::OnMenuitem_bzst() <BR>{<BR>// TODO: Add your command handler code here<BR>acedArxLoad ( "pre.arx");<BR>AcApDocument* pcurdoc;<BR>pcurdoc = acDocManager-&gt;curDocument();<BR>char *cmdstr="_ENTDSP\n";<BR>acDocManager-&gt;sendStringToExecute(pcurdoc,cmdstr,0);<BR>free(cmdstr);<BR>}<BR><BR>void CWindoTypeDlg::OnMenuitem_gb() <BR>{<BR>// TODO: Add your command handler code here<BR>AcApDocument* pcurdoc;<BR>pcurdoc = acDocManager-&gt;curDocument();<BR>char *cmdstr="_close\n";<BR>acDocManager-&gt;sendStringToExecute(pcurdoc,cmdstr,0);<BR>free(cmdstr);<BR>}<BR><BR>void CWindoTypeDlg::OnMenuitem_biaozhu() <BR>{<BR>// TODO: Add your command handler code here<BR>AcApDocument* pcurdoc;<BR>pcurdoc = acDocManager-&gt;curDocument();<BR>char *cmdstr="_qdim\n";<BR>acDocManager-&gt;sendStringToExecute(pcurdoc,cmdstr,0);<BR>free(cmdstr);<BR>}<BR><BR>void CWindoTypeDlg::OnMenuitem_scwl() <BR>{<BR>// TODO: Add your command handler code here<BR>acedArxLoad ( "post.arx");<BR>AcApDocument* pcurdoc;<BR>pcurdoc = acDocManager-&gt;curDocument();<BR>//char *cmdstr="_FEM_POST\n";<BR>char *cmdstr="_FEM_POST\n";<BR>acDocManager-&gt;sendStringToExecute(pcurdoc,cmdstr,0);<BR>free(cmdstr);<BR>}<BR><BR>void CWindoTypeDlg::OnMenuitem_zhaose() <BR>{<BR>// TODO: Add your command handler code here<BR>AcApDocument* pcurdoc;<BR>pcurdoc = acDocManager-&gt;curDocument();<BR>//char *cmdstr="_FEM_POST\n";<BR>char *cmdstr="_shademode\n";<BR>acDocManager-&gt;sendStringToExecute(pcurdoc,cmdstr,0);<BR>free(cmdstr);<BR>}<BR><BR>void CWindoTypeDlg::OnMenuitem_zx() <BR>{<BR>// TODO: Add your command handler code here<BR>AcApDocument* pcurdoc;<BR>pcurdoc = acDocManager-&gt;curDocument();<BR>//char *cmdstr="_FEM_POST\n";<BR>char *cmdstr="_line\n";<BR>acDocManager-&gt;sendStringToExecute(pcurdoc,cmdstr,0);<BR>free(cmdstr);<BR>}


运行以上程序出现以下2个一样的错误:<BR>f:\program files\microsoft visual studio\myprojects\bysj\windoinfodlg.cpp(150) : fatal error C1010: unexpected end of file while looking for precompiled header directive<BR>WindoTypeDlg.cpp<BR>f:\program files\microsoft visual studio\myprojects\bysj\windotypedlg.cpp(414) : fatal error C1010: unexpected end of file while looking for precompiled header directive。<BR>这2处错误,是什么意思啊?有人能告诉我吗,怎么改?

zjz 发表于 2004-5-28 17:16:00

要么在那两个cpp文件的开头加上:#include &lt;stdafx.h&gt;


要么在工程设置中,把针对那两个文件的设置改为:不使用预编译

robinsom 发表于 2004-5-28 20:00:00

我按照你的方法都试了,错误越来越多了啊~~


不行啊,还有别的解决办法吗?

mstry 发表于 2004-6-1 10:20:00

可能是在WindoInfoDlg.cpp 的某个函数的末尾多加了或是少了一个"}"
页: [1]
查看完整版本: [ARX] 请大侠帮忙,下面的2处错误什么意思