Hello Friends,
I m trying to display the Digital clock in Symbian. I m using following code snippet.
I am getting WSERV6 Panic on device, But On Emulator It Works fine without any panic.
I m unable to find the solution.
Please guide...
Code:CEikonEnv* eikonEnv=CEikonEnv::Static(); rwss = eikonEnv->WsSession(); RAnimDll clockAnimDll(rwss); TInt err = clockAnimDll.Load(_L("CLOCKA.DLL")); if(err == KErrNone ) { RDigitalClock* bigClock = new RDigitalClock(clockAnimDll, (RWindowBase)Window()); TMargins margin; margin.iLeft=0; margin.iTop = 0; margin.iRight=0; margin.iBottom=0; STimeDeviceShadow tds; tds.iColor = KRgbGray; tds.iIsOn = EFalse; tds.iOffset = TPoint(1,1); bigClock->ConstructL(User::UTCOffset(), TPoint(8,0), TSize(aRect.Width(),30), margin, tds, TRgb::KRgbWhite, 1); TFontSpec MyFontSpec(_L("Arial"), 90); MyFontSpec.iFontStyle.SetStrokeWeight(EStrokeWeightBold); CFbsFont *font = iCoeEnv->CreateScreenFontL(MyFontSpec); _LIT(timebuffer,"%D%M%Y%/0%1%/1%2%/2%3%/3 %-B%:0%J%:1%T%:2%S%:3%+B"); TBuf<252> timeFormat; timeFormat.Copy(timebuffer); TDigitalDisplayTextSection* textSection =new(ELeave) TDigitalDisplayTextSection( font->Handle(), TRgb::KRgbBlack, EDigitalDisplayHorizontalTextAlignmentLeft, EDigitalDisplayVerticalTextAlignmentCenterExclDescent, 0, 0, timeFormat); if(textSection != NULL) { bigClock->AddTextSectionL(*textSection); } bigClock->SetVisible(ETrue); bigClock->Draw(); }



