We are developing a calculator on S60 and we having problems in displaying "text" on the screen after application has started. How to do it?
I have pasted my Appview.cpp file below
Code:File: myCalculatorAppView.cpp #include <barsread.h> // for resource reader #include <eiklabel.h> // for label controls #include <eikedwin.h> // for CEikEdwin #include <coemain.h> #include <myCalculator.rsg> #include <gulcolor.h> #include "myCalculatorAppView.h" _LIT(KLabelTextA,"hello, this is it."); // Standard construction sequence CmyCalculatorAppView* CmyCalculatorAppView::NewL(const TRect& aRect) { CmyCalculatorAppView* self = CmyCalculatorAppView::NewLC(aRect); CleanupStack::Pop(self); return self; } CmyCalculatorAppView* CmyCalculatorAppView::NewLC(const TRect& aRect) { CmyCalculatorAppView* self = new (ELeave) CmyCalculatorAppView; CleanupStack::PushL(self); self->ConstructL(aRect); return self; } CmyCalculatorAppView::CmyCalculatorAppView() :iLabelAA(NULL) { // no implementation required } CmyCalculatorAppView::~CmyCalculatorAppView() { delete iLabelAA; } void CmyCalculatorAppView::ConstructL(const TRect& aRect) { // Create a window for this application view CreateWindowL(); CEikLabel* iLabelAA; iLabelAA = new (ELeave) CEikLabel; iLabelAA->SetContainerWindowL(*this); iLabelAA->SetTextL(KLabelTextA); iLabelAA->OverrideColorL( EColorLabelTextEmphasis, KRgbRed ); iLabelAA->SetEmphasis( CEikLabel::EPartialEmphasis ); iLabelAA->SetExtent( TPoint(10,10), iLabelAA->MinimumSize() ); // Set the windows size SetRect(aRect); // Activate the window, which makes it ready to be drawn ActivateL(); } // Draw this application's view to the screen void CmyCalculatorAppView::Draw(const TRect& aRect) const { // Get the standard graphics context CWindowGc& gc = SystemGc(); // Gets the control's extent TRect rect = Rect(); // Clears the screen gc.Clear(rect); gc.DrawRect(aRect); }



