// System includes #include <eikrted.h> // CCEikRichTextEditor #include <txtfrmat.h> // TCharFormatMask
// CLASS DECLARATION
/** * * @class CRichTextEditorRichTextEditor RichTextEditorContainer.h * @brief This is the rich text editor class for a Rich Text Editor example based on the * standard Symbian OS architecture. * * Copyright (c) EMCC Software Ltd 2003 * @version 1.0 * */ class CSypherQueryRichTextEditor : public CEikRichTextEditor { public: // Constructors and destructor
You have posted the header here. I beleive you would also have a cpp file for it in which you would write code for all the functions declared here.
You can write the code of TCharFormat in the constructl function. This would make all your editors of the formatting that you have done in contructl by default.
"SypherQueryRichTextEditor.cpp": Call to undefined function 'LatinBold12' in function CSypherQueryRichTextEditor::ConstructL() at line 34 "SypherQueryRichTextEditor.cpp": Pointer to structure required on left side of -> or ->* in function CSypherQueryRichTextEditor::ConstructL() at line 34
Forum posts: 53
TCharFormatMask charFormatMask;
charFormatMask.SetAttrib(EAttColor);
charFormat.iFontPresentation.iTextColor = KRgbBlack;
charFormat.iFontSpec = LatinBold12()->FontSpecInTwips();
charFormatMask.SetAll();
....
iFormFieldId->ApplyCharFormatL(charFormat, charFormatMask);
Forum posts: 114
This is my rich text editor header file:
#ifndef SYPHERQUERYRICHTEXTEDITOR_H
#define SYPHERQUERYRICHTEXTEDITOR_H
// INCLUDES
// System includes
#include <eikrted.h> // CCEikRichTextEditor
#include <txtfrmat.h> // TCharFormatMask
// CLASS DECLARATION
/**
*
* @class CRichTextEditorRichTextEditor RichTextEditorContainer.h
* @brief This is the rich text editor class for a Rich Text Editor example based on the
* standard Symbian OS architecture.
*
* Copyright (c) EMCC Software Ltd 2003
* @version 1.0
*
*/
class CSypherQueryRichTextEditor : public CEikRichTextEditor
{
public: // Constructors and destructor
static CSypherQueryRichTextEditor* NewL();
static CSypherQueryRichTextEditor* NewLC();
private: // Constructor
void ConstructL();
public: // from CoeControl
TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
public: // members
void SetUnderlineOn (TBool aOn);
void SetBoldOn (TBool aOn);
void AddCarriageReturnL ();
void AddTextL (const TDesC& aText);
void DisplayStartOfHelpTextL();
private: //data
TCharFormatMask iCharFormatMask; // current formatting, e.g bold etc
TCharFormat iCharFormat; // current formatting, e.g bold etc
};
#endif // #ifndef SYPHERQUERYRICHTEXTEDITOR_H
// End of File
Forum posts: 15
You can write the code of TCharFormat in the constructl function. This would make all your editors of the formatting that you have done in contructl by default.
good luck
Forum posts: 114
My .cpp file
void CSypherQueryRichTextEditor::ConstructL()
{
TResourceReader reader;
iCharFormatMask.SetAttrib(EAttColor);
iCharFormat.iFontPresentation.iTextColor = KRgbBlack;
iCharFormat.iFontSpec = LatinBold12()->FontSpecInTwips();
iCharFormatMask.SetAll();
iCoeEnv->CreateResourceReaderLC(reader, R_SYPHERQUERY_UPDATES_TEXT_EDITOR);
ConstructFromResourceL(reader);
CleanupStack::PopAndDestroy(); // reader
SetFocus(ETrue);
}
error
"SypherQueryRichTextEditor.cpp": Call to undefined function 'LatinBold12' in function CSypherQueryRichTextEditor::ConstructL() at line 34
"SypherQueryRichTextEditor.cpp": Pointer to structure required on left side of -> or ->* in function CSypherQueryRichTextEditor::ConstructL() at line 34
dunno what's wrong