melak47/BorderlessWindow

Drag when in the top area in borderless mode

Closed this issue · 1 comments

When the window is borderless, the window can be dragged by cursor from anywhere in the client RECT area.
Is there any method in which we can only enable dragging when its within some area from the top?

The reason being, I want to create my own custom title bar (what should be considered as the HTCAPTION area) for windows.

example
Something like this, I am aiming for.

You can make any region you want act like that by returning HTCAPTION from WM_NCHITTEST.