DwmExtendFrameIntoClientArea doesn't paint border in Win10

Pedro Gil 30 Reputation points
2024-07-26T19:33:39.6933333+00:00

I tested the source example found in https://learn.microsoft.com/en-us/windows/win32/dwm/customframe and it works in Windows 11. However, when testing it in Windows 10, the border disappears when the window is active. On the other hand, when the window is not active the border does appear (please see the attachments).

May I please ask you for any advice to solve this issue in Windows 10?

Thank you very much.

Window active without border.png

Windows inactive with border.png

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,525 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,638 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Pedro Gil 30 Reputation points
    2024-07-27T05:31:48.35+00:00

    Excuse me! I adjust my previous comments. Windows 10 does paint a border but white when the window has the focus. I see that the same happens to Windows Explorer and it seems that it's a normal behaviour that cannot be changed in Windows 10 as mentioned here: https://stackoverflow.com/questions/34414751/dwmextendframeintoclientarea-strange-behaviour-on-windows-10

    Is this approach right? I'd appreciate any comment about it. Thank you.


  2. Pedro Gil 30 Reputation points
    2024-07-28T16:06:44.86+00:00

    Hi Castorix,

    It seems that you send a comment about this topic... but I cannot see your reply for unknown reasons. ;-(

    Could you please resend it? Thank you so much.

    0 comments No comments