You can see the sample I had uploaded where I use SetBorderAndTitleBar, with transparency (layered window)
and PointerMoved and others to move the window :
https://github.com/castorix/WinUI3_SwapChainPanel_Layered
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I am working on the WinUI3 desktop application with C++. I discovered how windows significantly allow us to customize the title bar in this link. But it also said, it will reserve the Top Right/Top Left corner for the Min, Max, and Close buttons which windows will handle.
How can we get control over the Min, Max, and Close buttons, suppose I want to show only the Close button, or I want to use my custom button for Min, Max, and Close. How to get control over the Min, Max, and Close buttons when we use Window Title customization?
I tried using Win32 APIs as SetWindowLongPtr(windowhandle, GWL_STYLE, WS_POPUP);
, Even with this, I was not able to remove the Min, Max, or Close buttons after setting WinUIWindow.ExtendsContentIntoTitleBar = true;
It would be great if you could help me remove Min, Max, and Close buttons when I use title bar customization.
Thank You
You can see the sample I had uploaded where I use SetBorderAndTitleBar, with transparency (layered window)
and PointerMoved and others to move the window :
https://github.com/castorix/WinUI3_SwapChainPanel_Layered
Hello,
Welcome to Microsoft Q&A!
As far as I'm concerned, you couldn't remove Min Max Close button with tittle bar customization.
According to the Doc: Title bar customization
When you opt-in to full title bar customization, your app's client area is extended to cover the entire window, including the title bar area. You are responsible for drawing and input-handling for the entire window except the caption buttons, which are still provided by the window.
That area is a reserved area. If you want to hide the buttons, you could try to extend your content into the title bar area.
Thank you.
Jeanine
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.