Here's what I'm doing:

In my CCoeControl container's ConstructL(), I create these:

// create offscreen drawing objects
iMemoryBitmap = new(ELeave) CWsBitmap(ControlEnv()->WsSession());
User::LeaveIfError(iMemoryBitmap->Create(TSize(0, 0), ControlEnv()->ScreenDevice()->DisplayMode()));
iMemoryBitmapDevice = CFbsBitmapDevice::NewL(iMemoryBitmap);
User::LeaveIfError(iMemoryBitmapDevice->CreateContext(iMemoryBitmapContext));

And in SizeChanged(), I do this:

...code to caculate memoryBitmapHeight...
User::LeaveIfError(iMemoryBitmap->Resize(TSize(iSize.iWidth, memoryBitmapHeight)));
iMemoryBitmapContext->SetBrushStyle(CGraphicsContext::ESolidBrush);
iMemoryBitmapContext->SetBrushColor(KRgbBlack);
iMemoryBitmapContext->Clear();
...more code that draws to iMemoryBitmapContext...

And in Draw(), I do this:

CWindowGc& gc = SystemGc();
gc.SetBrushColor(KRgbRed);
gc.Clear();
gc.BitBlt(TPoint(10, 10), iMemoryBitmap);

I can see that my memorybitmap is blit onto the screen because I see a white area in the middle. But nothing that I draw on it actually appears. Why is that?

Thank you,
Sammy