4c1102c4
by Zhiyi Zhang at 2026-03-12T17:37:08+01:00
comctl32/tab: Use a clip region to protect the tab item background.
Use a clip region to protect the tab item background when drawing the text of an owner-draw tab
control. This partially reverts 0d173d01. Tests show that the top edge of the rcItem in DRAWITEMSTRUCT
shouldn't be added 2 pixels for a owner-draw tab, and the tab item background can't be overwritten
when painting the text, which suggests the presence of a clip region.
Fix the text position being off by 2 pixels for an application, which uses the rcItem in
DRAWITEMSTRUCT to calculate text position.