What is the default/preferred size of the hit-test area for resizing a window?

thebluetropics 1,046 Reputation points
2022-10-29T10:50:49.95+00:00

I am trying to replace the standard window frame with a custom window frame using DWM.
It seems I need to handle the WM_NCHITTEST.

What is the default, preferred size of "window resize" hit-test area?

An illustration is shown in this image:

255304-image.png

[Red] Left and Right
[Blue] Top and Bottom
[Green] Corners

But I have tested other applications too, it seems most of these windows uses this layout:

255341-image.png

Is this true?

What is the preferred size of the hit-test borders and corners:

  • top, left, bottom, right
  • corners

My guess is 8px each.

I also see other apps uses this layout too:

255296-image.png

I have an assumption that image 2 and image 3 is a matter of preference, depends of the application interface layout itself...

Windows development | Windows API - Win32
Developer technologies | C++
{count} vote

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.