DWF Viewer

New Member
Posts: 1
Registered: ‎02-24-2010
Message 1 of 2 (452 Views)

GDI leak in the ECompositeViewer Control

452 Views, 1 Replies
02-24-2010 07:27 AM

I have a problem with the ECompositeViewer Control. When I create the ECompositeViewer, attach it to the control and destroy the control, then my application doesn't release the GDI handles. I've tried it with a simple MFC application which does only instantiate and destroy the ECompositeViewer. Here is an example how I do it.

void CMapViewerMFCDlg::smileysurprised:nBnClickedButtonCreate()
CWnd *pWnd = GetDlgItem(IDC_STATIC_PlaceHolder);
CRect rcControl;
pWnd->MapWindowPoints(this, rcControl);

CLSID clsidControl;
VERIFY( SUCCEEDED(::CLSIDFromString(_T("{2D65BB9F-FB1B-444D-AC3A-CD7070147CC7}"), &clsidControl)));
VERIFY( m_Control.CreateControl(clsidControl, _T("Test"), WS_VISIBLE, rcControl, this, 99) );

void CMapViewerMFCDlg::smileysurprised:nBnClickedButton2Delete()
if (::IsWindow(m_Control.GetSafeHwnd()))
COleControlSite* pSite = GetOleControlSite(99);


Is it a known issue or do I something wrong?
Posts: 33
Registered: ‎06-02-2009
Message 2 of 2 (452 Views)

Re: GDI leak in the ECompositeViewer Control

03-04-2010 11:59 PM in reply to: bondarei

Thank you for reporting this problem.
There is currently a defect logged already. We will consider fixing it in future release.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!