Related, possible solution: microsoft/CsWin32#111
GetDC is paired with ReleaseDC, not DeleteDC.
DrawIconEx and probably all other APIs taking hdc parameters do not care what kind of DC you pass it, so DeleteDC/ReleaseDC should not be encoded into the names of the types used by any of their parameters.