CGridListCtrlEx
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CGridEditorText Class Reference

CEdit for inplace edit. For internal use by CGridColumnTraitEdit. More...

Inheritance diagram for CGridEditorText:
CGridMultilineEditorText

Public Member Functions

 CGridEditorText (int nRow, int nCol)
 CGridEditorText - Constructor.
 
virtual void EndEdit (bool bSuccess)
 The cell value editor was closed and the entered should be saved. More...
 

Protected Member Functions

afx_msg void OnKillFocus (CWnd *pNewWnd)
 WM_KILLFOCUS message handler called when CEdit is loosing focus to other control. More...
 
afx_msg void OnEnChange ()
 EN_CHANGE notification handler to monitor text modifications.
 
virtual void PostNcDestroy ()
 Called by the default OnNcDestroy (WM_NCDESTROY) message handler, when CEdit window has been be destroyed. More...
 
virtual BOOL PreTranslateMessage (MSG *pMsg)
 Hook to proces windows messages before they are dispatched. More...
 
 DECLARE_MESSAGE_MAP ()
 

Protected Attributes

int m_Row
 The index of the row being edited.
 
int m_Col
 The index of the column being edited.
 
bool m_Completed
 Ensure the editor only reacts to a single close event.
 
bool m_Modified
 Register if text was modified while the editor was open.
 
bool m_InitialModify
 Initial text modication should not set that the editor text was modified.
 

Detailed Description

CEdit for inplace edit. For internal use by CGridColumnTraitEdit.

Member Function Documentation

void CGridEditorText::EndEdit ( bool  bSuccess)
virtual

The cell value editor was closed and the entered should be saved.

Parameters
bSuccessShould the entered cell value be saved
void CGridEditorText::OnKillFocus ( CWnd *  pNewWnd)
protected

WM_KILLFOCUS message handler called when CEdit is loosing focus to other control.

Used register that cell value editor should close.

Parameters
pNewWndPointer to the window that receives the input focus (may be NULL or may be temporary).
void CGridEditorText::PostNcDestroy ( )
protectedvirtual

Called by the default OnNcDestroy (WM_NCDESTROY) message handler, when CEdit window has been be destroyed.

Used to delete the inplace CEdit editor object as well. This is necessary when the CEdit is created dynamically.

BOOL CGridEditorText::PreTranslateMessage ( MSG *  pMsg)
protectedvirtual

Hook to proces windows messages before they are dispatched.

Catch keyboard events that can should cause the cell value editor to close

Parameters
pMsgPoints to a MSG structure that contains the message to process
Returns
Nonzero if the message was translated and should not be dispatched; 0 if the message was not translated and should be dispatched.