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


C++ SetRedraw函数代码示例

本文整理汇总了C++中SetRedraw函数的典型用法代码示例。如果您正苦于以下问题:C++ SetRedraw函数的具体用法?C++ SetRedraw怎么用?C++ SetRedraw使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了SetRedraw函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ATLASSERT

LRESULT CScriptEditView::OnFindReplaceCmd( UINT, WPARAM, LPARAM lParam, BOOL& )
{
	CFindReplaceDialog* pDlg = CFindReplaceDialog::GetNotifier(lParam);
	if( pDlg == NULL )
	{
		::MessageBeep( (UINT)-1 );
		return 1;
	}
	ATLASSERT( pDlg == m_pFindDlg );

	if( pDlg->IsTerminating() )
	{
		m_pFindDlg = NULL;
		return 0;
	}

	lstrcpyn( m_fro.StrToFind, pDlg->m_fr.lpstrFindWhat, DIMOF(m_fro.StrToFind) );
	m_fro.bMatchCase = (pDlg->MatchCase() != FALSE);
	m_fro.bWholeWord = (pDlg->MatchWholeWord() != FALSE);

	if( pDlg->FindNext() )
	{
		if( !DoFindText() )
			::MessageBeep( (UINT)-1 );
	}
	else if( pDlg->ReplaceCurrent() )
	{
		long nStart, nEnd;
		GetSel( nStart, nEnd );

		if( nStart != nEnd )
		{
			LPTSTR szFind = (LPTSTR)_alloca( (nEnd - nStart + 1) * sizeof(TCHAR) );
			GetSelText( szFind );
			int nRet;
			if( m_fro.bMatchCase )
				nRet = lstrcmp( szFind, m_fro.StrToFind );
			else
				nRet = lstrcmpi( szFind, m_fro.StrToFind );
			if(nRet == 0)
				ReplaceSel( pDlg->GetReplaceString(), TRUE );
		}

		if( !DoFindText() )
			::MessageBeep( (UINT)-1 );

	}
	else if( pDlg->ReplaceAll() )
	{
		SetRedraw(FALSE);
		CWaitCursor wait;
		while( DoFindText(false) )
			ReplaceSel( pDlg->GetReplaceString(), TRUE );
		SetRedraw( TRUE );
		Invalidate();
		UpdateWindow();
	}

	return 0;
}
开发者ID:localvar,项目名称:backup,代码行数:60,代码来源:EditView.cpp

示例2: trim

int CLogListBox::AddString(LogMsgType Type, const CString& strTitle, const CString& strText, const CString& szInfo)
{
	LogListBoxItem * item = new  LogListBoxItem;
	item->Type = Type;

	SYSTEMTIME st;
	::GetLocalTime(&st);
	CString Data;
	Data.Format(_T("%02d:%02d:%02d"), (int)st.wHour, (int)st.wMinute, (int)st.wSecond);
	
	item->strText = trim(strText);
	item->strTitle = trim(strTitle);
	item->Info = trim(szInfo);
	item->Time = Data;

	SetRedraw(FALSE);
	int nPos = CListBox::AddString((LPCTSTR)item);

   if(nPos < 0) return -1;

   SetItemDataPtr(nPos, item);
	SetTopIndex(nPos-1);
	SetCurSel(nPos);
	SetRedraw(TRUE);
	return nPos;
}
开发者ID:vladios13,项目名称:image-uploader,代码行数:26,代码来源:LogListBox.cpp

示例3: SetRedraw

void CClassView::RefreshTree()
{
	vfc_token_tree * tree = m_cb.get_tree();

	SetRedraw(FALSE);

	DeleteAllItems();
	m_itemRoot	= InsertItem(m_workName,0,0,TVI_ROOT,NULL);
	m_itemGlobalFunction = InsertItem(_T("Globals"),2,2,m_itemRoot,NULL);
	m_itemGlobalTypedef = InsertItem(_T("Globals Typedef"),14,14,m_itemRoot,NULL);
	m_itemGlobalDefine = InsertItem(_T("Globals Define"),12,12,m_itemRoot,NULL);

	vfc_token_array tks;
	if (!tree->get_token_array(&tks))
		return;
	for (size_t i = 0; i < tks.size(); i++)
	{
		vfc_token * tk = tks.at(i);
		if (tk && tk->get_parent() == NULL)
		{
			InsertToken(tk,m_itemRoot);
		}
	}

	Expand(m_itemRoot);

	SetRedraw(TRUE);
}
开发者ID:bezigon,项目名称:liteide.oldcpp,代码行数:28,代码来源:ClassView.cpp

