I have tried moving the #include <afxrich.h> line above and below #include
"stdafx.h", and also inside stdafx.h, both above and below the #include
<windows.h>. By the Visual C++ IDE instructions, it told me to put all
"library" type includes in the stdafx.h file. I did, placing "#include
<afxrich.h>" below "#include <windows.h>", and get the error:
"fatal error C1189: #error : WINDOWS.H already included. MFC apps must not
#include <windows.h>"
This does not make sense to me because the only place that I can find
"#include windows" is in the stdafx.h file, and when I comment that line out,
then I get errors about other terms in the code not being defined (it.
_beginthreadex, _endthreadex).
Thanks again for your interest and help,
MarkC
"Ronald Laeremans [MSFT]" wrote:
You didn't put the include above the include of the precompiled header file
(typically #include "stdafx.h")? If so you need to move it below that.
Ronald Laeremans
Visual C++ team
"markC2004" <ma*******@discussions.microsoft.com> wrote in message
news:F4**********************************@microsof t.com...I have an MDI that I need to change to an RTF MDI.
I have the include:
#include "afxrich.h"
Compiler always stops on the line:
CRichEditView crev;
Errors given:
MDIDEMO.cpp(75) : error C2146: syntax error : missing ';' before
identifier
'crev'
MDIDEMO.cpp(75) : error C2501: 'CRichEditView' : missing storage-class or
type specifiers
MDIDEMO.cpp(75) : fatal error C1004: unexpected end of file found
Error executing cl.exe.
MDIDEMO.obj - 3 error(s), 0 warning(s)
I can open the "afxrich.h" file and see the declaration "class
CRichEditView;", but that doesn't seem to help the compiler any.
Sorry for the elementary question, but I cannot think of any other way to
make the compiler recognize that class.
--
MarkC