on-internet
← Community

How do I get rid of default drawing of min/max/close buttons in DWM managed window?

Stack Overflow ·

There is a famous tutorial: Custom Window Frame Using DWM. Everything works as expected (Windows 11), but now I want to get rid of default drawing of Minimize / Maximize / Close buttons (to draw them on my own wherever I want with WM_NCHITTEST). Even if I don't call DwmDefWindowProc(), DWM still draws the buttons (but does not process clicking etc). What I tried: Handling WM_NCPAINT. Some wrote, it's incompatible with DWM. When I try just to handle it (either return 0; or simply don't call DefWindowProc()), the window starts flickering on resize + my WM_NCHITTEST-related code stops working (I

Comments

Sign in or sign up to comment and upvote.

No comments yet.