本文整理汇总了C++中InvalidateCtrl函数的典型用法代码示例。如果您正苦于以下问题:C++ InvalidateCtrl函数的具体用法?C++ InvalidateCtrl怎么用?C++ InvalidateCtrl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了InvalidateCtrl函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: AfxRegisterWndClass
BOOL CFFTDisp::Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID )
//Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
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 ;
//return CWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
}
开发者ID:Quenii,项目名称:adcevm,代码行数:19,代码来源:FFTDisp.cpp
示例17: dc
//##ModelId=43B25EC1003F
void CStarWarsCtrl::PreSubclassWindow()
{
CClientDC dc(this);
GetClientRect(m_rectClient);
// initialize stars
for (int i = 0; i < NUM_STARS; i++)
{
m_StarArray[i].x = getrandom(0, 1024);
m_StarArray[i].x -= 512;
m_StarArray[i].y = getrandom(0, 1024);
m_StarArray[i].y -= 512;
m_StarArray[i].z = getrandom(0, 512);
m_StarArray[i].z -= 256;
}
/*
m_TextLines.Add("A long time ago");
m_TextLines.Add("");
m_TextLines.Add("in a galaxy far far away");
m_TextLines.Add("");
m_TextLines.Add("this application was programmed by");
m_TextLines.Add("");
m_TextLines.Add("Pablo van der Meer");
m_TextLines.Add("");
m_TextLines.Add("Have fun!");
*/
m_nScrollPos = m_rectClient.Height();
// calculate speed so that it scroll the same speed on a different machine
DWORD t1 = GetTickCount();
InvalidateCtrl();
DWORD t2 = GetTickCount();
t2 -= t1; // = 50 on my system
m_nScrollSpeed = (m_nScrollSpeed * t2)/50;
SetTimer(1, 75, NULL);
CStatic::PreSubclassWindow();
}
开发者ID:donge,项目名称:donge,代码行数:43,代码来源:StarWarsCtrl.cpp
示例18: 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_nPlotHeight / m_dRange ;
// clear out the existing garbage, re-start with a clean plot
InvalidateCtrl(false) ;
if (m_bStopSample == TRUE)
{
unsigned int uiPos = 0;
uiPos = m_pParentWnd->GetDlgItem(IDC_SCROLLBAR_GRAPHVIEW)->GetScrollPos(SB_HORZ);
// 向滚动条发送消息
m_pParentWnd->SendMessage(WM_HSCROLL, MAKELONG(SB_THUMBPOSITION, uiPos),
(LPARAM)m_pParentWnd->GetDlgItem(IDC_SCROLLBAR_GRAPHVIEW)->GetSafeHwnd());
}
} // SetRange
开发者ID:liquanhai,项目名称:cxm-hitech-matrix428,代码行数:22,代码来源:OScopeCtrl.cpp
示例19: isChecked2
void CSetPgApps::DoEnableControls(WORD nGroupCtrlId)
{
bool bAllowed = false;
const AppSettings* pApp = NULL;
int iCur = (int)SendDlgItemMessage(mh_Dlg, lbAppDistinct, LB_GETCURSEL, 0,0);
if (iCur >= 0)
pApp = gpSet->GetAppSettings(iCur);
if (pApp && pApp->AppNames)
{
bAllowed = true;
}
for (size_t i = 0; i < countof(DistinctControls); i++)
{
if (nGroupCtrlId && (nGroupCtrlId != DistinctControls[i].nOverrideID))
continue;
bool bEnabled = bAllowed
? (DistinctControls[i].nOverrideID ? isChecked2(mh_Child, DistinctControls[i].nOverrideID) : true)
: FALSE;
HWND hDlgCtrl = DistinctControls[i].nOverrideID ? mh_Child : mh_Dlg;
if (DistinctControls[i].nOverrideID)
{
enableDlgItem(hDlgCtrl, DistinctControls[i].nOverrideID, bAllowed);
if (!bAllowed)
checkDlgButton(hDlgCtrl, DistinctControls[i].nOverrideID, BST_UNCHECKED);
}
_ASSERTE(DistinctControls[i].nCtrls[countof(DistinctControls[i].nCtrls)-1]==0 && "Overflow check of nCtrls[]")
CSetDlgLists::EnableDlgItems(hDlgCtrl, DistinctControls[i].nCtrls, countof(DistinctControls[i].nCtrls), bEnabled);
}
InvalidateCtrl(mh_Child, FALSE);
}
开发者ID:jslilly,项目名称:ConEmu,代码行数:38,代码来源:SetPgApps.cpp
示例20: 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_nPlotHeight / m_dRange ;
// clear out the existing garbage, re-start with a clean plot
InvalidateCtrl() ;
// Auto Ranging
if(m_bWrapped ) // see if data points have wrapped
{
m_dPreviousPosition = m_pdblDataPoints[(m_nDataIndex+1)%m_nBufferSize];
for( int i = ((m_nDataIndex+1)%m_nBufferSize); i != m_nDataIndex; i = (i + 1)%m_nBufferSize)
{
m_dCurrentPosition = m_pdblDataPoints[i];
DrawPoint() ;
}
}
else if( m_nDataIndex != 0 ) // see if any data points have been stored
{
m_dPreviousPosition = m_pdblDataPoints[0];
for( int i = 0; i < m_nDataIndex; i++)
{
m_dCurrentPosition = m_pdblDataPoints[i];
DrawPoint();
}
}
// We don't need to erase, because we're blitting - berise
Invalidate(FALSE);
} // SetRange
开发者ID:berise,项目名称:BTools2,代码行数:37,代码来源:OScopeCtrl.cpp
注:本文中的InvalidateCtrl函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论