else //通过八个点,怎么什么连点方法实现图中形状?
{
CPen penBorder(PS_SOLID,1,RGB(255,0,255));
POINT pts[8];
CRect rc(0,24,158,231);
pts[0].x = rc.left;
pts[0].y = rc.bottom;
pts[1].x = rc.left + 2;
pts[1].y = rc.bottom - 50;
pts[2].x = rc.left + MAX -2;
pts[2].y = rc.top + 2;
pts[3].x = rc.left + MAX + 3;
pts[3].y = rc.top;
pts[4].x = rc.right -3;
pts[4].y = rc.top;
pts[5].x = rc.right - 1;
pts[5].y = rc.top + 2;
pts[6].x = rc.right -1;
pts[6].y = rc.bottom;
pts[7].x = rc.right -1;
pts[7].y = rc.bottom;
dc.Polyline(pts,8);
CDialogEx::OnPaint();
}

解决方案 »

  1.   

    不知道你要画什么: else
    {
    // CDialog::OnPaint();
    #define MAX 20
    CPaintDC dc(this); // device context for painting
    CPen penBorder(PS_SOLID,1,RGB(255,0,255));
    POINT pts[8];
    CRect rc(0,24,158,231);
    pts[0].x = rc.left;
    pts[0].y = rc.bottom;
    dc.TextOut(pts[0].x,pts[0].y,"0",1);
    pts[1].x = rc.left + 2;
    pts[1].y = rc.bottom - 50;
    dc.TextOut(pts[1].x,pts[1].y,"1",1);
    pts[2].x = rc.left + MAX -2;
    pts[2].y = rc.top + 2;
    dc.TextOut(pts[2].x-10,pts[2].y,"2",1);
    pts[3].x = rc.left + MAX + 3;
    pts[3].y = rc.top;
    dc.TextOut(pts[3].x,pts[3].y,"3",1);
    pts[4].x = rc.right -3;
    pts[4].y = rc.top;
    dc.TextOut(pts[4].x,pts[4].y-12,"4",1);
    pts[5].x = rc.right - 1;
    pts[5].y = rc.top + 2;
    dc.TextOut(pts[5].x,pts[5].y,"5",1);
    pts[6].x = rc.right -1;
    pts[6].y = rc.bottom;
    dc.TextOut(pts[6].x-10,pts[6].y,"6",1);
    pts[7].x = rc.right -1;
    pts[7].y = rc.bottom;
    dc.TextOut(pts[7].x,pts[7].y,"7",1);
    dc.Polyline(pts,8);
    }
    }
    结果:
      

  2.   

    你觉得他的Tab页一定是自己画出来的?我要贴图实现了怎么说?