Code:
void CMainWnd::OnNcPaint( )
{
HDC dc = GetWindowDC()->m_hDC;
RECT rectWnd = {800,4,880,23};
FillRect(dc, &rectWnd, (HBRUSH)GetStockObject(DKGRAY_BRUSH));
SetBkMode(dc, TRANSPARENT);
SetTextColor(dc, RGB(255, 0,0));
DrawText(dc, "MY TIME", strlen("My TIME"), &rectWnd, 0);
::ReleaseDC(m_hWnd,dc);
}
Code:
void CMainWnd::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");
pWnd->SetWindowText(strTime);
}
HOW TO DO THAT.
i am unable to integrate them both.
PLZ HELP ME.