示例4: SetRedraw

BOOL CPPageAdvanced::OnInitDialog()
{
    __super::OnInitDialog();

    if (CFont* pFont = m_list.GetFont()) {
        LOGFONT logfont;
        pFont->GetLogFont(&logfont);
        logfont.lfWeight = FW_BOLD;
        m_fontBold.CreateFontIndirect(&logfont);
    }

    SetRedraw(FALSE);
    m_list.SetExtendedStyle(m_list.GetExtendedStyle() | LVS_EX_FULLROWSELECT | LVS_EX_AUTOSIZECOLUMNS | LVS_EX_DOUBLEBUFFER | LVS_EX_INFOTIP);
    m_list.InsertColumn(COL_NAME, ResStr(IDS_PPAGEADVANCED_COL_NAME), LVCFMT_LEFT);
    m_list.InsertColumn(COL_VALUE, ResStr(IDS_PPAGEADVANCED_COL_VALUE), LVCFMT_RIGHT);

    GetDlgItem(IDC_EDIT1)->ShowWindow(SW_HIDE);
    GetDlgItem(IDC_COMBO1)->ShowWindow(SW_HIDE);
    GetDlgItem(IDC_RADIO1)->ShowWindow(SW_HIDE);
    GetDlgItem(IDC_RADIO2)->ShowWindow(SW_HIDE);
    GetDlgItem(IDC_BUTTON1)->ShowWindow(SW_HIDE);

    InitSettings();

    for (int i = 0; i < m_list.GetHeaderCtrl()->GetItemCount(); ++i) {
        m_list.SetColumnWidth(i, LVSCW_AUTOSIZE_USEHEADER);
    }
    SetRedraw(TRUE);
    return TRUE;
}
开发者ID:Grimace1975,项目名称:mpc-hc,代码行数:30,代码来源:PPageAdvanced.cpp

示例5: SetRedraw

void CDirectoryTreeCtrl::OnTvnItemexpanding(NMHDR *pNMHDR, LRESULT *pResult)
{
	CWaitCursor curWait;
	SetRedraw(FALSE);

	LPNMTREEVIEW pNMTreeView = reinterpret_cast<LPNMTREEVIEW>(pNMHDR);
	HTREEITEM hItem = pNMTreeView->itemNew.hItem;
	// remove all subitems
	HTREEITEM hRemove = GetChildItem(hItem);
	while(hRemove)
	{
		DeleteItem(hRemove);
		hRemove = GetChildItem(hItem);
	}

	// get the directory
	CString strDir = GetFullPath(hItem);

	// fetch all subdirectories and add them to the node
	AddSubdirectories(hItem, strDir);

	SetRedraw(TRUE);
	Invalidate();
	*pResult = 0;
}
开发者ID:BackupTheBerlios,项目名称:nextemf,代码行数:25,代码来源:DirectoryTreeCtrl.cpp

示例6: Init

void CRefLogList::InsertRefLogColumn()
{
	CString temp;

	Init();
	SetStyle();

	static UINT normal[] =
	{
		IDS_HASH,
		IDS_REF,
		IDS_ACTION,
		IDS_MESSAGE,
		IDS_STATUSLIST_COLDATE,
	};

	static int with[] =
	{
		ICONITEMBORDER+16*4,
		ICONITEMBORDER+16*4,
		ICONITEMBORDER+16*4,
		LOGLIST_MESSAGE_MIN,
		ICONITEMBORDER+16*4,
	};
	m_dwDefaultColumns = 0xFFFF;

	SetRedraw(false);

	m_ColumnManager.SetNames(normal, _countof(normal));
	m_ColumnManager.ReadSettings(m_dwDefaultColumns, 0, m_ColumnRegKey + L"loglist", _countof(normal), with);

	SetRedraw(true);
}
开发者ID:YueLinHo,项目名称:TortoiseGit,代码行数:33,代码来源:refloglist.cpp

