• Jinoh Kang's avatar
    riched20: Don't assume that TxDraw preserves the device context's brush selection. · 51997177
    Jinoh Kang authored
    Today, RichEditWndProc_common assumes that ITextServices::TxDraw
    preserves the brush selection of the given device context.  However,
    this invariant may be broken by misbehaving embedded OLE objects in the
    text document.
    
    Fix this by not assuming that the return value of the second
    SelectObject() call equals the brush passed to the first SelectObject()
    call in RichEditWndProc_common's WM_PAINT / WM_PRINTCLIENT case.
    
    (cherry picked from commit 2027be7e)
    51997177
txthost.c 58 KB