Hit Test Return Values

This section lists the hit test code values that are returned in the pwHitTestCode parameter of the HitTestThemeBackground function. The code values returned depend on the hit test options specified in the dwOptions parameter of the HitTestThemeBackground function. For a list of the options, see Hit Test Options.

Return Values

The following table lists the hit test options and the corresponding return codes.

SymbolicCodeDescription
HTBOTTOMHit test succeeded in the bottom border segment.
HTBOTTOMLEFTHit test succeeded in the bottom and left border intersection.
HTBOTTOMRIGHTHit test succeeded in the bottom and right border intersection.
HTCLIENTHit test succeeded in the middle background segment.
HTLEFTHit test succeeded in the left border segment.
HTNOWHEREHit test succeeded outside the control or on a transparent area.
HTRIGHTHit test succeeded in the right border segment.
HTTOPHit test succeeded in the top border segment.
HTTOPLEFTHit test succeeded in top and left border intersection.
HTTOPRIGHTHit test succeeded in the top and right border intersection.
HTCAPTIONHit test succeeded in the top, top left, or top right background segments.
HTBORDERHit test succeeded in any background segment except the middle background segment.
12 entries

Article text from the Win32 documentation (opens in a new tab), by Microsoft, under the CC BY 4.0 (opens in a new tab) licence.