Ignore:
Timestamp:
May 6, 2003, 3:50:37 PM (22 years ago)
Author:
sandervl
Message:

ReleaseDC check if hwnd parameter is correct (WindowFromDC(hdc)); Messagebox: Wrong ReleaseDC call

File:
1 edited

Legend:

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

    r10061 r10076  
    1 /* $Id: win32wbase.cpp,v 1.371 2003-05-02 17:18:57 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.372 2003-05-06 13:50:37 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    41114111    }
    41124112
     4113    lock(&critsect);
    41134114    int j = 0;
    41144115    for(int i=0;i<MAX_OPENDCS && j<nrOpenDCs;i++) {
     
    41184119        }
    41194120    }
     4121    unlock(&critsect);
    41204122    *pnrdcs = nrOpenDCs;
    41214123    return TRUE;
     
    41344136void Win32BaseWindow::addOpenDC(HDC hdc)
    41354137{
     4138    lock(&critsect);
    41364139    for(int i=0;i<MAX_OPENDCS;i++) {
    41374140        if(hdcWindow[i] == 0) {
     
    41404143        }
    41414144    }
     4145    unlock(&critsect);
    41424146    if(i == MAX_OPENDCS) {
    41434147        DebugInt3(); //no room!
     
    41454149    }
    41464150
     4151    dprintf2(("Win32BaseWindow::addOpenDC %x %x %d", getWindowHandle(), hdc, nrOpenDCs+1));
    41474152    nrOpenDCs++;
    41484153}
     
    41614166{
    41624167    if(nrOpenDCs == 0) {
     4168        dprintf(("Win32BaseWindow::removeOpenDC %x hdc %x not found!! (1)", getWindowHandle(), hdc));
    41634169        DebugInt3();
    41644170        return;
    41654171    }
     4172    lock(&critsect);
    41664173    for(int i=0;i<MAX_OPENDCS;i++) {
    41674174        if(hdcWindow[i] == hdc) {
     
    41704177        }
    41714178    }
     4179    unlock(&critsect);
    41724180    if(i == MAX_OPENDCS) {
     4181        dprintf(("Win32BaseWindow::removeOpenDC hdc %x not found!!", hdc));
    41734182        DebugInt3(); //not found
    41744183        return;
    41754184    }
     4185    dprintf2(("Win32BaseWindow::removeOpenDC %x %x", getWindowHandle(), hdc, nrOpenDCs-1));
    41764186    nrOpenDCs--;
    41774187}
Note: See TracChangeset for help on using the changeset viewer.