Ignore:
Timestamp:
Apr 7, 2000, 2:55:16 PM (25 years ago)
Author:
sandervl
Message:

clip fix for WM_NCPAINT

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/win32wbasenonclient.cpp

    r3337 r3341  
    1 /* $Id: win32wbasenonclient.cpp,v 1.20 2000-04-07 10:01:18 sandervl Exp $ */
     1/* $Id: win32wbasenonclient.cpp,v 1.21 2000-04-07 12:55:16 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2 (non-client methods)
     
    972972    DrawTextExA(memDC,buffer,-1,&r,DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX | DT_LEFT | DT_END_ELLIPSIS,NULL);
    973973    DeleteObject (SelectObject (memDC, hOldFont));
     974    IncreaseLogCount();
     975    dprintf(("DrawCaption %s %d", buffer, active));
     976    DecreaseLogCount();
    974977  }
    975978
     
    9971000  DecreaseLogCount();
    9981001
     1002  rect.top    = rect.left = 0;
     1003  rect.right  = rectWindow.right - rectWindow.left;
     1004  rect.bottom = rectWindow.bottom - rectWindow.top;
     1005
     1006  if (clip > 1)
     1007  {
     1008    //only redraw caption
     1009    GetRgnBox(clip,&rectClip);
     1010    //SvL: I'm getting paint problems when clipping a dc created in GetDCEx
     1011    //     with a region that covers the entire window (RealPlayer 7 Update 1)
     1012    //     As we don't need to clip anything when that occurs, this workaround
     1013    //     solves the problem.
     1014    if(rectClip.right == getWindowWidth() && rectClip.bottom == getWindowHeight())
     1015    {
     1016        clip = 0;
     1017        rectClip = rect;
     1018    }
     1019  }
     1020  else
     1021  {
     1022    clip = 0;
     1023    rectClip = rect;
     1024  }
     1025
    9991026  if (!(hdc = GetDCEx( Win32Hwnd, (clip > 1) ? clip : 0, DCX_USESTYLE | DCX_WINDOW |
    10001027                      ((clip > 1) ?(DCX_INTERSECTRGN /*| DCX_KEEPCLIPRGN*/) : 0) ))) return;
    1001 
    1002   rect.top = rect.left = 0;
    1003   rect.right  = rectWindow.right - rectWindow.left;
    1004   rect.bottom = rectWindow.bottom - rectWindow.top;
    1005 
    1006   if (clip > 1)
    1007   {
    1008     //only redraw caption
    1009     GetRgnBox(clip,&rectClip);
    1010   }
    1011   else
    1012   {
    1013     clip = 0;
    1014     rectClip = rect;
    1015   }
    10161028
    10171029  SelectObject( hdc, GetSysColorPen(COLOR_WINDOWFRAME) );
     
    10441056      rect.top += GetSystemMetrics(SM_CYCAPTION);
    10451057    }
    1046     if( !clip || IntersectRect( &rfuzz, &r, &rectClip ) )
     1058    if( !clip || IntersectRect( &rfuzz, &r, &rectClip ) ) 
    10471059      DrawCaption(hdc,&r,active);
    10481060  }
Note: See TracChangeset for help on using the changeset viewer.