|
|
Home » U++ Library support » RichText,QTF,RTF... » (Basic) error inheriting RichEditWithToolbar
(Basic) error inheriting RichEditWithToolbar [message #30139] |
Sat, 11 December 2010 09:54 |
alex100
Messages: 118 Registered: November 2007
|
Experienced Member |
|
|
I am trying to write a class named CMyRichEditWithToolbar to implement more methods. I have this:
(.H)
#ifndef _my_rich_ed_w_t_h
#define _my_rich_ed_w_t_h
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
class CMyRichEditWithToolbar : public RichEditWithToolBar
{
public:
CMyRichEditWithToolbar();
};
#endif
(.CPP)
#include "MyRichEditWithToolbar.h"
CMyRichEditWithToolbar::CMyRichEditWithToolbar()
{
//Do I have to call something here?
}
The project has already all the support for RichText and for RichEdit. If I use RichTextWithToolbar it compiles and runs well.
When I compile CMyRichEditWithToolbar I see:
MyRichEditWithToolbar.cpp
In file included from C:\upp\MyApps\Example\MyRichEditWithToolbar.cpp:1:
C:\upp\MyApps\Example\/MyRichEditWithToolbar.h:8: error: expected class-name before '{' token
Example: 1 file(s) built in (0:02.99), 2994 msecs / file, duration = 3054 msecs
There were errors. (0:03.78)
It seems a basic C++ error but I cant soolve it alone.
Thanks a lot
Alex
[Updated on: Sat, 11 December 2010 09:56] Report message to a moderator
|
|
|
Re: (Basic) error inheriting RichEditWithToolbar [message #30144 is a reply to message #30139] |
Sat, 11 December 2010 18:16 |
|
alex100 wrote on Sat, 11 December 2010 09:54 | I am trying to write a class named CMyRichEditWithToolbar to implement more methods. I have this:
(.H)
#ifndef _my_rich_ed_w_t_h
#define _my_rich_ed_w_t_h
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
class CMyRichEditWithToolbar : public RichEditWithToolBar
{
public:
CMyRichEditWithToolbar();
};
#endif
(.CPP)
#include "MyRichEditWithToolbar.h"
CMyRichEditWithToolbar::CMyRichEditWithToolbar()
{
//Do I have to call something here?
}
The project has already all the support for RichText and for RichEdit. If I use RichTextWithToolbar it compiles and runs well.
When I compile CMyRichEditWithToolbar I see:
MyRichEditWithToolbar.cpp
In file included from C:\upp\MyApps\Example\MyRichEditWithToolbar.cpp:1:
C:\upp\MyApps\Example\/MyRichEditWithToolbar.h:8: error: expected class-name before '{' token
Example: 1 file(s) built in (0:02.99), 2994 msecs / file, duration = 3054 msecs
There were errors. (0:03.78)
It seems a basic C++ error but I cant soolve it alone.
Thanks a lot
Alex
|
Hi Alex,
The problem is probably that RichEditWithToolbar is not declared. I believe you forgot to add the RichEdit pacakge to your package and/or "#include <RichEdit/RichEdit.h>".
Best regards,
Honza
|
|
|
|
Goto Forum:
Current Time: Sat Sep 21 03:02:41 CEST 2024
Total time taken to generate the page: 0.03616 seconds
|
|
|