SECEditCtrlWrapper_T Class

class SECEditCtrlWrapper_T: public wnd_t, public vp_t

SECEditCtrlWrapper_T is a template class that combines a viewport with any CWnd derived class. This template class is the base class of the SECEditCtrl class. It is also the base class for another template class, SECEditViewWrapper_T, which in turn is the base class for SECEditView.

Defined in: SECEditScrollBarWrapper_T.h

See Also

SECEditCtrl SECEditViewWrapper_T SECEditView

Class Template Arguments

wnd_t

A CWnd-derived class.

vp_t

A SECEditViewport-derived class.

Class Members

Construction / initialization

inline SECEditCtrlWrapper_T()

Default constructor.

inline ~SECEditCtrlWrapper_T()

Destructor

virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL)

Creates the window and viewport.

virtual void OnInitialUpdate()

Sets up default viewport initialization.

virtual BOOL PreCreateWindow(CREATESTRUCT& cs)

Called before the creation of the window.

Attributes

vp_t* GetViewport()

Casts this object to the base viewport class.

virtual int GetVertSBLogUnits()

Retrieves the logical units per vertical scrollbar unit.

virtual int GetHorzSBLogUnits()

Retrieves the logical units per horizontal scrollbar unit.

virtual void SetVirtualSize(int cx,int cy)

Tells the viewport the size of the viewport has changed

Message handling

virtual BOOL PreTranslateMessage(MSG* pMsg)

Filters window messages before they are dispatched.

virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)

Forwards commands to the embedded viewport.

virtual BOOL OnWndMsg( UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pResult )

Forwards messages to the embedded viewport.

virtual void RecalcScrollBars()

Shows or hides the scrollbars.

virtual BOOL OnScroll(UINT nScrollCode, UINT nPos, BOOL bDoScroll = TRUE)

Called to determine whether scrolling is possible.

afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)

Called when the user clicks the vertical scroll bar.

afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)

Called when the user clicks the horizontal scroll bar.

afx_msg BOOL OnEraseBkgnd(CDC* pDC)

Called when the window background needs erasing.

afx_msg void OnPaint()

Called to repaint a portion of the window.

afx_msg void OnSize(UINT nType, int cx, int cy)

Called when the window is resized.

Protected members

inline virtual BOOL DisplayFatThumbForSplitters()

Determines if splitters are drawn with a fat thumb when

CRect m_rcWindow

Cached client rect, converted to screen coordinates.