but how to display it to right side of window but not on the minimise,maximise and close buttons.
i tried DT_RIGHT =it is displaying on those 3 buttons (minimise,maximise and close buttons)
Code:
void CMainFrame::OnTimer(UINT_PTR nIDEvent)
{
HWND hWnd;
hWnd = ::GetForegroundWindow();
CWnd *pWnd;
pWnd = CWnd::FromHandle(hWnd);
CTime Time = CTime::GetCurrentTime();
CString strTime=Time.Format("%H:%M:%S");
CWindowDC dc(this);
CRect rect;
GetClientRect(&rect);
dc.DrawText(strTime,-1,&rect,DT_CENTER);
//pWnd->SetWindowText(strTime);
}
If i use pWnd->SetWindowText(strTime) ,time is displayed on ActiveWindow(GetForegroundWindow()).
what is the problem.
plzzzzzz help me solve this problem