示例7: SetRedraw

WebWatch::SiteItemGroup & CSiteGroupsTree::BuildTree(WebWatch::SiteItemGroup & group)
{
    SetRedraw(FALSE);

    DeleteAllItems();
    m_group2item.clear();

    HTREEITEM root = InsertGroupItem(group);

    WebWatch::SiteItemGroup *defaultGroup = 0;

    WebWatch::SiteItemGroup::GroupIterator it = group.GetGroupsBegin();
    WebWatch::SiteItemGroup::GroupIterator end = group.GetGroupsEnd();
    GroupAppender appender(*this, root);

    while (it != end) {
        WebWatch::SiteItemGroup *subgroup = *it;
        appender(subgroup);

        if (defaultGroup == 0 && subgroup->GetName() == "Default")
            defaultGroup = subgroup;

        ++it;
    }

    SetRedraw();

    if (defaultGroup == 0)
        defaultGroup = &group;

    return *defaultGroup;
}
开发者ID:death,项目名称:webwatch,代码行数:32,代码来源:SiteGroupsTree.cpp

示例8: ASSERT

//设置列信息
bool CUserListView::SetColumnDescribe(tagColumnItem ColumnItem[], WORD wColumnCount)
{
	//效验状态
	ASSERT(ColumnItem!=NULL);
	if (GetSafeHwnd()==NULL) return false;

	//删除旧信息
	m_wColumnCount=0;
	WORD wTempCount=m_SkinHeadCtrl.GetItemCount();
	for (WORD i=0;i<wTempCount;i++) DeleteColumn(0);

	//调整参数
	wColumnCount=__min(MAX_COLUMN-1,wColumnCount);

	//插入新信息
	SetRedraw(FALSE);
	for (WORD i=0;i<wColumnCount;i++)
	{
		m_wDataDescribe[i]=ColumnItem[i].wDataDescribe;
		if (m_wColumnCount==0) InsertColumn(m_wColumnCount++,ColumnItem[i].szColumnName,LVCFMT_LEFT,ColumnItem[i].wColumnWidth+m_uImageSpace);
		else InsertColumn(m_wColumnCount++,ColumnItem[i].szColumnName,LVCFMT_LEFT,ColumnItem[i].wColumnWidth);
	}
	SetRedraw(TRUE);

	return true;
}
开发者ID:vsanth,项目名称:kkj,代码行数:27,代码来源:UserListView.cpp

示例9: AutoSizeColumns

/*
	AutoSizeColumns()

	Dimensiona automaticamente le colonne in base al contenuto/etichetta, da chiamare dopo aver riempito il controllo.
	Usare solo se il controllo si trova in modalita' report.
*/
void CListViewEx::AutoSizeColumns(int nWidthArray[]/*=NULL*/,int nCol/*=-1*/,int nWidth/*=0*/)
{
	SetRedraw(FALSE);

	// deve trovarsi in modalita' report
	if((GetStyle() & LVS_REPORT))
	{
		int nMinCol = nCol < 0 ? 0 : nCol;
		int nMaxCol = nCol < 0 ? GetColumnCount()-1 : nCol;
		
		for(nCol = nMinCol; nCol <= nMaxCol; nCol++) 
		{
			if(nWidthArray)
				nWidth = nWidthArray[nCol];

			if(nWidth <= 0)
			{
				GetListCtrl().SetColumnWidth(nCol,LVSCW_AUTOSIZE);
				int nWidthAutosize = GetListCtrl().GetColumnWidth(nCol);

				GetListCtrl().SetColumnWidth(nCol,LVSCW_AUTOSIZE_USEHEADER);
				int nWidthUseHeader = GetListCtrl().GetColumnWidth(nCol);

				GetListCtrl().SetColumnWidth(nCol,max(MIN_COL_WIDTH,max(nWidthAutosize,nWidthUseHeader)));
			}
			else
				GetListCtrl().SetColumnWidth(nCol,nWidth);
		}
		
		RecalcHeaderTips();
	}

	SetRedraw(TRUE);
}
开发者ID:code4bones,项目名称:crawlpaper,代码行数:40,代码来源:CListViewEx.cpp

