文件名称:C++ 画图程序
文件大小:3.27MB
文件格式:RAR
更新时间:2014-10-17 09:20:32
C++ MFC 画图程序
CString HStrokeEditDlg::strokeInfo(HStroke *stroke, int index)
{
CString info, result;
switch (stroke->m_picType)
{
case PIC_line:
info = "直线";
break;
case PIC_poly:
info = "曲线";
break;
case PIC_rect:
info = "矩形";
break;
case PIC_ellipse:
info = "椭圆";
break;
case PIC_text:
info = "文本";
break;
default:
info = "错误";
}
result.Format("%s %d", info, index);
return result;
}
void HStrokeEditDlg::OnSelchangeListStrokes()
{
// TODO: Add your control notification handler code here
CString info, result;
int i, index = m_listStroke.GetCurSel();
HStroke *stroke = m_ptrStrokeList->ElementAt(index);
//显示点集
for(i = 0; i < stroke->m_points.GetSize(); i ++){
info.Format(" [%d,%d]",
stroke->m_points.GetAt(i).x,
stroke->m_points.GetAt(i).y);
result += info;
}
m_editStroke.SetWindowText(result);
//显示颜色
info.Format("%d", stroke->m_penWidth);
//显示线宽
m_editWidth.SetWindowText(info);
//选中某个图形
for(i = 0; i
【文件预览】:
VC画图源代码
----README.txt(1KB)
----HDraw()
--------HDraw.suo(28KB)
--------Resource.h(4KB)
--------HDrawView.h(2KB)
--------HDraw.h(1KB)
--------res()
--------HDraw.sln(874B)
--------HDrawView.cpp(16KB)
--------HStroke.cpp(11KB)
--------HDraw.vcproj(11KB)
--------HDraw.plg(2KB)
--------HDraw.dsw(725B)
--------HDraw.ncb(97KB)
--------HDrawDoc.cpp(9KB)
--------HStrokeEditDlg.h(2KB)
--------HDraw.cpp(4KB)
--------HDraw.dsp(6KB)
--------HColorBar.cpp(5KB)
--------HDraw.reg(672B)
--------HWidthBar.cpp(702B)
--------HStrokeTextDlg.h(1KB)
--------HDrawPView.cpp(5KB)
--------HWidthBar.h(1KB)
--------StdAfx.cpp(207B)
--------MainFrm.cpp(6KB)
--------HDraw.clw(5KB)
--------MainFrm.h(2KB)
--------StdAfx.h(1KB)
--------HColorBar.h(1KB)
--------HStrokeTextDlg.cpp(958B)
--------HDraw.rc(17KB)
--------HDraw.clw.hjz.bak(3KB)
--------HStrokeEditDlg.cpp(5KB)
--------HDraw.opt(48KB)
--------HStroke.h(3KB)
--------Debug()
--------HDrawDoc.h(3KB)
--------HDraw.vcproj.BE81BCC37E63463.Administrator.user(1KB)
--------ReadMe.txt(4KB)
--------HDraw.aps(49KB)
--------HDrawPView.h(2KB)
----HDraw2.9.doc(455KB)