zoukankan      html  css  js  c++  java
  • C++ Brush

     

     

     

    关键点

     

     

    实现过程

     

     

    void CCreateBrushView::OnDraw(CDCpDC)
    {
        CCreateBrushDocpDoc = GetDocument();
        ASSERT_VALID(pDoc);
        //创建画刷方法1;
        LOGBRUSH lb;
        lb.lbStyle =BS_HATCHED;
        lb.lbColor=(COLORREF)0x00FF0000;
        lb.lbHatch=HS_CROSS;
        CBrush NewBrush1;
        NewBrush1.CreateBrushIndirect(&lb);
        CBrushpOldBrush1=pDC->SelectObject(&NewBrush1);
        pDC->Rectangle(50,50,200,300);
        pDC->SelectObject(pOldBrush1);
        //创建画刷方法2;
        CBrush NewBrush2((COLORREF)0x0000FF00);
        CBrushpOldBrush2=pDC->SelectObject(&NewBrush2);
        pDC->Rectangle(250,50,400,300);
        pDC->SelectObject(pOldBrush2);
        //创建画刷方法3;
        CBrush NewBrush3(HS_BDIAGONAL,(COLORREF)0x000000FF);
        CBrushpOldBrush3=pDC->SelectObject(&NewBrush3);
        pDC->Rectangle(450,50,600,300);
        pDC->SelectObject(pOldBrush3);

    }

     

     

       


     

    备注

     

     

    相关链接

                               

     

     




  • 相关阅读:
    ZJOI2019爆蛋记
    NOIp2018退役记
    拓展中国剩余定理(exCRT)摘要
    FFT(快速傅里叶变换)摘要
    主席树摘要
    LCT摘要
    替罪羊树摘要
    FHQ Treap摘要
    逻辑回归1-逻辑回归原理详解
    NLP自然语言处理原理及名词介绍
  • 原文地址:https://www.cnblogs.com/xe2011/p/3885698.html
Copyright © 2011-2022 走看看