device context handler, acquired by win32 API function "GetDC"
must be released by win32 API function "ReleaseDC".
there is no "ReleaseDC" call in pixel(x, y) function.
so, add contextmanager __win32_openDC(hWnd)
usage:
|with __win32_openDC(hWnd) as hDC:
| # -- codes --
| raise Exception("some error")
|#windll.gdi32.ReleaseDC(hWnd, hDC) automatically called
device context handler, acquired by win32 API function "GetDC" must be released by win32 API function "ReleaseDC". there is no "ReleaseDC" call in pixel(x, y) function. so, add contextmanager __win32_openDC(hWnd)
usage: |with __win32_openDC(hWnd) as hDC: | # -- codes -- | raise Exception("some error") |#windll.gdi32.ReleaseDC(hWnd, hDC) automatically called
↓this is testcase testcase.zip