Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
This page was last modified 14:23, 11 October 2008.

How to Create a Transparent Window

From Forum Nokia Wiki

void MyView::ConstructL()
{
       CreateWindowL();  //
      
       .........  
}  
 
void MyView::Draw(const TRect& aRect) const
{
	// Get the standard graphics context
	CWindowGc& gc = SystemGc();
	
	TRgb b(255, 0, 0);
	b.SetAlpha(100);  
	Window().SetTransparencyFactor(b);
	// Gets the control's extent
	TRect drawRect(Rect());
	gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
	gc.SetBrushColor(b);
 
	// Clears the screen
	gc.Clear(Rect());
 
}
Related Discussions
Thread Thread Starter Forum Replies Last Post
MIDlet's icon kdermpan Mobile Java General 9 2007-03-13 16:05
Why nokia always hides it's phone features from developer???????? comp_freak Symbian User Interface 0 2008-01-31 11:38
Transparency support on emulator supported? Moruk79 Mobile Java General 2 1970-01-01 02:00
Transparent PNG images in Nokia's MIDP implementations nkn_motoko Mobile Java General 2 2002-05-10 10:19
Dynamically change the color of a PNG? ericprat Mobile Java Media (Graphics & Sounds) 13 2006-04-28 20:36
 
Powered by MediaWiki
RDF Facets: qfnZtypeQUqfnTypeZCommunityContentQ qfnZtypeQUqfnTypeZWebpageQ qfnZtypeQUqfnTypeZWikiContentQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX