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

#1
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

#2
Hello!

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

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

Tom