Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

setwindowtext problem

Status
Not open for further replies.

cellpeter

Programmer
Dec 30, 2004
34
US
ok i am wondering how to add data to an existing title bar without the title bar itself overlapping when using the WM_TIMER event

here is the code that i am using

void CJokDlg::OnTimer(UINT nIDEvent)
{
CString time;
CWnd* tyu = GetForegroundWindow();
tyu->GetWindowText(time);

tyu->SetWindowText(time + "testing");
CDialog::OnTimer(nIDEvent);
}

thanks for any replies
 
Try saving the original title in the InitDialog then concatenate "time" to that title when you want to change the title. That way, the title never changes: only the time changes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top