www.pudn.com > Poly.rar > ScrollAssist.h
// ScrollAssist.h: interface for the CScrollAssist class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_SCROLLASSIST_H__3BA6A125_E3B9_48C4_BF2A_6EBAACFB6432__INCLUDED_)
#define AFX_SCROLLASSIST_H__3BA6A125_E3B9_48C4_BF2A_6EBAACFB6432__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "datadef.h"
class CScrollAssist_zhang
{
public:
CScrollAssist_zhang();
virtual ~CScrollAssist_zhang();
public:
void Change(CPoint centerPoint,CSize clientSize,CSize imageSize,float zoom);
void Change(int cx,int cy,CSize size,float zoom);
bool OnVScroll(UINT nSBCode,UINT nPos); // if handled, return true
bool OnHScroll(UINT nSBCode,UINT nPos); // if handled, return true
void OnCreate(CWnd *pwnd);
void ResetScroll();
int GetScrollPos( int nBar );
void SetBothPos(int x,int y);
void SetStep(int step);
short Undo(float* zoom);
int GetUndoSum(){ return m_curUndo; }
CSize GetScrollRange() { return ScrollRange;}
void SetLastOP();
void ClearUndo(){ m_curUndo = 0; }
private:
CWnd *m_pwnd;
int VPosHi,HPosHi,VPosLow,HPosLow;
CSize ScrollRange;
int ScrollStep;
float m_zoom;
// Used for undo
strUNDO m_Undo[10];
int m_curUndo;
};
#endif // !defined(AFX_SCROLLASSIST_H__3BA6A125_E3B9_48C4_BF2A_6EBAACFB6432__INCLUDED_)