RichEditD2D inserts everything with alpha

maj soklič 0 Reputation points
2025-03-08T16:52:03.44+00:00

When using Richedit20W and switching it to D2D with

    SendMessage(hRichEdit, EM_SWITCHTOD2D, 0, 0);

and using

    int backdrop = 3;
    DwmSetWindowAttribute(hwnd, DWMWA_SYSTEMBACKDROP_TYPE, &backdrop, sizeof(backdrop));

    MARGINS margins = { -1 };
    DwmExtendFrameIntoClientArea(hwnd, &margins);

Both text and images are inserted with transparency, unlike with Richedit20W and 50" where D2D mode isn't enabled;User's image

Non Direct2D:

User's image

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,980 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.