background for Different screen sizes

Login to reply to this topic.
Fri, 2007-06-22 23:50
Joined: 2005-09-04
Forum posts: 135

I want fit the app view's background bmp to the different screen sizes.
(till now I used MBM for the view's background)

I would appreciate any help regarding this issue because I'm a bit confused after checking the relevant docs and examples.

As I understand (but not sure),
the best way is to convert the bmp to svg and add it to the mifconv command (inside mk)?
or should I add the bmp itself (with its mask?) to mifconv?
1) Which way is better?
2) How will the system know which svg is the icon?
3) How do I paint the background so it will fit the different sizes?

Till now I used this code:

void CMyAppViewContainer::Draw(const TRect& aRect) const
{  
	CWindowGc& gc = SystemGc();
	gc.Clear(Rect());
	_LIT(KMBMFileName, "c:\\resource\\apps\\backround.mbm");
	TBuf<50> mbmFileName;
	mbmFileName.Append(KMBMFileName);
	CFbsBitmap* bitmap = new (ELeave) CFbsBitmap();
	bitmap->Load(mbmFileName);
	gc.BitBlt(TPoint(0,0),bitmap,aRect);
	delete bitmap;
}

Thanks & Enjoy your weekend

  • Login to reply to this topic.