2

I am using for a C++ LIbrary WTL10 from Microsoft. If i want to compile it in VS19, i will get an error, that says WTL10 requieres Richedit version 3 or higher.

Here is the code from atlctrls.h

#if (_RICHEDIT_VER < 0x0300)
    #error WTL10 requires RichEdit version 3 or higher
#endif

But i got in afxwin.h :

#define _RICHEDIT_VER 0x0210

How can i upgrade it? I never upgraded dlls manually, so i wanted to ask here and i could not find help with google for richedit.

hkn27
  • 51
  • 5

1 Answers1

2

------- Found a solution ------

You have to insert

#undef _RICHEDIT_VER

after

<afxwin.h>

Like this:

#include <afxwin.h>         // MFC core and standard components
#undef _RICHEDIT_VER

RICHEDIT.H will define_RICHEDIT_VER to the newest version

hkn27
  • 51
  • 5
  • It's a fine work around. It's regretful that seems no one uses MFC anymore. – Zhang Jun 08 '20 at 06:48
  • I agree that new projects may not be using MFC. But there is still active MFC development going on as those projects were started 15-25 years back. And migrating to other tech is expensive. – Gautam Jain Oct 27 '20 at 06:24