Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WM_NCHITTEST Messages #91

Open
Ichisich opened this issue Feb 5, 2022 · 7 comments
Open

WM_NCHITTEST Messages #91

Ichisich opened this issue Feb 5, 2022 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@Ichisich
Copy link

Ichisich commented Feb 5, 2022

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 Ichisich added the enhancement New feature or request label Feb 5, 2022
@Alkl58
Copy link
Owner

Alkl58 commented Feb 7, 2022

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#.

@Ichisich
Copy link
Author

Ichisich commented Feb 7, 2022

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

@RamonUnch
Copy link

related issue: dotnet/wpf#4825

@RamonUnch
Copy link

@Alkl58
Copy link
Owner

Alkl58 commented Mar 6, 2022

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
Copy link
Owner

Alkl58 commented Jan 28, 2024

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

@Ichisich
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants