Share via

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 for business | Windows Client for IT Pros | User experience | Other
0 comments No comments

Your answer

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