ActiveX


, ActiveX MyCtrl. - 2


void CMyCtrlCtrl::OnClose()

{

if ( timerOn )

{

KillTimer( idTimer );

timerOn =FALSE;

}

CWnd::OnClose();

}

ClassWizard, WM_TIMER CMyCtrlCtrl.

 

void CMyCtrlCtrl::OnTimer(UINT nIDEvent)

{

m_tick++;

SetModifiedFlag();

InvalidateControl();

COleControl::OnTimer(nIDEvent);

}

m_tick , CMyCtrlCtrl :

ULONG m_tick;

m_tick .

m_tick OnDraw - :

CString strTick;

strTick.Format("%d",m_tick);

pdc->ExtTextOut((rcBounds.left + rcBounds.right)/2,(rcBounds.top + tm.tmHeight),

ETO_CLIPPED, rcBounds, strTick, strTick.GetLength(),NULL);

m-tick .




- -  - -  - -