CComboBox for inplace edit. For internal use by CGridColumnTraitCombo.
More...
|
|
| CGridEditorComboBox (int nRow, int nCol, UINT nMaxWidthPixels, UINT nMaxHeightItems, BOOL bShowDropDown) |
| | CGridEditorComboBox - Constructor.
|
| |
| virtual BOOL | Create (DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID) |
| | Creates the CComboBox control, and subclasses the internal CEdit control to implement special behavior for completing cell value editing.
|
| |
| virtual void | EndEdit (bool bSuccess) |
| | The cell value editor was closed and the entered should be saved.
|
| |
|
| afx_msg void | OnKillFocus (CWnd *pNewWnd) |
| | WM_KILLFOCUS message handler called when CComboBox is loosing focus to other control.
|
| |
| afx_msg void | OnSetFocus (CWnd *pOldWnd) |
| | WM_SETFOCUS message handler called when CComboBox is receiving focus from other control.
|
| |
| afx_msg void | OnDestroy () |
| | WM_DESTROY message handler called when CComboBox window is about to be destroyed.
|
| |
| afx_msg void | OnDropDown () |
| | CBN_DROPDOWN message handler called when the CComboBox control is expanded into a dropdown list.
|
| |
| afx_msg void | OnCloseUp () |
| | CBN_CLOSEUP message handler called when the CComboBox control dropdown list is closed up.
|
| |
| afx_msg void | OnChangeSelection () |
| | CBN_SELCHANGE, CBN_SELENDOK message handler called when the selection in the CComboBox control has been modified.
|
| |
| afx_msg void | OnChar (UINT nChar, UINT nRepCnt, UINT nFlags) |
| | WM_CHAR message handler to monitor selection modifications.
|
| |
| virtual void | PostNcDestroy () |
| | Called by the default OnNcDestroy (WM_NCDESTROY) message handler, when CComboBox window has been be destroyed.
|
| |
| virtual BOOL | PreTranslateMessage (MSG *pMsg) |
| | Hook to proces windows messages before they are dispatched.
|
| |
|
| DECLARE_MESSAGE_MAP () |
| |
|
|
CGridEditorComboBoxEdit | m_Edit |
| | Subclassed edit control inside the CComboBox.
|
| |
|
bool | m_Completed |
| | Ensure the editor only reacts to a single close event.
|
| |
|
bool | m_Modified |
| | Register if selection was modified while the editor was open.
|
| |
|
int | m_Row |
| | The index of the row being edited.
|
| |
|
int | m_Col |
| | The index of the column being edited.
|
| |
|
UINT | m_MaxWidthPixels |
| | Max width (in pixels) of the CComboBox when doing dropdown.
|
| |
|
UINT | m_MaxHeightItems |
| | Max height (in items) of the CComboBox when doing dropdown.
|
| |
|
BOOL | m_ShowDropDown |
| | Show drop down of the CComboBox at edit begin.
|
| |
CComboBox for inplace edit. For internal use by CGridColumnTraitCombo.
| BOOL CGridEditorComboBox::Create |
( |
DWORD |
dwStyle, |
|
|
const RECT & |
rect, |
|
|
CWnd * |
pParentWnd, |
|
|
UINT |
nID |
|
) |
| |
|
virtual |
Creates the CComboBox control, and subclasses the internal CEdit control to implement special behavior for completing cell value editing.
- Parameters
-
| dwStyle | Specifies the style of the combo box |
| rect | Points to the position and size of the combo box |
| pParentWnd | pecifies the combo box's parent window. It must not be NULL. |
| nID | Specifies the combo box's control ID. |
| void CGridEditorComboBox::EndEdit |
( |
bool |
bSuccess | ) |
|
|
virtual |
The cell value editor was closed and the entered should be saved.
- Parameters
-
| bSuccess | Should the entered cell value be saved |
| void CGridEditorComboBox::OnChangeSelection |
( |
| ) |
|
|
protected |
CBN_SELCHANGE, CBN_SELENDOK message handler called when the selection in the CComboBox control has been modified.
| void CGridEditorComboBox::OnChar |
( |
UINT |
nChar, |
|
|
UINT |
nRepCnt, |
|
|
UINT |
nFlags |
|
) |
| |
|
protected |
WM_CHAR message handler to monitor selection modifications.
- Parameters
-
| nChar | Specifies the virtual key code of the given key. |
| nRepCnt | Repeat count (the number of times the keystroke is repeated as a result of the user holding down the key). |
| nFlags | Specifies the scan code, key-transition code, previous key state, and context code |
| void CGridEditorComboBox::OnCloseUp |
( |
| ) |
|
|
protected |
CBN_CLOSEUP message handler called when the CComboBox control dropdown list is closed up.
| void CGridEditorComboBox::OnDestroy |
( |
| ) |
|
|
protected |
WM_DESTROY message handler called when CComboBox window is about to be destroyed.
Used to unsubclass the internal CEdit control.
| void CGridEditorComboBox::OnDropDown |
( |
| ) |
|
|
protected |
CBN_DROPDOWN message handler called when the CComboBox control is expanded into a dropdown list.
Used to restrict the width of the dropdown list to the max width.
| void CGridEditorComboBox::OnKillFocus |
( |
CWnd * |
pNewWnd | ) |
|
|
protected |
WM_KILLFOCUS message handler called when CComboBox is loosing focus to other control.
Used register that cell value editor should close.
- Parameters
-
| pNewWnd | Pointer to the window that receives the input focus (may be NULL or may be temporary). |
| void CGridEditorComboBox::OnSetFocus |
( |
CWnd * |
pOldWnd | ) |
|
|
protected |
WM_SETFOCUS message handler called when CComboBox is receiving focus from other control.
Used to display drop down automatically
- Parameters
-
| pOldWnd | Contains the CWnd object that loses the input focus (may be NULL). |
| void CGridEditorComboBox::PostNcDestroy |
( |
| ) |
|
|
protectedvirtual |
Called by the default OnNcDestroy (WM_NCDESTROY) message handler, when CComboBox window has been be destroyed.
Used to delete the inplace CComboBox editor object as well. This is necessary when the CComboBox is created dynamically.
| BOOL CGridEditorComboBox::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
-
| pMsg | Points 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.