Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / November 2004

Tip: Looking for answers? Try searching our database.

Cannot compile VC++ 6.0 with CRichEditView

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
markC2004 - 19 Nov 2004 05:25 GMT
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.
Signature

MarkC

Ronald Laeremans [MSFT] - 19 Nov 2004 23:32 GMT
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

>I have an MDI that I need to change to an RTF MDI.
>
[quoted text clipped - 20 lines]
> Sorry for the elementary question, but I cannot think of any other way to
> make the compiler recognize that class.
markC2004 - 22 Nov 2004 20:57 GMT
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

> 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.
[quoted text clipped - 26 lines]
> > Sorry for the elementary question, but I cannot think of any other way to
> > make the compiler recognize that class.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.