orlando_zw 发表于 2006-7-19 12:00:00

请教CAcUiDockControlBar中遇到的问题

<P>我自定义了一个MyDialogBar继承于CAcUiDockControlBar,但是创建dialog时遇到问题:</P>
<P>BOOL MyDialogBar::Create(CWnd*pParent, LPCSTR lpszTitle) {<BR>&nbsp;const char dlgName[] = "Testing";<BR>&nbsp;&nbsp;&nbsp; CRect rect (0, 0, 400, 400) ;</P>
<P>&nbsp;&nbsp;&nbsp; if (!CAcUiDockControlBar::Create (<BR>&nbsp;&nbsp;&nbsp;&nbsp;dlgName,<BR>&nbsp;&nbsp;&nbsp;&nbsp;lpszTitle,<BR>&nbsp;&nbsp;&nbsp;&nbsp;WS_VISIBLE | WS_CHILD | WS_CLIPCHILDREN ,<BR>&nbsp;&nbsp;&nbsp;&nbsp;rect,<BR>&nbsp;&nbsp;&nbsp;&nbsp;pParent, IDD_DIALOG2)<BR>&nbsp;&nbsp;)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return (FALSE) ;</P>
<P>&nbsp;return (TRUE) ;<BR>}<BR>中返回的是false...但执行</P>
<P>&nbsp;MyDialogBar&nbsp; *dlg = new MyDialogBar ;<BR>&nbsp;CMDIFrameWnd *cwnd = acedGetAcadFrame();<BR>&nbsp;const char dlgName[] = "CAcUiControlBar" ;<BR>&nbsp;dlg-&gt;Create (cwnd, dlgName) ;</P>
<P>能通过编译,感觉是通过acedGetAcadFrame()未获得窗口指针!请问acedGetAcadFrame()使用中#include "rxmfcapi.h"后还要做什么?如何正确使用??</P>
页: [1]
查看完整版本: 请教CAcUiDockControlBar中遇到的问题