#include "T2DlgItemIRepeater.h" T2DlgItemIRepeater::T2DlgItemIRepeater(T2TowerDoc *inDoc, T2ImageObj *inImageObj, CPalette *inPalette) : T2DlgItemIButton(inDoc, inImageObj, inPalette) { } T2DlgItemIRepeater::~T2DlgItemIRepeater() { } /*virtual*/ void T2DlgItemIRepeater::OnT2DlgItemLButtonDown(UINT inFlags, CPoint inPt) { SetCapture(); mIsClicked = true; m74 = true; SetPattern(100); Invalidate(); Notify(GetDlgCtrlID(), 0, NULL); mTimerID = SetTimer(999, 100, NULL); } /*virtual*/ void T2DlgItemIRepeater::OnT2DlgItemLButtonUp(UINT inFlags, CPoint inPt) { if (mIsClicked) { if (mTimerID) KillTimer(mTimerID); SetPattern(0); ReleaseCapture(); mIsClicked = false; if (m74) { m74 = false; Invalidate(); } } } /*virtual*/ void T2DlgItemIRepeater::OnT2Timer(UINT inID) { if (inID == mTimerID && m74) Notify(GetDlgCtrlID(), 0, NULL); }