I have this code which should create a new red window and then print it. Except it only works when I include the CWsScreenDevice function SizeInPixels() after the gc->Clear() command. Everything seems to work as it should, except nothing is displayed on the screen. I am using this code with the Series 60 emulator under VC++ 6. Is it a compiler bug or something as SizeInPixels() has nothing to do with the creation or printing of the window.
wscheck = ws.Connect();
if (wscheck != KErrNone) return ERROR;
Have found the problem, needed to flush the screen buffer with the line ws.Flush() after gc->Clear(). I presume iScreenDevice->SizeInPixels(); was doing that which was why it was making it work.