srelu is right that the two lines of code by themselves should display the text properly and that the problem is most likely with the state of the CDC or some other unknown factor.

Since the text is drawn under the rectangle when you use DT_NOCLIP I would guess that it may have something to do with the rectangle having its top and bottom mixed up. An easy test would be to call rc.NormalizeRect() before using it.