示例10: GetFocusHeroes

void Interface::Basic::EventDefaultAction(void)
{
    Heroes* hero = GetFocusHeroes();

    if(hero)
    {
	const Maps::Tiles & tile = world.GetTiles(hero->GetIndex());

	// 1. action object
	if(MP2::isActionObject(hero->GetMapsObject(), hero->isShipMaster()) &&
	    (! MP2::isMoveObject(hero->GetMapsObject()) || hero->CanMove()))
	{
	    hero->Action(hero->GetIndex());
	    if(MP2::OBJ_STONELIGHTS == tile.GetObject(false) || MP2::OBJ_WHIRLPOOL == tile.GetObject(false))
		SetRedraw(REDRAW_HEROES);
	    SetRedraw(REDRAW_GAMEAREA);
	}
	else
	// 2. continue
        if(hero->GetPath().isValid())
    	    hero->SetMove(true);
	else
	// 3. hero dialog
	    Game::OpenHeroesDialog(*hero);
    }
    else
    // 4. town dialog
    if(GetFocusCastle())
    {
	Game::OpenCastleDialog(*GetFocusCastle());
    }
}
开发者ID:mastermind-,项目名称:free-heroes,代码行数:32,代码来源:interface_events.cpp

示例11: SetRedraw

//------------------------------------------------------------------------
//! Changes the row sorting in regard to the specified column
//!
//! @param nCol The index of the column
//! @param bAscending Should the arrow be up or down 
//! @return True / false depending on whether sort is possible
//------------------------------------------------------------------------
bool CGridListCtrlGroups::SortColumn(int nCol, bool bAscending)
{
	CWaitCursor waitCursor;

	if (IsGroupViewEnabled())
	{
		SetRedraw(FALSE);

		GroupByColumn(nCol);

		// Cannot use GetGroupInfo during sort
		PARAMSORT paramsort(m_hWnd, nCol, bAscending, GetColumnTrait(nCol));
		for(int nRow=0 ; nRow < GetItemCount() ; ++nRow)
		{
			int nGroupId = GetRowGroupId(nRow);
			if (nGroupId!=-1 && paramsort.m_GroupNames.FindKey(nGroupId)==-1)
				paramsort.m_GroupNames.Add(nGroupId, GetGroupHeader(nGroupId));
		}

		SetRedraw(TRUE);
		Invalidate(FALSE);

		// Avoid bug in CListCtrl::SortGroups() which differs from ListView_SortGroups
		if (!ListView_SortGroups(m_hWnd, SortFuncGroup, &paramsort))
			return false;
	}
	else
	{
		if (!CGridListCtrlEx::SortColumn(nCol, bAscending))
			return false;
	}

	return true;
}
开发者ID:Lyarvo4ka,项目名称:Projects,代码行数:41,代码来源:CGridListCtrlGroups.cpp

示例12: AutoSizeColumns

/*
	AutoSizeColumns()

	Dimensiona automaticamente le colonne in base al contenuto/etichetta (solo se il controllo si trova in modalita' report).
	Da chiamare dopo aver riempito il controllo.
*/
void CListCtrlEx::AutoSizeColumns(int nCol/*=-1*/,int nWidth/*=0*/) 
{
	SetRedraw(FALSE);

	if(!(GetStyle() & LVS_REPORT))
		return;

	int nMinCol = nCol < 0 ? 0 : nCol;
	int nMaxCol = nCol < 0 ? GetColumnCount()-1 : nCol;
	
	for(nCol = nMinCol; nCol <= nMaxCol; nCol++) 
	{
		if(nWidth==0)
		{
			CListCtrl::SetColumnWidth(nCol,LVSCW_AUTOSIZE);
			int nWidthAutosize = CListCtrl::GetColumnWidth(nCol);

			CListCtrl::SetColumnWidth(nCol,LVSCW_AUTOSIZE_USEHEADER);
			int nWidthUseHeader = CListCtrl::GetColumnWidth(nCol);

			CListCtrl::SetColumnWidth(nCol,max(MIN_ITEM_WIDTH,max(nWidthAutosize,nWidthUseHeader)));
		}
		else
			CListCtrl::SetColumnWidth(nCol,nWidth);     
	}

	SetRedraw(TRUE);
}
开发者ID:code4bones,项目名称:crawlpaper,代码行数:34,代码来源:CListCtrlEx.cpp

