上传者: flxyd
|
上传时间: 2022-11-20 22:07:09
|
文件大小: 96KB
|
文件类型: DOC
void CCube1View::cube_def( )
{
int i,j;
CDC *pDC=GetDC();
CPen pen;
pen.CreatePen(PS_SOLID,1,RGB(255,255,255));
CPen *poldpen=pDC->SelectObject(&pen);
for(i=0;i<5;i+=4)
{
pDC->MoveTo(b[i].x,b[i].y);
for(j=1;j<4;j++)
pDC->LineTo(b[i+j].x,b[i+j].y);
pDC->LineTo(b[i].x,b[i].y);
}
for(i=0;i<4;i++)
{
pDC->MoveTo(b[i].x,b[i].y);
pDC->LineTo(b[i+4].x,b[i+4].y);
}