CDC描画
来源:互联网 发布:java remainder 编辑:程序博客网 时间:2024/04/28 09:29
void CXXXestDlg::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this); // device context for painting
SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;
// Draw the icon
dc.DrawIcon(x, y, m_hIcon);
}
else
{
CPaintDC dc(this); // device context for painting
// CWindowDC dc(GetDesktopWindow());
vector<Line_t> vecLine;
Link2Node( vecLine );
for (vector<Line_t>::iterator iter = vecLine.begin(); iter != vecLine.end(); ++ iter )
{
CPen pen(PS_SOLID,1,RGB(iter->a.x%255,iter->a.y%255,iter->b.x%255));
dc.SelectObject( &pen );
char buff[10];
ltoa(distance(vecLine.begin(),iter)+1,buff,10);
CString cs = buff;
dc.DrawText(cs,
CRect(iter->a,iter->b),
DT_SINGLELINE|DT_CENTER|DT_VCENTER);
dc.MoveTo( iter->a );
dc.LineTo( iter->b );
}
// CDialog::OnPaint();
}
}
- CDC描画
- CDC
- CDC
- CDC
- cdc
- CDC
- CDC
- CDC
- xcode4 quartz描画例子
- 图形和描画
- c#的图形描画
- TMC描画和播报
- Bitmap文件格式以及Opengl描画
- (188)支点描画器
- 使用AGG 来进行GIS地图描画
- 初探C#中Graphic的描画函数
- iPhone应用程序编程指南-图形和描画
- 参考库5(图形和描画)
- java里抽象类和接口的区别
- 带你认识WinCE Display驱动开发
- 回溯法:子集树与排列树
- Java 线程使用中出现的异常IllegalMonitorStateException
- Ext实战总结:Ext.Toolbar上的combo控件及其文本标签text同时隐藏/显示...
- CDC描画
- 实战LSMW(16)
- oracle服务无法启动的原因及解决方法
- 如何配置J2ME的eclipse的开发环境~
- 问题解决: Attribute value request.getParameter("id") is quoted with " which must be escaped when used within the value
- asp.net程序性能优化的---A
- 09-04-09
- CSS 浮动
- SQLServer基本函数--A