1

Help me please, as in Windows 10 standard RichEdit control switch to DirectWrite mode. I need RichEdit to draw text using DirectWrite. I get a pointer to ITextDocument2, but what should I do next? Thank you in advance!

CRichEditCtrl m_richEdit;
m_richEdit.Create(WS_CHILD | WS_VISIBLE | ES_MULTILINE, CRect(10,10,400,270), this, 100);

CComPtr<IRichEditOle> richEditOle;
::SendMessage(m_richEdit.m_hWnd, EM_GETOLEINTERFACE, 0, (LPARAM)&richEditOle);

CComPtr<ITextDocument2> document;
HRESULT hr = richEditOle->QueryInterface( _uuidof(ITextDocument2), (void **)&document);
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
Oleg
  • 11
  • 2
  • When asking questions, you need to add some context and even code. – Miro J. Mar 28 '18 at 15:52
  • The question is what do you want to do exactly? The fact that they switched to DirectWrite should not be visible from existing API. – bunglehead Mar 30 '18 at 12:07
  • Didn't rich edit stop at [version 4.1](https://msdn.microsoft.com/en-us/library/windows/desktop/bb787873(v=vs.85).aspx)? – user7860670 Apr 01 '18 at 19:31
  • 1
    https://blogs.msdn.microsoft.com/murrays/2013/09/07/richedit-8-feature-additions/ – Oleg Apr 02 '18 at 07:05

0 Answers0