本文整理汇总了C++中CPaintDC::Polyline方法的典型用法代码示例。如果您正苦于以下问题:C++ CPaintDC::Polyline方法的具体用法?C++ CPaintDC::Polyline怎么用?C++ CPaintDC::Polyline使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPaintDC
的用法示例。
在下文中一共展示了CPaintDC::Polyline方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DrawAd
void CHeaderDockPane::DrawAd(CPaintDC & dc)
{
//CPaintDC dc(this);
//CDC pDC;
//pDC.CreateCompatibleDC(&dc);
CRect rect;
GetClientRect(&rect);
if(rect.right > 500)
{
CBrush bg;
bg.CreateStockObject(RGB(0,0,0));
CBrush fillBrush(RGB(250, 0, 0));
CBrush *oldFillBrush = dc.SelectObject(&fillBrush);
//rect = CRect( CPoint(rect.left, rect.top), CPoint(rect.right, rect.bottom - 2) );
//rect = CRect( CPoint(200, 5), CPoint(400, 25) );
//dc.FillRect(&rect, &bg);
int height = 22;
int progress_x = rect.right - 300 - 1;
int progress_y = -22;
CPoint prorgess_border_points[5];
prorgess_border_points[0] = CPoint(progress_x, progress_y);
prorgess_border_points[1] = CPoint(progress_x, progress_y + height);
prorgess_border_points[2] = CPoint(progress_x+(rect.right - progress_x)-20 - 1, progress_y + height);
prorgess_border_points[3] = CPoint(progress_x+(rect.right - progress_x)-20 - 1, progress_y);
prorgess_border_points[4] = CPoint(progress_x, progress_y);
CPen penOutline(PS_SOLID, 1, RGB(175, 175, 175));
dc.SelectObject(&penOutline);
dc.Polyline(prorgess_border_points, 5);
}
}