If I test on the Desktop DC, this works :
HDC hDC = GetDC(NULL);
HBRUSH hBrush = CreateSolidBrush(RGB(0, 255, 255));
HBRUSH hBrushOld = (HBRUSH)SelectObject(hDC, hBrush);
PatBlt(hDC, 100, 100, 800, 600, PATINVERT);
SelectObject(hDC, hBrushOld);
DeleteObject(hBrush);
ReleaseDC(NULL, hDC);