当前位置: 首页>>代码示例>>C++>>正文


C++ EndEdit函数代码示例

本文整理汇总了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);
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:33,代码来源:ExGridCtrl.cpp

示例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);
}
开发者ID:pesci2k,项目名称:cgridlistctrlex,代码行数:32,代码来源:CGridColumnTraitEdit.cpp

示例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;
}
开发者ID:KnowNo,项目名称:test-code-backup,代码行数:29,代码来源:ReportCtrl.cpp

示例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;
}
开发者ID:KnowNo,项目名称:test-code-backup,代码行数:29,代码来源:ReportCtrl.cpp

示例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));
   }
}
开发者ID:Mrunali,项目名称:Virtual-Dimention,代码行数:26,代码来源:ApplicationListDlg.cpp

示例6: EndEdit

void PropEditCtrlXRCID::Clear()
{
    EndEdit();
    REAL_NODE->DeleteProperty(_T("name"));
    m_TreeCtrl->SetItemBold(m_TreeItem, FALSE);
    EditorFrame::Get()->NotifyChanged(CHANGED_TREE_SELECTED);
}
开发者ID:mentat,项目名称:YardSale,代码行数:7,代码来源:pe_basic.cpp

示例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;
}
开发者ID:sanyaade-webdev,项目名称:wpub,代码行数:35,代码来源:HtmlProperties.cpp

示例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()));
}
开发者ID:pvanek,项目名称:scribus-cuba-trunk,代码行数:32,代码来源:nodeeditpalette.cpp

示例9: EndEdit

RenderEngine::~RenderEngine() {
	if (editMode)
		EndEdit(EditActionList());
	if (started)
		Stop();

	delete ctx;
}
开发者ID:kwadwobro1,项目名称:luxrender-luxrays,代码行数:8,代码来源:renderengine.cpp

示例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);
}
开发者ID:AmesianX,项目名称:A-Protect,代码行数:8,代码来源:ReportCtrl.cpp

示例11: EndEdit

void CInPlaceDateTime::OnKillFocus(CWnd* pNewWnd) 
{
	CDateTimeCtrl::OnKillFocus(pNewWnd);

	if (GetSafeHwnd() == pNewWnd->GetSafeHwnd()) {
		return;
	}
	EndEdit();
}
开发者ID:neil78duan,项目名称:apollolib,代码行数:9,代码来源:GridCellDateTime.cpp

示例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);
}
开发者ID:kookie424,项目名称:cgridlistctrlex,代码行数:25,代码来源:CGridColumnTraitDateTime.cpp

示例13: EndEdit

void CReportCtrl::SetEditable(BOOL bSet)
{
	if(!bSet)
	{
		EndEdit(TRUE);
	}

	m_bAllowEdit = bSet;
}
开发者ID:340211173,项目名称:hf-2011,代码行数:9,代码来源:Reportctrl.cpp

示例14: EndEdit

RenderSession::~RenderSession() {
	if (editMode)
		EndEdit();
	if (started)
		Stop();

	delete film;
	delete renderConfig;
}
开发者ID:rbrtribeiro,项目名称:smalllux3,代码行数:9,代码来源:rendersession.cpp

示例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;
}
开发者ID:ducknoir,项目名称:audacity,代码行数:9,代码来源:Grid.cpp


注:本文中的EndEdit函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。