This might be a rudimentary issue... but I have no clue as how to do this.

Have an application that had a series of DrawText calls in a CDC and CRect. Works well. Client wants me to add a "clock" under the text. Took what they had, added the GetLocalTime call to get the time and used a copy of the previous DrawText steps to add it to the display.

Worked.... except....

As the seconds tick away, it OVERWRITES the existing DrawText and "stacks" them one on top of the other. Was going to SetBackMode to OPAQUE but they need to have the background color(s) show through (it's multicolor).

Thought about old school and just writing a bunch of spaces before laying the next DrawText.... that didn't work.

I am sure this is pretty basic... but for the life of me, I am not sure which way to go and am getting tired of trial an errors (or should I say errors and errors).

Suggestions from the helpful people at CodeGuru?

Thanks.... snippet of code follows

Code:
CDC dc;
HDC hDC = GetDC(hWnd);
dc.Attach(hDC);
CRect rect
SYSTEMTIME sysTime;

...


dc.SetBkMode(TRANSPARENT);
dc.SetTextColor(RGB(255, 255, 255));

CString sTemp = "Line Number 1";
font.CreateFont(rect.Height() / 10, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, 0, 0, 0, 0, 0, "Arial");
oldFont = dc.SelectObject(&font);
int iTextHeight = dc.DrawText(sTemp, &rect, DT_CENTER);
dc.SelectObject(oldFont);
font.DeleteObject();
rect.OffsetRect(0, iTextHeight);

sTemp = "Line Number 2";
font.CreateFont(rect.Height() / 18, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, 0, 0, 0, 0, 0, "Arial");
oldFont = dc.SelectObject(&font);
int iTextHeight = dc.DrawText(sTemp, &rect, DT_CENTER);
dc.DrawText(sTemp, &rect, DT_CENTER);
dc.SelectObject(oldFont);
font.DeleteObject();
rect.OffsetRect(0, iTextHeight);

GetLocalTime(&sysTime);
sTemp.Format("%.2u:%.2u:%.2u", sysTime.wHour, sysTime.wMinute, sysTime.wSecond);
font.CreateFont(rect.Height() / 12, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, 0, 0, 0, 0, 0, "Arial");
oldFont = dc.SelectObject(&font);
dc.DrawText(sTemp, &rect, DT_CENTER);
dc.SelectObject(oldFont);
font.DeleteObject();