When window class has CS_CLASSDC style we should not remove the DC

when destroying the window.
This commit is contained in:
Jim Aston 1999-11-07 23:36:09 +00:00 committed by Alexandre Julliard
parent bb558b7a1a
commit f0b27edfdc
1 changed files with 13 additions and 10 deletions

View File

@ -158,20 +158,23 @@ void DCE_FreeWindowDCE( WND* pWnd )
{
if( pDCE->hwndCurrent == pWnd->hwndSelf )
{
if( pDCE == pWnd->dce ) /* owned DCE */
if( pDCE == pWnd->dce ) /* owned or Class DCE*/
{
pDCE = DCE_FreeDCE( pDCE );
pWnd->dce = NULL;
continue;
if (pWnd->class->style & CS_OWNDC) /* owned DCE*/
{
pDCE = DCE_FreeDCE( pDCE );
pWnd->dce = NULL;
continue;
}
else if( pDCE->DCXflags & (DCX_INTERSECTRGN | DCX_EXCLUDERGN) ) /* Class DCE*/
{
DCE_DeleteClipRgn( pDCE );
pDCE->hwndCurrent = 0;
}
}
else
{
if(!(pDCE->DCXflags & DCX_CACHE) ) /* class DCE */
{
if( pDCE->DCXflags & (DCX_INTERSECTRGN | DCX_EXCLUDERGN) )
DCE_DeleteClipRgn( pDCE );
}
else if( pDCE->DCXflags & DCX_DCEBUSY ) /* shared cache DCE */
if( pDCE->DCXflags & DCX_DCEBUSY ) /* shared cache DCE */
{
ERR("[%04x] GetDC() without ReleaseDC()!\n",
pWnd->hwndSelf);