Пример #1
0
CMessageBox::~CMessageBox()
{
	for(unsigned int i=0;i<ButtonCount();i++){
		deleteZ(m_arBInfo[i].m_pWnd);
	}
	deleteZ(m_pStaticText);
	deleteZ(m_pStaticIcon);
}
Пример #2
0
void CSplashWnd::ShowSplashScreen(CWnd* pParentWnd /*= NULL*/)
{
	if (!c_bShowSplashWnd || c_pSplashWnd != NULL)
		return;

	// Allocate a new splash screen, and create the window.
	c_pSplashWnd = new CSplashWnd;
	if (!c_pSplashWnd->Create(pParentWnd))
	{
		deleteZ(c_pSplashWnd);
	}
	else
		c_pSplashWnd->UpdateWindow();
}
Пример #3
0
void CCellView::CancelCellEdit(bool bApplyChanges)
{
  if(m_hInCell){
    CConfigItem &ti=TI(m_hInCell);
    if(bApplyChanges){
      CString strValue;
      m_pwndCell->GetWindowText(strValue);
      // Ignore empty strings in integer or floating cells - these are legal as intermediate values but not now
      if(strValue!=ti.StringValue() && (!strValue.IsEmpty() || (ti.Type()!=CConfigItem::Integer && ti.Type()!=CConfigItem::Double))){
        CConfigTool::GetConfigToolDoc()->SetValue (ti, strValue);
      }
    }

    deleteZ(m_pwndCell);
    m_hInCell=NULL;
  }
}
Пример #4
0
void CCellView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint) 
{
	switch(lHint)
	{
		case CConfigToolDoc::IntFormatChanged:
      {
			  for(HTREEITEM h=CConfigTool::GetControlView()->GetFirstVisibleItem();h;h=CConfigTool::GetControlView()->GetNextVisibleItem(h)){
				  CConfigItem &ti=TI(h);
          if(ti.Type()==CConfigItem::Integer) {
					  CRect rect;
					  GetItemRect(h,rect);
					  InvalidateRect(rect);
				  }
			  }
        if(m_pwndCell && TI(m_hInCell).Type()==CConfigItem::Integer) {
				  CString strData;
				  m_pwndCell->GetWindowText(strData);
				  ItemIntegerType n;
				  CUtils::StrToItemIntegerType(strData,n);
          m_pwndCell->SetWindowText(CUtils::IntToStr(n,CConfigTool::GetConfigToolDoc()->m_bHex));
			  }
      }
			break;
		case CConfigToolDoc::Clear:	
			deleteZ(m_pwndCell);
			Invalidate();
			UpdateWindow(); // This prevents cell view half of config pane still being displayed
      break;
		case CConfigToolDoc::ValueChanged:
			{
				CConfigItem *pti=(CConfigItem *)pHint;
				CRect rect;
				GetItemRect(pti->HItem(),rect);
				InvalidateRect(rect);
			}
			break;
		case 0:
			Invalidate();
			break;
		default:
			break;
	}	
	UNUSED_ALWAYS(pSender);
}
Пример #5
0
CCellView::~CCellView()
{
    deleteZ(m_pwndCell);
    CConfigTool::SetCellView(0);
}