Print Page | Close Window

Maximizeapp frame bleeds/encroaches second monitor

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=24595
Printed Date: 17 October 2025 at 2:26am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Maximizeapp frame bleeds/encroaches second monitor
Posted By: rdhd
Subject: Maximizeapp frame bleeds/encroaches second monitor
Date Posted: 20 August 2025 at 2:53pm
We have an issue with our CJ 24.2 (and earlier) based frame windows. When the frame theme is enabled and we maximize the window, the frame bleeds over into an adjacent monitor. To see this run the Codejock Ribbon Sample. Put it on a monitor to the left of the main monitor and maximize it.

Part of the frame display appears on the adjacent monitor. If I move the app to the monitor to the right of my main monitor, I don't always see the display issue. But as I maximize and unmaximize the frame I can see part of the left edge of the frame flash on the main (middle monitor).

Print screen, Snip and other tools I try to use to capture the display don't grab it. So I used my iPhone to do so. In the image scroll right until you get to the edges of the two monitors and you can see a light line appearing on the right monitor. I also attached a zip file of an mp4 I captured showing the flashing of part of the frame when I am maximizing and restoring the ribbon sample app. Its only about 5s long and at about 2.5s you will see a flashing display. I'm currently stepping thru the display code to see what causes it. I thought at first it was the shadow but I set a break point where the shadow is created when setting the frame theme and skipped the call to create it. I also verified GetShadow returns null. I also eliminated scaled desktops (DPI > 96) as this shows up whether the desktop is scaled or not.




Replies:
Posted By: rdhd
Date Posted: 20 August 2025 at 2:57pm


Posted By: rdhd
Date Posted: 20 August 2025 at 2:59pm
uploads/3213/maxapp.zip" rel="nofollow - uploads/3213/maxapp.zip

So I hope this one shows up as the post appeared with no image. I don't even see the zip of the mp4. Perhaps they show up later.



Posted By: rdhd
Date Posted: 20 August 2025 at 3:00pm
uploads/3213/Recording_2025-08-20_134737_2025-08-20_15-00-43.zip" rel="nofollow - uploads/3213/Recording_2025-08-20_134737_2025-08-20_15-00-43.zip


Posted By: rdhd
Date Posted: 21 August 2025 at 8:27am
Here's an image of my entire desktop. Three monitors and our app is maximized on the middle monitor. I drew rectangles around the display that spills onto the left and right monitors. My monitors are quite large so the image is too. The left monitor isn't as tall as the other two so the white at the bottom of that part of the image is just part of the virtual desktop.






Posted By: rdhd
Date Posted: 21 August 2025 at 8:30am
uploads/3213/maxapp_2025-08-21_08-29-47.zip" rel="nofollow - uploads/3213/maxapp_2025-08-21_08-29-47.zip

So the image posted looks nothing like the preview as the post is scaled way down making it difficult to see the bleeding frame of our app. So here it is in a zip file.



Posted By: dbrookes
Date Posted: 15 September 2025 at 4:12am
Are you guys using `DwmSetWindowAttribute` to enable Windows 11 rounded corners?

If so I had a issue where enabling on our main window caused a very similar looking bleed when maximized.

We ended up updating the corner preference to "do not round" when the window was "zoomed" (maximized). We just update than on `WM_SIZE` depending on the flag (SIZE_MAXIMIZED or SIZE_RESTORED).

Also make sure to disable the XTP command bars frame hook shadows if using Windows 11 rounded corners. They'll do the shadow for you and XTP shadows interfere with that.


Posted By: rdhd
Date Posted: 22 September 2025 at 9:31am
Hi dbrookes,

I would have posted this sooner but our IT guys blocked this website due to a certificate issue (out of date if I recall):

Yes I do use DwmSetWindowAttribute as our UI team asked why we don't have rounded corners like the other apps on Win11. I was looking at the Windows "snap" work around I had put in place and also the shadow thinking it was one of those. Then when I duplicated the problem but could not with my floating MDI windows which I implemented (not using CJ tear offs) I posted and moved on. I figured CJ would fix the issue.

In any case I just skipped the call to DwmSetWindowAttribute and as you indicated, the bleeding onto adjacent monitors doesn't occur. I'll go into our sizing code which I already have handlers for and add and remove the attribute as necessary. And, I have a "super maximize" mode where I "maximize" our app across multiple monitors and I already saw the rounded corner when I go super max which I don't really like. I am not really using SC_MAXIMIZE when I do that because Windows will immediately maximize the app on one of my monitors. So when I'm in that mode I'll remove the attribute too.

Oh, and I don't know if you noticed but a Windows update fixed a "quirk" where enum monitors sends info on the primary monitor with the sizes not DPI scaled when running using system aware DPI context. Workarounds for that "quirk" now fail. My gitHub copilot informed me which versions have the quirk and which don't.

I owe you big time!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net