ActiveX


TestMyCtrlDlg.cpp - 4


END_EVENTSINK_MAP()

void CTestMyCtrlDlg::OnSelectMyctrl(BOOL IsSelected)

{

if ( IsSelected )

m_Message = "Âûáðàí";

else

m_Message = "Íå âûáðàí";

UpdateData(FALSE);

}

void CTestMyCtrlDlg::OnShape()

{

short shape = m_MyCtrl.Get_Shape();

if ( shape < 2 )

m_MyCtrl.Set_Shape(++shape);

else

m_MyCtrl.Set_Shape(0);

}

void CTestMyCtrlDlg::OnText()

{

UpdateData(TRUE);

m_MyCtrl.SetCaption(m_newText);

}

void CTestMyCtrlDlg::OnTimer()

{

m_MyCtrl.DoChangeTimer();

}

void CTestMyCtrlDlg::OnTickMyctrl(long ltick)

{

m_Tick.Format("%d", ltick);

CWnd * pwnd = GetDlgItem(IDC_TICK);

pwnd->SetWindowText(m_Tick);

}




- -  - -  - -