Thank You for the reply.  It is not just CNiGraph, but all NI user interface objects which are giving me a problem.  I am Tracking the dialogs in the mainframe class of my application, it is an SDI with several views across which the modeless dialog needs to exist.
I create the modeless dialog in the main frame with 
void CMainFrame::CreateScope()
{
if (NULL == pScope[0])
{
	pScope[0] = new CDiaOScope(this);
	pScope[0]->SetScopeNumber(0);
	if (pScope[0]->Create(IDD_D_OScope,this))
		pScope[0]->ShowWindow(SW_SHOW);
}
else if (NULL == pScope[1])
{
	pScope[1] = new CDiaOScope(this);
	pScope[1]->SetScopeNumber(1);
	if (pScope[1]->Create(IDD_D_OScope,this))
		pScope[1]->ShowWindow(SW_SHOW);
}
else if (NULL == pScope[2])
{
	pScope[2] = new CDiaOScope(this);
	pScope[2]->SetScopeNumber(2);
	if (pScope[2]->Create(IDD_D_OScope,this))
		pScope[2]->ShowWindow(SW_SHOW);
}
else if (NULL == pScope[3])
{
	pScope[3] = new CDiaOScope(this);
	pScope[3]->SetScopeNumber(3);
	if (pScope[3]->Create(IDD_D_OScope,this))
		pScope[3]->ShowWindow(SW_SHOW);
}
else if (NULL == pScope[4])
{
	pScope[4] = new CDiaOScope(this);
	pScope[4]->SetScopeNumber(4);
	if (pScope[4]->Create(IDD_D_OScope,this))
		pScope[4]->ShowWindow(SW_SHOW);
}
	
}
I create up to five scope dialogs as needed.
I am deleting the pointer with a call to a function in the main frame class from within the OnClose message handler of the scope dialog itself.  Perhaps this is where I am running into trouble.  The code is:
void CDiaOScope::OnClose() 
{
	CDialog::OnClose();
	if (m_ScopeStarted.GetValue())
	{
		switch(ScopeNumber)
		{
		case 0:
			KillTimer(TMR_OScope0);
			break;
		case 1:
			KillTimer(TMR_OScope1);
			break;
		case 2:
			KillTimer(TMR_OScope2);
			break;
		case 3:
			KillTimer(TMR_OScope3);
			break;
		case 4:
			KillTimer(TMR_OScope4);
			break;
		}
	}
	m_OScope.DestroyWindow();
	m_XMax.DestroyWindow();
	m_YMax.DestroyWindow();
	m_XMin.DestroyWindow();
	m_YMin.DestroyWindow();
	m_ZoomX.DestroyWindow();
	m_ZoomY.DestroyWindow();
	m_ZoomXY.DestroyWindow();
	m_PanY.DestroyWindow();
	m_PanX.DestroyWindow();
	m_PanXY.DestroyWindow();
	m_AutoScaleY.DestroyWindow();
	m_AutoScaleX.DestroyWindow();
	m_AutoScaleXY.DestroyWindow();
	m_Cursor.DestroyWindow();
	m_CursorX.DestroyWindow();
	m_CursorY.DestroyWindow();
	m_ScopeStarted.DestroyWindow();
		
CMainFrame* pFrame = DYNAMIC_DOWNCAST(CMainFrame,     
GetParentFrame());
	pFrame->CleanUpScope(ScopeNumber);
}
The function which deletes the pointer is at the end.
void CMainFrame::CleanUpScope(int Number)
{
	
	delete pScope[Number];
	pScope[Number] = NULL;
}
That seems simple enough.
The error I get without the DestroyWindow calls is 
an access violation.  When I remove the destroy window call for a CNiButton I get the error at the top line below in the call stack.
68677561()
SERVOCONTROL! NI::CNiControl::WndProc(struct HWND__ *,unsigned int,unsigned int,long) + 105 bytes
USER32! 77e11d0a()
USER32! 77e12bcc()
USER32! 77e12b84()
NTDLL! 77fa02ff()
COleDispatchImpl::Release(COleDispatchImpl * const 0x0272e058) line 1117
COleDispatchDriver::ReleaseDispatch() line 155
COleDispatchDriver::~COleDispatchDriver() line 85 + 15 bytes
COleControlSite::~COleControlSite() line 112 + 33 bytes
COleControlSite::`scalar deleting destructor'(unsigned int 1) + 15 bytes
COleControlSite::DestroyControl() line 291 + 31 bytes
CWnd::DestroyWindow() line 971 + 17 bytes
CWnd::~CWnd() line 760
SERVOCONTROL! NI::CNiControl::~CNiControl(void) + 31 bytes
SERVOCONTROL! NI::CNiButton::~CNiButton(void) + 74 bytes
CDiaOScope::~CDiaOScope() + 449 bytes
How are you closing the modeless dialog in your example?  My goal was to use the close button on the frame of the dialog to close it and the above method seemed like the way to do it.
Thanks for any help
Matthew