MvcViewport Class
class MvcViewport: public CMvcViewport
This class is derived from an instantiation of the CMvcViewport template class. It implements an MFC-specific, windowless viewport and maintains a pointer to the CWnd it belongs to. It instantiates the CMvcViewport template using MvcLogicalPart, MvcModel, and MvcController as the parameters. It implements the MFC message handling functions OnWndMsg and OnCmdMsg so that it can integrated with the MFC message map architecture.Defined in: MvcViewport.h
Class Members
virtual BOOL Create(CWnd* pWnd, MvcVisualPart* pContainer)
Creates the viewport and optional controller
virtual BOOL OnWndMsg(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pResult)
A windows message is being delegated to this component for handling
virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
The command message is being delegated to this component for handling
virtual void OnUpdate(IMvcSubject* pSubject, IMvcMessage* pMsg)
The function reacts to notifications of change on the subject it is observing
virtual void InvalidateRect(const CRect& rcLog, BOOL bErase = TRUE, BOOL bRepairNow = FALSE)
Invalidate the specified rectangle within this visual part
inline virtual BOOL GetUpdateRect(LPRECT lpRect, BOOL bErase = FALSE)
Returns the current invalid region as a rectangle.
virtual void LPtoDP( LPPOINT lpPoints, int nCount = 1 ) const
Convert logical units to device units
virtual void DPtoLP( LPPOINT lpPoints, int nCount = 1 ) const
Convert device units to logical units
virtual void Draw(CDC* pDC)
Renders the component to a device context
virtual void Erase(CDC* pDC)
Erases the viewport contents.
virtual CSize GetLogSize() const
Returns the width and height of the component in logical units
virtual stingray::foundation::CEventFactory* GetEventFactory()
Returns a pointer to the event factory for this viewport.