当前位置: 首页>>代码示例>>C++>>正文


C++ InvalidateCtrl函数代码示例

本文整理汇总了C++中InvalidateCtrl函数的典型用法代码示例。如果您正苦于以下问题:C++ InvalidateCtrl函数的具体用法?C++ InvalidateCtrl怎么用?C++ InvalidateCtrl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了InvalidateCtrl函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ASSERT

// returns index of added item (or (-1))
int CLineChartCtrl::Add(const COLORREF lcolor, const UINT nLower, const UINT nUpper,
								const DWORD dwItemData, LINECHARTITEMPOSCFN lpfnPcfn)
{
	ASSERT(nLower < nUpper);
	CLineChartItem	*pItem=new CLineChartItem(lcolor, nUpper, nLower, dwItemData, lpfnPcfn);
#ifdef _DEBUG
	ASSERT(pItem != NULL);
#else
	if (NULL == pItem)
		return (-1);
#endif

	try 
	{
		const int	nIndex=m_items.Add(pItem);

		InvalidateCtrl();
		return nIndex;
	}
	catch (CMemoryException* e)
	{
		if (pItem !=NULL) 
			delete pItem;
		e->Delete();
		return (-1);
	}
}
开发者ID:lgoldstein,项目名称:communitychest,代码行数:28,代码来源:LineChartCtrl.cpp

示例2: InvalidateCtrl

void COScopeCtrl::SetXUnits(CString string, CString XMin, CString XMax)
{
	m_str.XUnits = string;
	m_str.XMin = XMin;
	m_str.XMax = XMax;
	InvalidateCtrl(false);
}
开发者ID:e1z0,项目名称:sMule,代码行数:7,代码来源:OScopeCtrl.cpp

示例3: InvalidateCtrl

//##ModelId=43B25EC101D4
void CStarWarsCtrl::OnTimer(UINT nIDEvent) 
{
	if (nIDEvent == 1)
		InvalidateCtrl();

	CStatic::OnTimer(nIDEvent);
}
开发者ID:donge,项目名称:donge,代码行数:8,代码来源:StarWarsCtrl.cpp

示例4: InvalidateCtrl

void COScopeCtrl::SetPlotColor(COLORREF color)
{
 m_crPlotColor = color;
 m_penPlot.DeleteObject();
 m_penPlot.CreatePen(PS_SOLID, 0, m_crPlotColor);
 // clear out the existing garbage, re-start with a clean plot
 InvalidateCtrl();
}
开发者ID:fredcooke,项目名称:secu3man,代码行数:8,代码来源:OScopeCtrl.cpp

示例5: InvalidateCtrl

void COScopeCtrl::SetGridColor(COLORREF color)
{
  m_crGridColor = color ;

  // clear out the existing garbage, re-start with a clean plot
  InvalidateCtrl() ;

}  // SetGridColor
开发者ID:ForbiddenEra,项目名称:kx-audio-driver,代码行数:8,代码来源:OScopeCtrl.cpp

示例6: InvalidateCtrl

void COScopeCtrl::Reset(double sNewPeriod)
{
	bool bStoppedPrev = bStopped;
	bStopped = false;
	if (sLastPeriod != sNewPeriod  ||  bStoppedPrev) {
		sLastPeriod = sNewPeriod;
		InvalidateCtrl();
	}
}
开发者ID:Artoria2e5,项目名称:amule-dlp,代码行数:9,代码来源:OScopeCtrl.cpp

示例7: InvalidateCtrl

void COScopeCtrl::Reset()
{
 m_point_position = 0;
 m_points.clear();
 m_dPreviousPosition = 0.0;
 // to clear the existing data (in the form of a bitmap)
 // simply invalidate the entire control
 InvalidateCtrl();
}
开发者ID:ashabelnikov,项目名称:secu3man,代码行数:9,代码来源:OScopeCtrl.cpp

示例8: ASSERT

void COScopeCtrl::SetRange(double dLower, double dUpper, int nDecimalPlaces)
{
 ASSERT(dUpper > dLower);
 m_dLowerLimit = dLower;
 m_dUpperLimit = dUpper;
 m_nYDecimals = nDecimalPlaces;
 m_dRange = m_dUpperLimit - m_dLowerLimit;
 m_dVerticalFactor = (double)m_rectPlot.Height() / m_dRange;
 InvalidateCtrl();
}
开发者ID:ashabelnikov,项目名称:secu3man,代码行数:10,代码来源:OScopeCtrl.cpp

示例9: ASSERT

void COScopeCtrl::SetRange(double dLower, double dUpper, int iTrend)
{
	ASSERT(dUpper > dLower);
	
	m_PlotData[iTrend].dLowerLimit     = dLower;
	m_PlotData[iTrend].dUpperLimit     = dUpper;
	m_PlotData[iTrend].dRange          = m_PlotData[iTrend].dUpperLimit - m_PlotData[iTrend].dLowerLimit;
	m_PlotData[iTrend].dVerticalFactor = (double)m_nPlotHeight / m_PlotData[iTrend].dRange; 
	InvalidateCtrl();
}
开发者ID:e1z0,项目名称:sMule,代码行数:10,代码来源:OScopeCtrl.cpp

示例10: ASSERT

void COScopeCtrl::SetRange(double dLower, double dUpper, int nDecimalPlaces)
{
 ASSERT(dUpper > dLower);

 m_dLowerLimit     = dLower;
 m_dUpperLimit     = dUpper;
 m_nYDecimals      = nDecimalPlaces;
 m_dRange          = m_dUpperLimit - m_dLowerLimit;
 m_dVerticalFactor = (double)m_rectPlot.Height() / m_dRange;
  
 // clear out the existing garbage, re-start with a clean plot
 InvalidateCtrl();
}
开发者ID:fredcooke,项目名称:secu3man,代码行数:13,代码来源:OScopeCtrl.cpp

