如题

解决方案 »

  1.   

    Specifies whether the background within the update region is to be erased when the update region is processed. If this parameter is TRUE, the background is erased when the BeginPaint function is called. If this parameter is FALSE, the background remains unchanged. 
    这个是参数三的介绍~~~
    怎么会没有影响呢???
      

  2.   

    看个例子:
    POINT aptPentagon[6] = {50,2, 98,35, 79,90, 21,90, 2,35, 50,2}, 
          aptHexagon[7]  = {50,2, 93,25, 93,75, 50,98, 7,75, 7,25, 50,2}; 
    POINT *ppt = aptPentagon; 
    int cpt = 6; 
     
      . 
      . 
      . 
     
    case WM_CHAR: 
        switch (wParam) 
        { 
            case '5': 
                ppt = aptPentagon; 
                cpt = 6; 
                break; 
            case '6': 
                ppt = aptHexagon; 
                cpt = 7; 
                break; 
        } 
        InvalidateRect(hwnd, NULL, TRUE); 
        return 0L; 
     
    case WM_PAINT: 
        hdc = BeginPaint(hwnd, &ps); 
        GetClientRect(hwnd, &rc); 
        SetMapMode(hdc, MM_ANISOTROPIC); 
        SetWindowExtEx(hdc, 100, 100, NULL); 
        SetViewportExtEx(hdc, rc.right, rc.bottom, NULL); 
        Polyline(hdc, ppt, cpt); 
        EndPaint(hwnd, &ps); 
        return 0L; 
    这个是MSDN上面的例子:
    说明如下:
    假如是没有设置最后一个参数为TRUE,那么背景就没有被擦去~~~
      

  3.   


    Specifies whether the background within the update region is to be erased when the update region is processed. If this parameter is TRUE, the background is erased when the BeginPaint function is called. If this parameter is FALSE, the background remains unchanged.
    这个是参数三的介绍~~~
    怎么会没有影响呢???
    -----------------------MSDN上的解释当然看了
    但在实际做时把它设为T 或  F  时的效果都是一样的啊
      

  4.   

    哦  
    看到效果了
    ths alt