本文整理汇总了C++中EndEdit函数的典型用法代码示例。如果您正苦于以下问题:C++ EndEdit函数的具体用法?C++ EndEdit怎么用?C++ EndEdit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了EndEdit函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: EndEdit
bool ExGridCtrl::Key(dword key, int count)
{
if (!_UseKeys && !IsEdit())
return GridCtrl::Key(key, count);
bool result;
if (key == K_UP)
{
if (0 < curpos.y || curpos.y <= GetRowCount() + 1)
{
EndEdit();
SetCursor(curpos.y - 1);
result = GridCtrl::Key(key, count);
StartEdit();
return result;
}
}
if (key == K_DOWN)
{
if (0 <= curpos.y || curpos.y < GetRowCount())
{
EndEdit();
SetCursor(curpos.y - 1);
result = GridCtrl::Key(key, count);
StartEdit();
return result;
}
}
return GridCtrl::Key(key, count);
}
示例2: switch
//------------------------------------------------------------------------
//! Hook to proces windows messages before they are dispatched.
//! Catch keyboard events that can should cause the cell value editor to close
//!
//! @param pMsg Points to a MSG structure that contains the message to process
//! @return Nonzero if the message was translated and should not be dispatched; 0 if the message was not translated and should be dispatched.
//------------------------------------------------------------------------
BOOL CGridEditorText::PreTranslateMessage(MSG* pMsg)
{
switch (pMsg->message)
{
case WM_KEYDOWN:
{
switch (pMsg->wParam)
{
case VK_RETURN:
{
if (GetStyle() & ES_WANTRETURN)
break;
EndEdit(true);
return TRUE;
}
case VK_TAB: EndEdit(true); return FALSE;
case VK_ESCAPE: EndEdit(false);return TRUE;
}
break;
};
case WM_MOUSEWHEEL: EndEdit(true); return FALSE; // Don't steal event
}
return CEdit::PreTranslateMessage(pMsg);
}
示例3: DeleteAllItems
// the heading text is in the format of "text,width,format;text,width,format;..."
BOOL CReportCtrl::SetColumnHeader(const CString& strHeadings)
{
DeleteAllItems();
DeleteAllColumns();
EndEdit(TRUE);
BOOL bInserted = FALSE;
CStringArray aLong, aShort;
_StringSplit(strHeadings, aLong, _T(';'));
for (int i = 0; i < aLong.GetSize(); i++)
{
_StringSplit(aLong[i], aShort, _T(','));
if (aShort.GetSize() > 0)
{
const int WIDTH = aShort.GetSize() > 1 ? _ttoi(aShort[1]) : 100;
int nFormat = aShort.GetSize() > 2 ? _ttoi(aShort[2]) : 0;
if (nFormat == 1)
nFormat = LVCFMT_CENTER;
else if (nFormat == 2)
nFormat = LVCFMT_RIGHT;
else
nFormat = LVCFMT_LEFT;
bInserted |= (InsertColumn(GetColumnCount(), aShort[0], nFormat, WIDTH) >= 0);
}
}
return bInserted;
}
示例4: EndEdit
int CReportCtrl::DeleteAllItems(DWORD dwStates)
{
EndEdit(FALSE);
int nItemCount = CListCtrl::GetItemCount();
if (dwStates & RC_ITEM_ALL)
{
LockWindowUpdate();
for (int i = 0; i < nItemCount; i++)
_FreeItemMemory(i);
CListCtrl::DeleteAllItems();
UnlockWindowUpdate();
return nItemCount;
}
int nDelCount = 0;
LockWindowUpdate();
for (int i = 0; i < nItemCount; i++)
{
if (ExamItemStates(i, dwStates))
{
DeleteItem(i--);
nItemCount--;
nDelCount++;
}
}
UnlockWindowUpdate();
return nDelCount;
}
示例5: EndEdit
void ApplicationListDlg::OnApply()
{
int i = 0;
TCHAR filename[MAX_PATH];
DWORD length = MAX_PATH;
//Validate current parameter, if any
if (IsEditing())
EndEdit();
//Remove entries which have been removed (ie are not in the list box)
while(length=MAX_PATH, m_appgroup->EnumEntry(i, filename, &length))
{
if (FindProgram(filename) != -1)
i++;
else
m_appgroup->RemoveEntry(filename);
}
//Add/set value for all entries in the list box
for(i=0; i<ListView_GetItemCount(m_hAppListWnd); i++)
{
ListView_GetItemText(m_hAppListWnd, i, 0, filename, length);
m_appgroup->SaveDWord(filename, GetProgramParam(i));
}
}
示例6: EndEdit
void PropEditCtrlXRCID::Clear()
{
EndEdit();
REAL_NODE->DeleteProperty(_T("name"));
m_TreeCtrl->SetItemBold(m_TreeItem, FALSE);
EditorFrame::Get()->NotifyChanged(CHANGED_TREE_SELECTED);
}
示例7: EndEdit
BOOL CHtmlProperties::Show( CReg *pReg)
{
EndEdit();
// Destroy properties list
GetPropList().Destroy();
// Lose list items
GetListCtrl().Destroy();
// Rebuild header
GetListCtrl().GetHeader().Destroy();
GetListCtrl().GetHeader().AddHeaderItem( 120, "Name" );
GetListCtrl().GetHeader().AddHeaderItem( 120, "Value" );
if ( pReg == NULL )
{ LoadList();
RedrawWindow();
return FALSE;
} // end if
// Add variables
AddKey( pReg, pReg->GetKey( "vars" ) );
AddKey( pReg, pReg->GetKey( "lvars" ) );
AddKey( pReg, pReg->GetKey( "dvars" ) );
// AddDynamic( pReg );
// Loadup the list
LoadList();
RedrawWindow();
return TRUE;
}
示例8: disconnect
void NodePalette::disconnectSignals()
{
// signals and slots disconnetions
disconnect(editEditButton, SIGNAL(clicked()), this, SLOT(EndEdit()));
disconnect(DeleteNode, SIGNAL(clicked()), this, SLOT(DelN()));
disconnect(AddNode, SIGNAL(clicked()), this, SLOT(AddN()));
disconnect(MoveNode, SIGNAL(clicked()), this, SLOT(MoveN()));
disconnect(AsymMove, SIGNAL(clicked()), this, SLOT(SetAsym()));
disconnect(SymMove, SIGNAL(clicked()), this, SLOT(SetSym()));
disconnect(ResNode, SIGNAL(clicked()), this, SLOT(ResetControl()));
disconnect(Res1Node, SIGNAL(clicked()), this, SLOT(Reset1Control()));
disconnect(BezierClose, SIGNAL(clicked()), this, SLOT(CloseBezier()));
disconnect(PolySplit, SIGNAL(clicked()), this, SLOT(SplitPoly()));
disconnect(MoveControl, SIGNAL(clicked()), this, SLOT(MoveK()));
disconnect(XSpin, SIGNAL(valueChanged(double)), this, SLOT(MovePoint()));
disconnect(YSpin, SIGNAL(valueChanged(double)), this, SLOT(MovePoint()));
disconnect(PolyMirrorH, SIGNAL(clicked()), this, SLOT(MirrorH()));
disconnect(PolyMirrorV, SIGNAL(clicked()), this, SLOT(MirrorV()));
disconnect(PolyShearR, SIGNAL(clicked()), this, SLOT(ShearR()));
disconnect(PolyShearL, SIGNAL(clicked()), this, SLOT(ShearL()));
disconnect(PolyShearU, SIGNAL(clicked()), this, SLOT(ShearU()));
disconnect(PolyShearD, SIGNAL(clicked()), this, SLOT(ShearD()));
disconnect(RotateCCW, SIGNAL(clicked()), this, SLOT(doRotCCW()));
disconnect(RotateCW, SIGNAL(clicked()), this, SLOT(doRotCW()));
disconnect(Shrink, SIGNAL(clicked()), this, SLOT(doShrink()));
disconnect(Expand, SIGNAL(clicked()), this, SLOT(doExpand()));
disconnect(Reduce, SIGNAL(clicked()), this, SLOT(doReduce()));
disconnect(Enlarge, SIGNAL(clicked()), this, SLOT(doEnlarge()));
disconnect(ResetCont, SIGNAL(clicked()), this, SLOT(ResetContour()));
disconnect(ResetContClip, SIGNAL(clicked()), this, SLOT(ResetContourToImageClip()));
disconnect(ResetShape2Clip, SIGNAL(clicked()), this, SLOT(ResetShapeToImageClip()));
}
示例9: EndEdit
RenderEngine::~RenderEngine() {
if (editMode)
EndEdit(EditActionList());
if (started)
Stop();
delete ctx;
}
示例10: EndEdit
void CReportCtrl::InsertItem(int nIndex,LPCTSTR lpText,COLORREF color)
{
EndEdit(TRUE);
_UnsetSortedColumn();
const int IDX = CListCtrl::InsertItem(nIndex, lpText);
_AllocItemMemory(IDX);
SetItemTextColor(nIndex,-1,color,FALSE);
}
示例11: EndEdit
void CInPlaceDateTime::OnKillFocus(CWnd* pNewWnd)
{
CDateTimeCtrl::OnKillFocus(pNewWnd);
if (GetSafeHwnd() == pNewWnd->GetSafeHwnd()) {
return;
}
EndEdit();
}
示例12: switch
//------------------------------------------------------------------------
//! Hook to proces windows messages before they are dispatched.
//! Catch keyboard events that can should cause the cell value editor to close
//!
//! @param pMsg Points to a MSG structure that contains the message to process
//! @return Nonzero if the message was translated and should not be dispatched; 0 if the message was not translated and should be dispatched.
//------------------------------------------------------------------------
BOOL CGridEditorDateTimeCtrl::PreTranslateMessage(MSG* pMsg)
{
switch(pMsg->message)
{
case WM_KEYDOWN:
{
switch(pMsg->wParam)
{
case VK_RETURN: EndEdit(true); return TRUE;
case VK_TAB: EndEdit(true); return FALSE;
case VK_ESCAPE: EndEdit(false);return TRUE;
}
break;
};
case WM_MOUSEWHEEL: EndEdit(true); return FALSE; // Don't steal event
}
return CDateTimeCtrl::PreTranslateMessage(pMsg);
}
示例13: EndEdit
void CReportCtrl::SetEditable(BOOL bSet)
{
if(!bSet)
{
EndEdit(TRUE);
}
m_bAllowEdit = bSet;
}
示例14: EndEdit
RenderSession::~RenderSession() {
if (editMode)
EndEdit();
if (started)
Stop();
delete film;
delete renderConfig;
}
示例15: EndEdit
bool TimeEditor::EndEdit(int row, int col, wxGrid *grid)
{
wxString newvalue;
bool changed = EndEdit(row, col, grid, mOldString, &newvalue);
if (changed) {
ApplyEdit(row, col, grid);
}
return changed;
}