ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
//创建实心画笔,粗度为1,颜色为绿色 newPen.CreatePen(PS_SOLID, 1, RGB(0, 255, 0)); //选择新画笔,并将旧画笔的指针保存到pOldPen pOldPen = pDC->SelectObject(&newPen); //画直角坐标 pDC->MoveTo(rectPicture.left, rectPicture.top + (rectPicture.Height() / 2)); pDC->LineTo(rectPicture.right, rectPicture.top + (rectPicture.Height() / 2)); pDC->MoveTo(rectPicture.left + (rectPicture.Width() / 2), rectPicture.top); pDC->LineTo(rectPicture.left + (rectPicture.Width() / 2), rectPicture.bottom); // 恢复旧画笔 pDC->SelectObject(pOldPen); // 删除坐标画笔 newPen.DeleteObject(); //创建实心画笔,粗度为1,颜色为绿色 newPen.CreatePen(PS_SOLID, 1, RGB(0, 255, 0)); //选择新画笔,并将旧画笔的指针保存到pOldPen pOldPen = pDC->SelectObject(&newPen); //画直角坐标 pDC->MoveTo(rectPicture.left, rectPicture.top + (rectPicture.Height() / 2)); pDC->LineTo(rectPicture.right, rectPicture.top + (rectPicture.Height() / 2)); pDC->MoveTo(rectPicture.left + (rectPicture.Width() / 2), rectPicture.top); pDC->LineTo(rectPicture.left + (rectPicture.Width() / 2), rectPicture.bottom); // 恢复旧画笔 pDC->SelectObject(pOldPen); // 删除坐标画笔 newPen.DeleteObject(); --------------------- 原文:https://blog.csdn.net/lijiayu2015/article/details/52885475