Page 1 of 1

How to get a pointer to the CMDIFrameWnd window of ICad.exe

Posted: Thu Jan 13, 2005 6:05 pm
by vipontes
Hi,

How could I get a pointer to the IntelliCAD CMDIFrameWnd window?

I would like the something that works like acedGetAcadFrame() function from ARX.

I tried these:

CMDIFrameWnd *pFrame = (CMDIFrameWnd *)CMDIFrameWnd::FromHandle(sds_getmainhwnd());
CMDIFrameWnd *pFrame = (CMDIFrameWnd *)AfxGetApp()->m_pMainWnd;
CMDIFrameWnd *pFrame = (CMDIFrameWnd *)AfxGetMainWnd();

But they didn't work.

Any help is welcome.

Thanks in advance,

Vinicius

Posted: Sun Oct 09, 2005 6:18 pm
by Tom_H
Hello!

for myself, I use the following replacement and it works very well:

CWnd* acedGetAcadFrame()
{
return CWnd::FromHandle(adsw_hwndAcad);
}

Tom