Hi,
For some reason, the SetBackgroundColor(TRgb aColor) changes the way bitmaps are displayed in my application.
The problem is that
SetBackgroundColor(KRgbBlack) makes the images look very dark,
while SetBackgroundColor(KRgbWhite) makes the images look very bright.
Can anyone tell me why? All the SDK says is that "SetBackgroundColor Sets the background colour used for clearing in server-initiated redraws".
I'm using Symbian S60 FP2.
The window I'm using is created by a daemon as follows:
Reagards,Code:User::LeaveIfError(iWsSession.Connect()); iScreenDevice = new (ELeave) CWsScreenDevice(iWsSession); User::LeaveIfError(iScreenDevice->Construct()); User::LeaveIfError(iScreenDevice->CreateContext(iWindowGc)); iWindowGroup=RWindowGroup(iWsSession); User::LeaveIfError(iWindowGroup.Construct((TUint32)&iWindowGroup, EFalse)); iWindowGroup.SetOrdinalPosition(0, ECoeWinPriorityAlwaysAtFront); iWindowGroup.EnableReceiptOfFocus(EFalse); CApaWindowGroupName* winGroupName=CApaWindowGroupName::NewLC(iWsSession); winGroupName->SetHidden(ETrue); winGroupName->SetWindowGroupName(iWindowGroup); CleanupStack::PopAndDestroy(); iWindow=RWindow(iWsSession); User::LeaveIfError(iWindow.Construct(iWindowGroup, (TUint32)&iWindow)); iWindow.SetNonTransparent(); iWindow.EnableVisibilityChangeEvents(); iWindow.SetVisible(EFalse); int winWidth = 240; int winHeight = 120 + Y_OFFSET_IN_WINDOW; m_pWindowSize = new TSize(winWidth, winHeight); m_pPosition = new TPoint(0, 80); iWindow.SetExtent(*m_pPosition, *m_pWindowSize); iWindow.SetBackgroundColor(KRgbBlack); iWindow.SetNonFading(true); iWindow.Activate(); // create back buffer objects TDisplayMode aDisplayMode = iScreenDevice->DisplayMode(); m_pBackBufferBitmap = new(ELeave) CFbsBitmap(); User::LeaveIfError(m_pBackBufferBitmap->Create(*m_pWindowSize, aDisplayMode) ); m_pBackBufferDevice = CFbsBitmapDevice::NewL(m_pBackBufferBitmap); User::LeaveIfError(m_pBackBufferDevice->CreateContext(m_pBackBufferGc)); m_pBackBufferGc->SetBrushStyle(CGraphicsContext::ENullBrush);
Asaf



