Hi,
I design a custom TreeView control that wraps the text string of a tree item when the tree is resized, and to achieve that I draw the tree items in OnPaint() handler, I use CDC::DrawText() to draw the text strings and CDC::FillRect() on the same rectangle to draw a selected tree item. In this case I call DrawText() after the FillRect() so it works fine.
Now I want to draw a Focused item, for that I try with CDC::FrameRect() on the same Rect and it draws a bounding rectangle after clearing the text already drawn. I also tried with CDC::Rectangle() but the result was same.
The thing is I call the FrameRect() or Rectangle() after the text is drawn in the same rectangle, and lose the text string.
Is there something I miss or Could someone please explain whether these rectangle API's works like this only i.e. first clear the screen and then draw the thing.
Regards.