But when i use DrawText to write something into the window, the backgound of the characters is still white. changing the character backgound to transparent doesn't help,because while scrolling up they overleap somehow. how can i solve that (i would like that it still works if i change the main windows background to red, i.e.

thank you two. another question, that's slightly connected to this one, i think.

reading petzolds book "Windows Programming 5th Edition", i saw he's always using (this far) CS_VREDRAW | CS_HREDRAW in the window class settings for the main window. reading in the documentation i figured out, that this simply send a wm_paint message for the whole window each time the window is resized or moved. with all of my programms i get this flickering effect. so i just decided to set this in the wndclass struct to 0. No flickering effect anymore. the windwo behalfes normal, because with every message wm_size i calculate which areas have to be repainted and send InvalidateRect, for that specific area.
my question now: is that dangerous or even incorrect? i don't think so, becaus if using V_REDRAW | HREDRAW you don't even need to react in that way in wm_size, because the whole window is completly redrawn. so is that just really usable for application that need to redraw the whole window wenn a resize is done? (e.g. when centering text). isn't it better to set that param to 0 and care myself for the areas that have to be updatet (which is usaly just a little square with status messages, the rest of the window is an edit window and some buttons.)