×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Regular Contributor
    Join Date
    Mar 2007
    Posts
    235

    Question Help bitmap not showing

    I am trying to create a custom drawn bitmap and trying to draw it on screen . All I can see is a different bitmap (actually the bitmap currently selected before )drawn on screen . Is there any solution ? I just want to write into a bitmap first that is not a part of screen and then make it drawn on screen.
    My codes are as follows
    Code:
     #include "Drawer.h"
    #include <AknExGrid.mbg>
     /*
      * Concepts:
      * !Drawing on top of Phone screen! 
      */
    
    // ================= MEMBER FUNCTIONS =======================
    
    TInt CDrawer::Period(TAny* aObject)
    	{		
    		((CDrawer*)aObject)->Ticker();		
    	    return 1;
    //	    if(inum==1)
    //	    	iAppUi->TransferControlfromTicker();
    	}
    
    void CDrawer::ConstructL(const TRect& aRect,TInt aNum,TRgb aTickBackCl, TRgb aTickFontCl ,TInt aInterval)
    	{	
    	.....
    	iRootScreenDevice->GetDefaultScreenSizeAndRotation(SizeAndRotation);
    	
    	//WindowGroup
    	iRootWindowGroup=RWindowGroup(iWsSession);
    	User::LeaveIfError(iRootWindowGroup.Construct((TUint32)&iRootWindowGroup, EFalse));
    	iRootWindowGroup.SetOrdinalPosition(0,ECoeWinPriorityAlwaysAtFront);
    	iRootWindowGroup.EnableReceiptOfFocus(EFalse);
    	....
    
    	iPeriodic = CPeriodic::NewL(CActive::EPriorityHigh);
    	TTimeIntervalMicroSeconds32 Start=500;
    	TTimeIntervalMicroSeconds32 Interval=aInterval*10000;
    	iPeriodic->Start(Start,Interval,TCallBack(Period, this));
    	
    	.....
        ////////////capture key
    	iRootWindow.Activate();
    	iDrawer = CFbsBitGc::NewL();
    	iBseDevice = CFbsBitmapDevice::NewL(iAppUi->iImageConvertor->Bitmap(46));
    	iNseDevice = CFbsBitmapDevice::NewL(iAppUi->iImageConvertor->Bitmap(45));
    	}
    
    void CDrawer::DoCancel()
    	{
    	if(iPeriodic->IsActive())
    		{iPeriodic->Cancel();
    		delete iPeriodic;
    		}
    	
    	}
    void CDrawer::Ticker()
    	{
    	....
    	
    	}
    
    // Destructor
    CDrawer::~CDrawer()
    	{
    	....
    	}
    
    /.
    
    // ---------------------------------------------------------
    // CDrawer::Draw(const TRect& aRect) const
    // ---------------------------------------------------------
    //
    void CDrawer::Draw() 
    	{	
    	Writer.Set(_L(""));
    //	TFontSpec MyeFontSpec (_L("SwissA"),170);	
    //	User::LeaveIfError(iRootScreenDevice->GetNearestFontInTwips(iAppUi->iTickerFont,MyeFontSpec));
    	iWindowGc->Activate(iRootWindow);
    		
    	iWindowGc->UseFont( iCoeEnv->NormalFont() );	
    	if(iAppUi->iTickerMode!=CAknExGridAppUi::KFGTShowWait&&
    			iAppUi->iTickerMode!=CAknExGridAppUi::KFGTShowForm)
    				{
    				if(iAppUi->iTickerMode==CAknExGridAppUi::KFGTShowNone)
    					{
    					iRootWindow.Invalidate(TRect());
    					iRootWindow.BeginRedraw(TRect());
    					}
    				else
    					{
    					iRootWindow.Invalidate(iDrwRect);
    					iRootWindow.BeginRedraw(iDrwRect);	
    					}
    				if(inum==0)
    				{
    				iWindowGc->DrawBitmap(TPoint(ixt,0),iAppUi->iImageConvertor->Bitmap(46));
    				iWindowGc->DrawBitmap(TPoint(ixt1,0),iAppUi->iImageConvertor->Bitmap(46));
    				}
    				else
    					{
    					iWindowGc->DrawBitmap(TPoint(ixt,16),iAppUi->iImageConvertor->Bitmap(45));
    					iWindowGc->DrawBitmap(TPoint(ixt1,16),iAppUi->iImageConvertor->Bitmap(45));
    					}
    
    		
    				}
    			else
    				{ .....
    		
    					}
    				else
    					{
    					if(iAppUi->iTickerMode==CAknExGridAppUi::KFGTShowForm&&idrawheader)
    						{....
    						}
    					}
    				}
    			iRootWindow.EndRedraw();
    			iWindowGc->Deactivate();
    			iWsSession.Flush();	
    //			iRootScreenDevice->ReleaseFont(iAppUi->iTickerFont);
    	}
    
    void CDrawer::CreateTicker(TInt aTicker,TInt aTSize,TRgb  aBgColor,TRgb  aFgColor)
    	{
    
    	switch(aTicker)
    	{case CAknExGridAppUi::KTickerBSE:
    	iBseDevice->CreateContext( iDrawer );
    	iDrawer->Activate(iBseDevice);
    	break;
    	case CAknExGridAppUi::KTickerNSE:
    	iNseDevice->CreateContext( iDrawer );
    	iDrawer->Activate(iNseDevice);
    	break;
    	}
    	switch(aTSize)
    	{case CAknExGridAppUi::KTickerSmall:
    	iTime=2;
    	break;
    	case CAknExGridAppUi::KTickerBig:
    	iTime=1;
    	break;
    	}
    
    	iDrawer->SetBrushColor(aBgColor);
    	iDrawer->SetPenStyle(CGraphicsContext::ENullPen);
    	iDrawer->SetBrushStyle(CGraphicsContext::ESolidBrush);
    	iDrawer->Clear();
    //	iDrawer->DrawRect(iTickerRect);
    	iDrawer->SetPenStyle(CGraphicsContext::ESolidPen);
    	iDrawer->SetBrushStyle(CGraphicsContext::ENullBrush);
    	iDrawer->UseFont(CEikonEnv::Static()->NormalFont()/*iAppUi->iTickerFont*/);
    	xOffset=0;
    
    					for(TInt t=0;t<iTime;t++)
    						{
    			iDrawer->SetPenColor(aFgColor);	
    			iAppUi->iPtr16.Set(iAppUi->ScreenArray()->operator [](aTicker*3));
    			if(iAppUi->iPtr16.Length()>0)  
    				/* 1)	Last Updated on 11:36 AM*/
    				iDrawer->DrawText(iAppUi->iPtr16.AllocL()->Des(),TPoint(ixt+xOffset,12));
    			/*0*/	
    			xOffset=xOffset+iAppUi->iTickerFont->TextWidthInPixels(iAppUi->iPtr16.AllocL()->Des())+iAppUi->iTickerFont->TextWidthInPixels(_L("     "));
    			iAppUi->iPtr16.Set(iAppUi->ScreenArray()->operator [](aTicker*3+1));
    			if(iAppUi->iPtr16.Length()>0)
    				/* 2)	***  SENSEX: 15485.61  ** ( */
    				iDrawer->DrawText(iAppUi->iPtr16.AllocL()->Des(),TPoint(ixt+xOffset,12));
    			iAppUi->iwriteBuf.Copy(iAppUi->iPtr16);
    			/*1*/	
    			xOffset=xOffset+iAppUi->iTickerFont->TextWidthInPixels(iAppUi->iwriteBuf)+iAppUi->iTickerFont->TextWidthInPixels(_L(" "));
    			iAppUi->iPtr16.Set(iAppUi->ScreenArray()->operator [](aTicker*3+2));
    			iAppUi->iwriteBuf.Copy(iAppUi->iPtr16);
    			iDrawer->SetPenStyle(CGraphicsContext::ENullPen);
    			iDrawer->SetBrushStyle(CGraphicsContext::ESolidBrush);
    			if(iAppUi->iPtr16.Length()>0)
    				{
    				/* Up or down icon */
    				if(iAppUi->iPtr16.Mid(0,1)==_L("-"))
    					{
    	//								iimage->LoadAndCompress(iAppUi->iimgBuf,EMbmAknexgridDown_icon,ETrue);
    	//								iimage_mask->LoadAndCompress(iAppUi->iimgBuf,EMbmAknexgridDown_mask_icon,ETrue);
    					iDrawer->SetPenColor(KRgbRed);
    					iDrawer->BitBltMasked(TPoint(ixt+xOffset,1),iAppUi->iImageConvertor->Bitmap(25)
    							,TRect(0,0,iAppUi->iImageConvertor->Bitmap(25)->SizeInPixels().iWidth,
    									iAppUi->iImageConvertor->Bitmap(25)->SizeInPixels().iHeight),
    									iAppUi->iImageConvertor->Bitmap(26),ETrue);
    					}
    				else if(iAppUi->iPtr16.Mid(0,1)==_L("+"))
    					{
    	//								iimage->LoadAndCompress(iAppUi->iimgBuf,EMbmAknexgridUp_icon,ETrue);
    	//								iimage_mask->LoadAndCompress(iAppUi->iimgBuf,EMbmAknexgridUp_mask_icon,ETrue);
    					iDrawer->SetPenColor(KRgbGreen);
    					iDrawer->BitBltMasked(TPoint(ixt+xOffset,1),
    							iAppUi->iImageConvertor->Bitmap(23),TRect(0,0,
    									iAppUi->iImageConvertor->Bitmap(23)->SizeInPixels().iWidth,
    									iAppUi->iImageConvertor->Bitmap(23)->SizeInPixels().iHeight),
    									iAppUi->iImageConvertor->Bitmap(24),ETrue);
    					}
    				//	xOffset=xOffset+16;
    				///*2*/	xOffset=xOffset+iMyFont->TextWidthInPixels(iAppUi->iwriteBuf);
    				iDrawer->SetPenStyle(CGraphicsContext::ESolidPen);
    				iDrawer->SetBrushStyle(CGraphicsContext::ENullBrush);
    				xOffset=xOffset+iAppUi->iTickerFont->TextWidthInPixels(_L("   "));
    				/* 4)	+295.99 */
    				iDrawer->DrawText(iAppUi->iPtr16.AllocL()->Des(),TPoint(ixt+xOffset,12));
    				iAppUi->iwriteBuf.Copy(iAppUi->iPtr16.AllocL()->Des());
    				/*2*/
    				xOffset=xOffset+iAppUi->iTickerFont->TextWidthInPixels(iAppUi->iwriteBuf)+2;
    				iDrawer->SetPenColor(aFgColor);	
    				iDrawer->DrawText(_L(")"),TPoint(ixt+xOffset,12));
    				xOffset=xOffset+iAppUi->iTickerFont->TextWidthInPixels(_L("     "));						
    				}
    
    	}
    		iWsSession.Flush();
    		switch(aTicker)
    		{case CAknExGridAppUi::KTickerBSE:
    		iAppUi->iImageConvertor->Bitmap(46)->Save(_L("Bse.bmp"));
    		break;
    		case CAknExGridAppUi::KTickerNSE:
    		iAppUi->iImageConvertor->Bitmap(45)->Save(_L("Nse.bmp"));
    		break;
    		}													
    	}
    and called from
    Code:
    void CAknExGridAppUi::FetchTicker()
    	{
    	_LIT(KFetchTicker,"Fetching Ticker");
    	iLog.Write(KFetchTicker);
    //////////////Set transaction observer
    	Model().FetchTickerL();
    	if(iShowMode==KShowSplash)
    		{
    		User::LeaveIfError(iWsBackSession.Connect());
    //		iWindowsGroupID = CEikonEnv::Static()->RootWin().Identifier();
    //	    CEikonEnv::Static()->WsSession().SetWindowGroupOrdinalPosition(iWindowsGroupID,0);//(identifier,position)		
    				}
    	else
    		iShowMode=KShowGrid;
    	User::CompressAllHeaps();	
       if(iDrawer0==NULL)
      {iDrawer0 =new (ELeave) CDrawer();
      	iDrawer0->SetMopParent(this);
    		 iDrawer0->ConstructL( TRect(TPoint(0,0), TSize(ClientRect().Width(),16))
    		       		   			,0 ,KRgbDarkBlue,KRgbWhite,1);
    				       		   
       }
    		       		   	
       if(iDrawer1==NULL)
        {
    	iDrawer1 =new (ELeave) CDrawer();
    	iDrawer1->SetMopParent( this );
    	iDrawer1->ConstructL(  TRect(TPoint(0,0), TSize(ClientRect().Width(),16))
    		       		   			,1,KRgbWhite, KRgbDarkBlue,1);
    	}    
       iDrawer0->CreateTicker(KTickerBSE,KTickerSmall,KRgbDarkBlue,KRgbWhite);
       iDrawer1->CreateTicker(KTickerNSE,KTickerSmall,KRgbWhite,KRgbDarkBlue);
       iDrawer0->MakeVisible(ETrue);
       iDrawer1->MakeVisible(ETrue);
    	}
    Last edited by gigglie; 2008-06-27 at 12:49.

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: Help bitmap not showing

    I can not see anything in your code that would draw onto a bitmap. The basics are pretty simple, search for off-screen in the SDK Help (except S60 3rd FP2 - the search probably will not work with that), and locate "How to create and draw to an off-screen bitmap".

  3. #3
    Regular Contributor
    Join Date
    Mar 2007
    Posts
    235

    Question Re: Help bitmap not showing

    Well Wizard CreateTicker is supposed to draw into a bitmap and when I was trying to save the result I am getiing two bmp file each of size 7.5 kb and no image is shown .
    Last edited by gigglie; 2008-06-27 at 12:40.

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: Help bitmap not showing

    Ok, that part really appears to draw on the bitmap provided by "iAppUi->iImageConvertor->Bitmap(46)".

    By the way, if you view the saved images, can you see anything in them?

  5. #5
    Regular Contributor
    Join Date
    Mar 2007
    Posts
    235

    Question Re: Help bitmap not showing

    Nothing showing .Only an error message when I am trying to open it with MSPaint.
    "Paint cannot read this file or it's format is not currently supported ".
    Some of its content seen through notepad
    Code:
    7  B      9d9Gç  Ó  (                             Q€  üßÀÀ÷ðð÷ððŸ@@€  þǐ÷ðð÷ððþ¿€€€  €  ÷ððþßÀÀ÷ðð÷ððþŸ@@€  €  ÷ððþßÀÀ÷ðð÷ððþŸ@@€  €  þ¿€€÷ðð÷ððýçÐЇ€  €  þ¯``÷ðð÷ððþ€  ÷ðð÷ðð€  ÷ðð€  ÷ððþßÀÀ÷ðð÷ððþŸ@@€  €  þçÐÐ÷ðð÷ððþßÀÀ÷ðð÷ðð€  ÷ðð€  þǐ÷ðð÷ððþ¿€€€  €  ÷ððþ€  ÷ðð÷ððþçÐÐ÷ðð÷ððþŸ@@€  €  þ¿€€÷ðð÷ððýçÐЇ€  €  þ—00÷ðð÷ðð€  þ¿€€÷ðð÷ððüýûûþþþýüü¥KK€  ÷ððýçÐÐ÷ððûøøþþþûýüüþþþþþþùôô¿€€€  ù§PP÷ððþþþýüü÷ððßÀÀû÷÷þþþüùóóçÐЇ€  ÷ððüþþþýûûþþþýüüþþþþùóó€  €  þ¿€€÷ðð÷ððýçÐЇ€  €  þ¯``÷ðð÷ððþ€  ÷ðð÷ðð€  ÷ðð€  ÷ððþßÀÀ÷ðð÷ððþŸ@@€  €  þçÐÐ÷ðð÷ððþßÀÀ÷ðð÷ðð€  ÷ðð€  þǐ÷ðð÷ððþ¿€€€  €  ÷ððþ€  ÷ðð÷ððþçÐÐ÷ðð÷ððþŸ@@€  €  þ¿€€÷ðð÷ððÿÿÿQ€  ÷ðð€  üŸ@@÷ðð÷ððïàà  üïàà÷ðð÷ðð—00€  ÷ððüçÐЇ‡×°°÷ððþ×°°€  €  ÷ððüçÐЇ‡×°°÷ððþ×°°€  €  ú  ÷ðð÷ðð×°°€  ×°°÷ððþ·pp€  €  þ  ÷ðð÷ððüŸ@@€  Ÿ@@ßÀÀ€  ÷ðð€  ÷ðð€  ÷ððüçÐЇ‡×°°÷ððþ×°°€  €  ù¯``÷ðð÷ððçÐЏ  ‡çÐÐ÷ðð€  ÷ðð€  üŸ@@÷ðð÷ððïàà  üïàà÷ðð÷ðð—00€  ÷ðð€  ÷ððüçÐЏ  ‡×°°÷ððþ×°°€  €  ú  ÷ðð÷ðð×°°€  ×°°÷ððþ·pp€  €  ü×°°÷ðð÷ðð·pp€  ý—00·ppçÐЀ  ú  ÷ðð÷ðð×°°€  üúúþþþþ·pp€  €  ÷ððïLJ÷ðð÷ððïààȈøññþýýûøø÷ðð—00€  ǐ÷ððþþþúöö÷ððêÕÕ÷ððùòææ÷ððüúúüúú÷ðð·pp€  ÷ððûþþþýüü÷ðð÷ððæÍÍ÷ððû×°°‡€  €    ÷ððý×°°€  ×°°÷ððþ·pp€  €  þ  ÷ðð÷ððüŸ@@€  Ÿ@@ßÀÀ€  ÷ðð€  ÷ðð€  ÷ððüçÐЇ‡×°°÷ððþ×°°€  €  ù¯``÷ðð÷ððçÐЏ  ‡çÐÐ÷ðð€  ÷ðð€  üŸ@@÷ðð÷ððïàà  üïàà÷ðð÷ðð—00€  ÷ðð€  ÷ððüçÐЏ  ‡×°°÷ððþ×°°€  €  ú  ÷ðð÷ðð×°°€  ×°°ÿÿÿQ€  ÷ðð€  üÏ  ÷ðð÷ðð¯``€  ü¯``÷ðð÷ððÏ  €  ÷ððü§PP€  €  Ÿ@@÷ðð€  ÷ððü§PP€  €  Ÿ@@÷ðð€  úǐ÷ðð÷ðð—00€  —00÷ððþßÀÀ€  €  üǐ÷ðð÷ðð¿€€€  ÷ðð€  ÷ðð€  ÷ððü§PP€  €  Ÿ@@÷ðð€  ü×°°÷ðð÷ðð¯``€  þ§PP÷ðð÷ðð€  ÷ðð€  üÏ  ÷ðð÷ðð¯``€  ü¯``÷ðð÷ððÏ  €  ÷ðð€  ÷ððü§PP€  €  Ÿ@@÷ðð€  úǐ÷ðð÷ðð—00€  —00÷ððþßÀÀ€  €  ÷ððþ‡€  €  úǐ÷ðð÷ðð—00€  øòòþþþþßÀÀ€  €  ÷ððî¯``Ï  ÷ðð÷ðð¯``—00÷ððúõõýüü÷ððÏ  €  çÐÐ÷ððþþþøòò÷ððز²÷ððù±cc÷ððøòòþþþ÷ððßÀÀ€  ÷ððûþþþùôô÷ðð¯``Ÿ@@÷ðð€  úǐ÷ðð÷ðð—00€  —00÷ððþßÀÀ€  €  üǐ÷ðð÷ðð¿€€€  ÷ðð€  ÷ðð€  ÷ððü§PP€  €  Ÿ@@÷ðð€  ü×°°÷ðð÷ðð¯``€  þ§PP÷ðð÷ðð€  ÷ðð€  üÏ  ÷ðð÷ðð¯``€  ü¯``÷ðð÷ððÏ  €  ÷ðð€  ÷ððü§PP€  €  Ÿ@@÷ðð€  úǐ÷ðð÷ðð—00€  —00ÿÿÿQ€  ÷ðð€  üçÐÐ÷ðð÷ðð  €  ü  ÷ðð÷ððçÐЀ  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ýçÐÐ÷ðð÷ðð€  ÷ðð€  üçÐÐ÷ðð÷ððŸ@@€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ððü  €  €  ‡÷ðð€  ÷ðð€  üçÐÐ÷ðð÷ðð  €  ü  ÷ðð÷ððçÐЀ  ÷ðð€  ÷ððþ‡€  €  ÷ðð€  ýçÐÐ÷ðð÷ðð€  ÷ðð€  ûïàà÷ðð÷ððßÀÀŸ@@€  ýçÐÐ÷ðð÷ðð€  ü÷ððþþþþþþ÷ðð€  ÷ððô  çÐÐ÷ðð÷ðð  €  ïààøññþþþ÷ððçÐЇ÷ððüþýý÷ðð÷ððçÐÐ÷ððü€  ÷ðð÷ððþþþ÷ððü€  ÷ðð÷ððþþþ÷ððý  €  ÷ðð÷ðð€  ýçÐÐ÷ðð÷ðð€  ÷ðð€  üçÐÐ÷ðð÷ððŸ@@€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ððü  €  €  ‡÷ðð€  ÷ðð€  üçÐÐ÷ðð÷ðð  €  ü  ÷ðð÷ððçÐЀ  ÷ðð€  ÷ððþ‡€  €  ÷ðð€  ýçÐÐ÷ðð÷ðð€  ÿÿÿQ€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  þ¯``÷ðð÷ððýßÀÀ§PP€  €  ÷ððþþþþ÷ðð€  €  ÷ððþ€  ÷ðð÷ðð€  úǐ÷ððþþþùôô÷ðð§PP÷ððþûøø÷ðð÷ððþþþ÷ððü€  ÷ðð÷ððþþþ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ððÿÿÿQ€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ý§PPïàà÷ðð÷ððüßÀÀ‡€  €  ÷ððþþþþ÷ðð€  €  ÷ððþ€  ÷ðð÷ðð€  úŸ@@÷ððþþþûøø÷ðð¿€€÷ððþùóó÷ðð÷ððþþþ÷ððü€  ÷ðð÷ððþþþ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ððÿÿÿQ€  üßÀÀ÷ðð÷ððŸ@@€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  þ  ÷ðð÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ý§PPßÀÀ÷ðð÷ððýÏ  €  €  ÷ðð€  üßÀÀ÷ðð÷ððŸ@@€  ÷ððþ€  ÷ðð÷ðð€  û÷ððþþþýûû÷ððßÀÀ÷ððþ€  ÷ðð÷ðð€  ÷ððýþþþ÷ðð÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  þ  ÷ðð÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ÿÿÿQ€  üǐ÷ðð÷ðð·pp€  üçÐÐ÷ðð÷ðð  €  ü  ÷ðð÷ððçÐЀ  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  üïàà÷ðð÷ðð  €  üçÐÐ÷ðð÷ðð  €  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  üßÀÀ÷ðð÷ðð§PP€  þ§PP÷ðð÷ðð€  ÷ðð€  üçÐÐ÷ðð÷ðð  €  ü  ÷ðð÷ððçÐЀ  ÷ðð€  ÷ðð€  ÷ðð€  üïàà÷ðð÷ðð  €  þ¯``÷ðð÷ðð€  úïàà÷ðð÷ðð  €  ǐ÷ððþ·pp€  €  ÷ððû€  çÐÐ÷ðð÷ðð  €  üÕ««þþþþþþçÐÐ÷ððþÏ  ÷ðð÷ððüïàà÷ðð÷ðð  ÷ðð€  ÷ððýþþþ÷ðð÷ðð€  ÷ðð€  üïàà÷ðð÷ðð  €  üçÐÐ÷ðð÷ðð  €  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  üßÀÀ÷ðð÷ðð§PP€  þ§PP÷ðð÷ðð€  ÷ðð€  üçÐÐ÷ðð÷ðð  €  ü  ÷ðð÷ððçÐЀ  ÷ðð€  ÷ðð€  ÷ðð€  üïàà÷ðð÷ðð  €  ÿÿÿQ€  ü—00÷ðð÷ððßÀÀ€  üÏ  ÷ðð÷ðð¯``€  ü¯``÷ðð÷ððÏ  €  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  üÏ  ÷ðð÷ðð¯``€  üǐ÷ðð÷ðð·pp€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ü¯``÷ðð÷ððçÐЇþçÐÐ÷ðð÷ðð€  ÷ðð€  üÏ  ÷ðð÷ðð¯``€  ü¯``÷ðð÷ððÏ  €  ÷ðð€  ÷ðð€  ÷ðð€  üÏ  ÷ðð÷ðð¯``€  ÷ðð€  úÏ  ÷ðð÷ðð¯``€  —00÷ððþßÀÀ€  €  ÷ððû€  Ï  ÷ðð÷ðð¯``€  üÈ‘‘þþþþþþäÉÉ÷ððþ§PP÷ðð÷ððüÏ  ÷ðð÷ðð¯``÷ðð€  ÷ððýþþþ÷ðð÷ðð€  ÷ðð€  üÏ  ÷ðð÷ðð¯``€  üǐ÷ðð÷ðð·pp€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ü¯``÷ðð÷ððçÐЇþçÐÐ÷ðð÷ðð€  ÷ðð€  üÏ  ÷ðð÷ðð¯``€  ü¯``÷ðð÷ððÏ  €  ÷ðð€  ÷ðð€  ÷ðð€  üÏ  ÷ðð÷ðð¯``€  ÿÿÿR€  øßÀÀ÷ðð÷ððǐ‡€  §PP×°°€  üŸ@@÷ðð÷ððïàà  üïàà÷ðð÷ððŸ@@€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  þŸ@@÷ðð÷ððûŸ@@€  €  §PP×°°€  þ  ÷ðð÷ððüŸ@@€  Ÿ@@ßÀÀ€  üçÐÐ÷ðð÷ðð·pp€  ÷ðð€  ÷ðð€  ÷ðð€  þçÐÐ÷ðð÷ððþßÀÀ÷ðð÷ðð€  üçÐÐ÷ðð÷ðð·pp€  üŸ@@÷ðð÷ððïàà  üïàà÷ðð÷ððŸ@@€  üçÐÐ÷ðð÷ðð·pp€  ÷ðð€  ÷ðð€  þŸ@@÷ðð÷ððûŸ@@€  €  §PP×°°€  ýßÀÀ¯``  €  ü¿€€÷ðð÷ððçÐЀ  þŸ@@÷ðð÷ððóŸ@@€  ßÀÀùôôüúúǐ‡€  ùôôüúú÷ðð€  Ÿ@@÷ððüïàà    ïààþþþüóçç÷ðð÷ðð‡÷ððþŸ@@÷ðð÷ððúùóó÷ðð÷ðð§PP×°°€  ÷ððýþþþ÷ðð÷ðð€  ÷ððü€  ÷ðð÷ððùóó÷ððúþþþùóó÷ðð€  §PPüúú÷ððý€    þþþþþþûŸ@@€  ùóóýûû÷ðð€  üýüüþþþþþþ·pp€  ÷ðð€  ÷ðð€  ÷ðð€  þçÐÐ÷ðð÷ððþßÀÀ÷ðð÷ðð€  üçÐÐ÷ðð÷ðð·pp€  üŸ@@÷ðð÷ððïàà  üïàà÷ðð÷ððŸ@@€  üçÐÐ÷ðð÷ðð·pp€  ÷ðð€  ÷ðð€  þŸ@@÷ðð÷ððýŸ@@€  ÿÿÿÿÿÿÿR€  ý‡çÐÐ÷ðð÷ðð€  þǐ÷ðð÷ððþǐ€  €  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  þÏ  ÷ðð÷ðð€  þ¯``÷ðð÷ðð€  þ¯``÷ðð÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ú‡Ï  ÷ðð÷ððÏ  ‡÷ðð€  þ¯``÷ðð÷ðð€  þǐ÷ðð÷ððþǐ€  €  þ¯``÷ðð÷ððþ€  ÷ðð÷ðð€  ÷ðð€  þÏ  ÷ðð÷ðð€  ÷ððþ§PP€  €  þÏ  ÷ðð÷ððýýüüþþþ÷ðð÷ððþþþü÷ðð€  €  ǐ÷ððúüúúûøø÷ðð÷ðð×°°€  ÷ððü€  Ï  ÷ðð÷ððþþþ÷ððü€  ÷ðð÷ððþþþ÷ðð€  ÷ððþ€  ÷ðð÷ððýÏ  ÷ððþþþþþþ÷ððýþþþ÷ðð÷ðð€  ýúõõþþþþþþ÷ððþþþü÷ðð€  €  úõõþþþ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ú‡Ï  ÷ðð÷ððÏ  ‡÷ðð€  þ¯``÷ðð÷ðð€  þǐ÷ðð÷ððþǐ€  €  þ¯``÷ðð÷ððþ€  ÷ðð÷ðð€  ÷ðð€  þÏ  ÷ðð÷ððÿÿÿS€  ý‡¿€€çÐÐ÷ððýßÀÀ§PP€  €  ú§PPçÐÐ÷ðð÷ððçÐЧPP€  ÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ý¯``çÐÐ÷ðð÷ððýßÀÀ§PP€  €  ú§PPçÐÐ÷ðð÷ðð×°°Ÿ@@€  ý¿€€ïàà÷ðð÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ü‡÷ðð÷ððçÐÐ	€  ý¿€€ïàà÷ðð÷ðð€  ú§PPçÐÐ÷ðð÷ððçÐЧPP€  ý¿€€ïàà÷ðð÷ððþ€  ÷ðð÷ðð€  ÷ðð€  ý¯``çÐÐ÷ðð÷ððýßÀÀ§PP€  €  ýŸ@@×°°÷ðð÷ððý×°°Ÿ@@€  €  ý¯``çÐÐ÷ðð÷ððýáÃÃÓ§§çÐÐ÷ððýýûûùôô÷ðð€  ú§PPçÐÐ÷ðð÷ððçÐÐÈ‘‘÷ððý¯``€  ÷ðð÷ðð€  ý¯``çÐÐþþþþþþýßÀÀ§PP€  ÷ððýþþþ÷ðð÷ðð€  ÷ððþ€  ÷ðð÷ððý€  ¯``ýüüþþþý÷ððßÀÀùôô÷ðð€  ý÷ððùôôýüü÷ððýüúúùóó÷ðð€  ý÷ððû÷÷þýý÷ðð€  ÷ðð€  ÷ðð€  ÷ðð€  ü‡÷ðð÷ððçÐÐ	€  ý¿€€ïàà÷ðð÷ðð€  ú§PPçÐÐ÷ðð÷ððçÐЧPP€  ý¿€€ïàà÷ðð÷ððþ€  ÷ðð÷ðð€  ÷ðð€  ü¯``çÐÐ÷ðð÷ððÿÿÿ€  ;€  ü¯``÷ðð÷ððÏ  €  @€  ü¯``÷ðð÷ððÏ  <€  ÿÿÿ€  6€  û×°°Ÿ@@€  €  Ÿ@@÷ððþŸ@@€  €  :€  û×°°Ÿ@@€  €  Ÿ@@÷ððþŸ@@€  ;€  ÿÿÿ€  6€  ÷ððþÏ  €  €  ;€  ÷ððþÏ  €  <€  ÿÿÿ€  6€  ý§PP×°°÷ðð÷ððýçÐЯ``€  €  <€  ý§PP×°°÷ðð÷ððýçÐЯ``€  =€  ÿÿÿ   
    Last edited by gigglie; 2008-06-27 at 13:37.

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: Help bitmap not showing

    Symbian .mbm is a proprietary file format, MSPaint will not open it. However in most S60 SDK-s you can find S60Tools\MbmViewer, try that.
    Note that CFbsBitmap::Save/StoreL produces Symbian Multi-Bitmap format, regardless the filename and extension you supply. CImageEncoder can encode a CFbsBitmap into some common format, like .jpg, .bmp, etc. But it is not necessary in your case.

  7. #7
    Regular Contributor
    Join Date
    Mar 2007
    Posts
    235

    Red face Re: Help bitmap not showing

    Yes , wizard I can see my bitmap through my MBM wizard as you said . It is creating fine . But it is not drawing , Do I have to something like reload it ?

  8. #8
    Registered User
    Join Date
    Jun 2008
    Location
    beauty
    Posts
    11

    Re: Help bitmap not showing

    aha,
    iWindowGc->DrawBitmap(TPoint(ixt,0),iAppUi->iImageConvertor->Bitmap(46));

    it's the point! ok,look the sdk help and u will find out following info:
    "The function does a compress/stretch based on its internally stored size in twips. Note that if the twips value of the bitmap is not set then nothing is drawn (this is the default situation)."

    so u should set the twips value before drawbitmap.
    PS: there is a more convenient function u could use it instead of, it is:
    DrawBitmap(const TRect &aDestRect, const CFbsBitmap *aDevice);

    hope it is useful for u.

  9. #9
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: Help bitmap not showing

    Cheney23 is right, DrawBitmap is usually evil. Unless you really want to scale the bitmap, you should use BitBlt/Masked.

  10. #10
    Regular Contributor
    Join Date
    Mar 2007
    Posts
    235

    Re: Help bitmap not showing

    I have called DrawBitmap(TRect,..) BitBlt(TPoint,Bitmap,SrcRect) and no change .

  11. #11
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: Help bitmap not showing

    You should proceed with smaller steps, experiment with smaller pieces of code, and see what works and what does not work.

Similar Threads

  1. problem when importing from carbide c++ to vs 2003!
    By misfit.physics in forum Symbian Tools & SDKs
    Replies: 12
    Last Post: 2008-02-19, 09:45
  2. Showing bitmap when the app is not in foreground
    By gpalvia in forum Symbian User Interface
    Replies: 0
    Last Post: 2007-10-30, 09:18
  3. How can I reverse the color in the screen?
    By sanmu163 in forum Symbian User Interface
    Replies: 11
    Last Post: 2006-08-18, 08:12

Posting Permissions

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