I have develop a application, which user interface like a follow picture,
Now I open control panel window to covered the application window, like a follow picture,
when I close the control panel window,
the text which is use DrawText/TextOut function to paint,
will be erase,
How do I determine the situation, when the text be erase....
This means that your DrawText and other painting functionality is written in the wrong place. You must do it in OnPaint or OnEraseBkgnd so that they are always painted (when other window overlaps, on resizing etc).
Also, you must make sure that you are correctly creating (CreateDC) & releasing the device context (ReleaseDC) of each object.