but when call at some dlg,only no echo,but after add a Invalidate() ,it will be ok very strange.
2004-03-22 20:33
666 查看
void CAboutDlg::OnTestDraw()
{ Invalidate();
CPaintDC dc(this);
CPen MyNewPen;
COLORREF mm_color=RGB(233,44,55);//dlg.m_color;
MyNewPen.CreatePen(PS_SOLID,10,mm_color);//RGB(255,0,0)
CPen* pOriginalPen;
pOriginalPen=dc.SelectObject(&MyNewPen);
int m_Radius=22;
CRect MyRectangle(30,10,20+m_Radius*2,10+m_Radius*2);
dc.Ellipse(&MyRectangle);
dc.LineTo(235,444);
dc.SelectObject(pOriginalPen);
//CDialog::OnPaint();
}
{ Invalidate();
CPaintDC dc(this);
CPen MyNewPen;
COLORREF mm_color=RGB(233,44,55);//dlg.m_color;
MyNewPen.CreatePen(PS_SOLID,10,mm_color);//RGB(255,0,0)
CPen* pOriginalPen;
pOriginalPen=dc.SelectObject(&MyNewPen);
int m_Radius=22;
CRect MyRectangle(30,10,20+m_Radius*2,10+m_Radius*2);
dc.Ellipse(&MyRectangle);
dc.LineTo(235,444);
dc.SelectObject(pOriginalPen);
//CDialog::OnPaint();
}
相关文章推荐
- use MyButton is simple,only add two file and then add some code just bellow in any dlg src declear the button control and will ok!
- add a splash to load system is easy:1:add spashWnd,then call it in instance ,when some work ok,close it.
- draw on dlg is simple only add some code in func proc. is ok.
- Auto property synthesis will not synthesize property …because it is ‘readwrite’ but it will be synth
- Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in
- gcc compiler warning: “will be initialized after/when initialized here”
- [The primary GPT table is corrupt, but the backup appears OK, so that will be used]的修复办法
- the selected server is enabled,but is not configured properly.Deployment to it will not be permitted
- some tips(when having a new one,I will add it in time)
- The selected server is enabled, but is not configured properly. Deployment to it will not be permitt
- Namespace declaration statement has to be the very first statement or after any declare call in the script
- This view is not constrained vertically: at runtime it will jump to the left unless you add a vertic
- ERROR 1840 (HY000) at line 24: GTID_PURGED can only be set when GTID_EXECUTED is empty.
- the selected server is enabled,but is not configured properly.deployment to it will not be permitted until the problem is correc
- android studio:no idea annotations attached to the jdk 1.8(C:\...),some issues will not be found
- ERROR 1840 (HY000) at line 24: @@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_EXECUTED is e
- gcc compiler warning: “will be initialized after/when initialized here”
- When it comes to two corresponding names,one of them will be forces \( \)
- the selected server is enabled,but is not configured properly.Deployment to it will not be permitted
- the breakpoint will not currently be hit. No executale code is currently loaded at this location