示例11: AfxRegisterWndClass

BOOL COScopeCtrl::Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID) 
{
 BOOL result;
 static CString className = AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW);

 result = CWnd::CreateEx(WS_EX_CLIENTEDGE | WS_EX_STATICEDGE, className, NULL, dwStyle,
                          rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top,
                          pParentWnd->GetSafeHwnd(), (HMENU)nID);
 if (result != 0)
  InvalidateCtrl();

 return result;
}
开发者ID:fredcooke,项目名称:secu3man,代码行数:13,代码来源:OScopeCtrl.cpp

示例12: VERIFY

void COScopeCtrl::OnSysColorChange()
{
	if (m_bitmapOldGrid.m_hObject)
		m_dcGrid.SelectObject(m_bitmapOldGrid.Detach());
	VERIFY( m_dcGrid.DeleteDC() );

	if (m_bitmapOldPlot.m_hObject)
		m_dcPlot.SelectObject(m_bitmapOldPlot.Detach());
	VERIFY( m_dcPlot.DeleteDC() );

	CWnd::OnSysColorChange();
	InvalidateCtrl(false);
}
开发者ID:e1z0,项目名称:sMule,代码行数:13,代码来源:OScopeCtrl.cpp

示例13: GetClientRect

void COScopeCtrl::OnSize(UINT nType, int cx, int cy)
{
	if (!cx && !cy)
		return;

	//int iTrend;
	CWnd::OnSize(nType, cx, cy);
	
	// NOTE: OnSize automatically gets called during the setup of the control
	
	GetClientRect(m_rectClient);
	m_nClientHeight = m_rectClient.Height();
	m_nClientWidth = m_rectClient.Width();
	
	//MORPH - Moved every thing into the InvalidateCtrl as m_rectPlot is modifyed in
	/*
	// the "left" coordinate and "width" will be modified in InvalidateCtrl to be based on the width 
	// of the y axis scaling
	m_rectPlot.left = 20;
	m_rectPlot.top = 10;
	m_rectPlot.right = m_rectClient.right - 10;
	m_rectPlot.bottom = m_rectClient.bottom - 3 - (abs(sm_logFontAxis.lfHeight) + 2)*2 - 3;
	
	m_nPlotHeight = m_rectPlot.Height();
	m_nPlotWidth = m_rectPlot.Width();
	
	// set the scaling factor for now, this can be adjusted in the SetRange functions
	for (iTrend = 0; iTrend < m_NTrends; iTrend ++)
		m_PlotData[iTrend].dVerticalFactor = (double)m_nPlotHeight / m_PlotData[iTrend].dRange;
	*/
	// destroy and recreate the grid bitmap
	CClientDC dc(this);
	if (m_bitmapOldGrid.m_hObject && m_bitmapGrid.GetSafeHandle() && m_dcGrid.GetSafeHdc())
	{
		m_dcGrid.SelectObject(m_bitmapOldGrid.Detach());
		m_bitmapGrid.DeleteObject();
		m_bitmapGrid.CreateCompatibleBitmap(&dc, m_nClientWidth, m_nClientHeight);
		m_bitmapOldGrid.Attach(SelectObject(m_dcGrid, m_bitmapGrid));
	}
	
	// destroy and recreate the plot bitmap
	if (m_bitmapOldPlot.m_hObject && m_bitmapPlot.GetSafeHandle() && m_dcPlot.GetSafeHdc())
	{
		m_dcPlot.SelectObject(m_bitmapOldPlot.Detach());
		m_bitmapPlot.DeleteObject();
		m_bitmapPlot.CreateCompatibleBitmap(&dc, m_nClientWidth, m_nClientHeight);
		m_bitmapOldPlot.Attach(SelectObject(m_dcPlot, m_bitmapPlot));
	}
	
	InvalidateCtrl();
}
开发者ID:e1z0,项目名称:sMule,代码行数:51,代码来源:OScopeCtrl.cpp

示例14: GetPlotY

void COScopeCtrl::SetRange(float fLower, float fUpper, unsigned iTrend)
{
	PlotData_t* ppds = pdsTrends+iTrend;
	if ((ppds->fLowerLimit == fLower) && (ppds->fUpperLimit == fUpper))
		return;
	ppds->fLowerLimit = fLower;
	ppds->fUpperLimit = fUpper;
	ppds->fVertScale = (float)m_rectPlot.GetHeight() / (fUpper-fLower);
	ppds->yPrev = GetPlotY(ppds->fPrev, ppds);

	if (iTrend == 0) {
		InvalidateCtrl();
	} else {
		InvalidateGraph();
	}
}
开发者ID:Artoria2e5,项目名称:amule-dlp,代码行数:16,代码来源:OScopeCtrl.cpp

示例15: AfxRegisterWndClass

BOOL COScopeCtrl::Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID) 
{
	BOOL result;
	static CString className = AfxRegisterWndClass(CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW, AfxGetApp()->LoadStandardCursor(IDC_ARROW));
	
	result = CWnd::CreateEx(/*WS_EX_CLIENTEDGE*/ // strong (default) border
							WS_EX_STATICEDGE,	// lightweight border
							className, NULL, dwStyle, 
							rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top,
							pParentWnd->GetSafeHwnd(), (HMENU)nID);
	if (result != 0)
		InvalidateCtrl();
	InitWindowStyles(this);
	
	ready = true;
	return result;
}
开发者ID:e1z0,项目名称:sMule,代码行数:17,代码来源:OScopeCtrl.cpp


注:本文中的InvalidateCtrl函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。