NotEnoughAV1Encodes icon indicating copy to clipboard operation
NotEnoughAV1Encodes copied to clipboard

WM_NCHITTEST Messages

Open Ichisich opened this issue 3 years ago • 7 comments

Currently, NEAV1E lacks any distinction and reports every part of its GUI as WM_NCHITTEST=1 (In a client area). Would be nice to have more distinctions, especially title bar=2, minimize button=8, maximize button=9 and close button=20 are often used in scripts and window-management tools.

Documentation: https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-nchittest

Ichisich avatar Feb 05 '22 11:02 Ichisich

I can't seem to find good information about this.

You documentation you send is for C++ and for win32 Apps - this however is WPF on C#.

Alkl58 avatar Feb 07 '22 21:02 Alkl58

Indeed, I searched and the documentation for WPF is quite lacking. WM_NCHITTEST messages get at least mentioned in the issue tracker of dotnet/wpf, but nothing helpful how to implement them.

WPF applications definitely send some kind of messages though. PowerToys titlebar(correct); Powertoys

NEAV1E titlebar(wrong): NEAV1E

UWP applications for example often have a mixed "titlebar". Movies&TV (kinda): Filme

Ichisich avatar Feb 07 '22 23:02 Ichisich

related issue: https://github.com/dotnet/wpf/issues/4825

RamonUnch avatar Feb 16 '22 18:02 RamonUnch

I guess also this could help: https://stackoverflow.com/questions/69797178/support-windows-11-snap-layout-in-wpf-app

RamonUnch avatar Feb 16 '22 19:02 RamonUnch

After some further investigating it is an issue with WPF and MahApps.Metro/ControlzEx. So we have to wait for them to update their packages with the nescessary fixes.

Alkl58 avatar Mar 06 '22 15:03 Alkl58

Not sure if this issue still applies, as I updated MahApps.Metro to a Pre-Release version which supports the Windows 11 snap layout and rounded corners. Maybe this fixed the WM_NCHITTEST?

Screenshot 2024-01-29 002233

Alkl58 avatar Jan 28 '24 23:01 Alkl58

The titlebar is still wrong, but the buttonbox is now correctly classified.

Ichisich avatar Jan 29 '24 08:01 Ichisich