示例13: SetRedraw

void Interface::Basic::EventSystemDialog(void)
{
    const Settings & conf = Settings::Get();

    // Change and save system settings
    const int changes = Dialog::SystemOptions();

    // change scroll
    if(0x10 & changes)
    {
	// hardcore reset pos
	gameArea.SetCenter(0, 0);
	if(GetFocusType() != GameFocus::UNSEL)
	    gameArea.SetCenter(GetFocusCenter());
        gameArea.SetRedraw();

	if(conf.ExtGameHideInterface())
	    controlPanel.ResetTheme();
    }

    // interface themes
    if(0x08 & changes)
    {
        SetRedraw(REDRAW_ICONS | REDRAW_BUTTONS | REDRAW_STATUS | REDRAW_BORDER);
    }

    // interface hide/show
    if(0x04 & changes)
    {
	SetHideInterface(conf.ExtGameHideInterface());
        SetRedraw(REDRAW_ALL);
	ResetFocus(GameFocus::HEROES);
	Redraw();
    }
}
开发者ID:mastermind-,项目名称:free-heroes,代码行数:35,代码来源:interface_events.cpp

示例14: SetRedraw

void CTreeFileCtrl::DisplayDrives(HTREEITEM hParent, BOOL bUseSetRedraw)
{
  CWaitCursor c;

  //Speed up the job by turning off redraw
  if (bUseSetRedraw)
    SetRedraw(FALSE);

  //Remove any items currently in the tree
  DeleteAllItems();

  //Enumerate the drive letters and add them to the tree control
  DWORD dwDrives = GetLogicalDrives();
  DWORD dwMask = 1;
  for (int i=0; i<32; i++)
  {
    if (dwDrives & dwMask)
    {
      CString sDrive;
      sDrive.Format(_T("%c:\\"), i + _T('A'));
      InsertFileItem(sDrive, sDrive, hParent);
    }
    dwMask <<= 1;
  }

  if (bUseSetRedraw)
    SetRedraw(TRUE);
}
开发者ID:5432935,项目名称:genesis3d,代码行数:28,代码来源:FileTreeCtrl.cpp

示例15: GetRootItem

// This takes a string and uses it to set the expanded or
// collapsed state of the tree items.
int CStatisticsTree::ApplyExpandedMask(CString theMask, HTREEITEM theItem, int theStringIndex)
{
	HTREEITEM	hCurrent;

	if (theItem == NULL) {
		hCurrent = GetRootItem();
		SetRedraw(false);
		ExpandAll(true);
		m_bExpandingAll = true;
	}
	else
		hCurrent = theItem;

	while (hCurrent != NULL && theStringIndex < theMask.GetLength())
	{
		if (ItemHasChildren(hCurrent) && IsBold(hCurrent)) {
			if (theMask.GetAt(theStringIndex) == '0') Expand(hCurrent, TVE_COLLAPSE);
			theStringIndex++;
			theStringIndex = ApplyExpandedMask(theMask, GetChildItem(hCurrent), theStringIndex);			
		}
		hCurrent = GetNextItem(hCurrent, TVGN_NEXT);
	}
	if (theItem == NULL) {
		SetRedraw(true);
		m_bExpandingAll = true;
	}
	return theStringIndex;
}
开发者ID:axxapp,项目名称:winxgui,代码行数:30,代码来源:StatisticsTree.cpp


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