CMvcZoomCommand Class

class CMvcZoomCommand: public CMvcCommand

Implements a zoom command by querying the command receiver object for the  IZoom interface and using the interface acquired to change the magnification.

Defined in: MvcZoomCommand.h

Class Template Arguments

nTypeID

Type identifier for the command.

_Receiver

Type of object that will receive the command.

Class Members

CMvcZoomCommand(_Receiver* pICmdRecvr = NULL) : (_Receiver* pICmdRecvr = NULL)

Construct a zoom command.

_Receiver* m_pCmdRecvr

Pointer to the object that will receiver the command.

int m_nZoomPctX

Magnification for X axis in percent.

int m_nZoomPctY

Magnification for Y axis in percent.

virtual unsigned int GetTypeID() const

The type ID of the message. Used for safe typecasting.

virtual void Sprint(CString& strCmd)

Print information on the zoom command for logging purposes.

void SetCommandReceiver(_Receiver* pCmdRecvr)

Assign pointer to the command receiver.

virtual void SetMagnification(const int nZoomPctX, const int nZoomPctY)

Set the magnification values.

virtual void GetMagnification(int& nZoomPctX, int& nZoomPctY)

Return the magnification values.

virtual BOOL Execute()

Execute the zoom command.