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

Proposal: Open source / make publicly available for ReunionCaptionControlsWindow #10294

Open
HO-COOH opened this issue Jan 13, 2025 · 0 comments
Labels
feature proposal New feature proposal needs-triage Issue needs to be triaged by the area owners

Comments

@HO-COOH
Copy link

HO-COOH commented Jan 13, 2025

Proposal:

Open source ReunionCaptionControlsWindow that is used when ExtendsContentIntoTitleBar is set to true, or make this class publicly available, or add a method, something like AttachToHwnd(hwnd)

Summary

I found it quite handy for modernize a standard win32 window utilizing AppWindowTitleBar.ExtendsContentIntoTitleBar.
My use case is putting a webview2 into a blank win32 window (created simply with CreateWindow ), then ExtendsContentIntoTitleBar with it. (Don't ask me why I wouldn't do that with a winui3 window instead, the webview2 control in winui3 is completely unusable to me)
The caption button (that is a child window called ReunionCaptionControlsWindow) is nicely kept in front of the webview child hwnd, the dwm accent color border is nicely kept, and the hit testing is correctly handled (Webview content is shown through the caption bar area, but moving the window and hovering on the caption buttons are correctly routed to the caption buttons, instead of the webview window).

This is my current usage:
Image

Rationale

  • With this proposal, we can more easily modernize a win32 window.
  • Open sourcing it will allow developers more easily customize the caption buttons, (like I need to modify the height, other than the simple Standard / Tall options)

Scope

Capability Priority
Open source ReunionCaptionControlsWindow Must
Allowing creating an instance of ReunionCaptionControlsWindow manually Nice to have
Add customization methods to ReunionCaptionControlsWindow Nice to have

Important Notes

Examples:

ReunionCaptionControlsWindow captionButtonWindow;
captionButtonWindow.Height(56); //56 dip height
SetParent(captionButtonWindow.getHwnd(), parentHwnd);

or

ReunionCaptionControlsWindow captionButtonWindow;
captionButtonWindow.Height(56); //56 dip height
captionButtonWindow.AttachToHwnd(parentHwnd);

Open Questions

@HO-COOH HO-COOH added the feature proposal New feature proposal label Jan 13, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature proposal New feature proposal needs-triage Issue needs to be triaged by the area owners
Projects
None yet
Development

No branches or pull requests

1 participant