CWnd::FromHandle(adsw_acadMainWnd())
请问用ARX wizard生成ARX工程,用mfc对话框类的时候,生成对话框类的时候怎么要用:<br>HelloDlg Hellor2000dlg(CWnd::FromHandle(adsw_acadMainWnd()));<br>
为什么呢?可是直接用HelloDlg Hellor2000dlg;也可以一样用啊.可以正常运行。<br>
有什么区别呢?<br>
谢谢!<br>
回复
CWnd::FromHandle的解释是:Returns a pointer to a CWnd object when given a handle to a window. <BR>If a CWnd object is not attached to the handle, a temporary CWnd object<BR>is created and attached.<BR>当为窗口定义句柄时返回一个指针给CWnd对象.如果CWnd对象没有附着句柄,<BR>则临时CWnd对象被创建.
CWnd::FromHandle(adsw_acadMainWnd())只是明确指出了所创建的Dialog的父窗体是<BR>AutoCAD Main Frame?
大概就这样吧!
页:
[1]