PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Delete DrawText

Greetings,

I followed Conan's guide to chapter 3 and I must say its been extremely helpful as I have no prior knowledge of Visual C++.

Now I have a question, when I have drawn text using the above command and the following statement
HDC hDC = m_background->GetDC();
how do I delete the line of text and replace with another line? I mean, say if I touch the stylus to the screen, I want to remove the line of text and replace with another sentence?

I have tried the following line but I've never gotten it to output:
HDC hDC = display->GetBackBuffer()->GetDC( false );
What exactly does that command do?

What is the difference between display, screen, and surface?

Your help is much appreciated. Thanks!

masCh
Conan · 15 Oct 2002, 07:34 UTC — drawing to the screen etc
The way it works is as follows:-

A surface is an off-screen rectangular area you can draw on and you can have as many of these as you need. You put graphics ( bmp jpg etc ) onto the surfaces and then draw them onto the internal hidden copy of the display which you then copy to the screen you can see at the end of the game loop with the display->update() command.

You re-draw the entire display on the off-screen display using blit commands, text etc and then update the screen many times a second and in this way the screen contents change.

I hope this makes sense.