×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Oct 2008
    Location
    India
    Posts
    184

    Unhappy Unable to show Digital clock: RDigitalClock

    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();
    
    	}
    Thanks & Regards,
    --PRANAY--

  2. #2
    Registered User
    Join Date
    Oct 2008
    Location
    India
    Posts
    184

    Re: Unable to show Digital clock: RDigitalClock

    Hello Friends,

    I m waiting for reply.....
    Is anybody having any Idea Regarding this..

    Please Guide.

    Thanx.
    Thanks & Regards,
    --PRANAY--

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,752

    Re: Unable to show Digital clock: RDigitalClock

    You can check if the open source Symbian code still has+uses this API, and how. http://developer.symbian.org, and search for it (like RDigitalClock) in the source. If you find folders like tsrc, tinc and similar, there are test codes which can be interesting.

Similar Threads

  1. Digital clock
    By deepakskole2006 in forum Mobile Java General
    Replies: 4
    Last Post: 2006-07-19, 16:05
  2. about analog and digital clock
    By kmsoomro in forum Symbian User Interface
    Replies: 3
    Last Post: 2006-05-12, 09:11

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×