• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GetItemCount函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: GetItemCount

int CHeaderCtrlExt::IndexToOrder(int nIndex)
{
	int nOrder = -1;
	const int nCount = GetItemCount();
	if(nCount > 0)
	{
        int* piColOrder = new int[nCount];
        ASSERT(piColOrder);

		GetOrderArray(piColOrder, nCount);
		for(int i = 0;i < nCount;++i)
		{
			if(piColOrder[i] == nIndex)
			{
				nOrder = i;
				break;
			}
		}
        delete []piColOrder;
	}

	return nOrder;
}
开发者ID:CodeingBoy,项目名称:StudentRatingSystem,代码行数:23,代码来源:HeaderCtrlExt.cpp


示例2: QuickSort

void CListCtrlEx::QuickSort(int nSortColumn)
{
	if (this->m_pColumnMap[abs(nSortColumn) - 1] > 0)
	{
		this->m_nSortColumn = nSortColumn;
		this->m_nCompareType = this->m_pColumnArray[abs(nSortColumn) - 1].compare;
	}
	else
		return;

	QuickSort(0, GetItemCount()-1);

	CHeaderCtrl* pHeaderCtrl = GetHeaderCtrl();
	pHeaderCtrl->SetImageList(&this->m_nArrowList);

	HDITEM hdrItem;
	int nColumns = pHeaderCtrl->GetItemCount();
	for (int index = 0; index < nColumns; index++)
	{
		hdrItem.mask = HDI_FORMAT | HDI_IMAGE | HDI_LPARAM;
		pHeaderCtrl->GetItem(index, &hdrItem);
		if (abs(this->m_nSortColumn) - 1 ==  hdrItem.lParam && this->m_nSortColumn > 0)
		{
			hdrItem.iImage = 0;
			hdrItem.fmt = hdrItem.fmt & HDF_JUSTIFYMASK | HDF_IMAGE | HDF_STRING | HDF_BITMAP_ON_RIGHT;
		}
		else if (abs(this->m_nSortColumn) - 1 == hdrItem.lParam && this->m_nSortColumn < 0)
		{
			hdrItem.iImage = 1;
			hdrItem.fmt = hdrItem.fmt & HDF_JUSTIFYMASK | HDF_IMAGE | HDF_STRING | HDF_BITMAP_ON_RIGHT;
		}
		else
			hdrItem.fmt = hdrItem.fmt & HDF_JUSTIFYMASK | HDF_STRING;

		pHeaderCtrl->SetItem(index, &hdrItem);
	}
}
开发者ID:albertzeng,项目名称:eRadQueue,代码行数:37,代码来源:ListCtrlEx.cpp


示例3: PreTranslateMessage

BOOL CMyListCtrl::PreTranslateMessage(MSG* pMsg)
{
	if( pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_CONTROL )
	{
		mkey1 = VK_CONTROL;
	}
	if( pMsg->message == WM_KEYDOWN && pMsg->wParam == 'A' )
	{
		if( mkey1 != 0 )
		{
			if( mkey2 == 0 )
			{
				mkey2 = 'A';
				for (int i=0;i<GetItemCount();++i)
				{
					SetItemState( i,LVIS_SELECTED,LVIS_SELECTED);		
				}
				return TRUE;
			}
		}
	}
	if( pMsg->message == WM_KEYUP )
	{
		mkey2 = 0;
		if(pMsg->wParam == VK_CONTROL)
			mkey1 = 0;
	}
	if( pMsg->hwnd == m_hWnd && mkey1 == 0
		&& pMsg->message == WM_KEYDOWN 
		&& (((pMsg->wParam > 0X40)&&(pMsg->wParam < 0X5B))||((pMsg->wParam > 0X60)&&(pMsg->wParam < 0X7B))) )
	{
		//Ctrol_a_z_KeyDown( short(pMsg->wParam) );
		return TRUE;
	}

	return __super::PreTranslateMessage(pMsg);
}
开发者ID:2Dou,项目名称:PlayBox,代码行数:37,代码来源:MyListCtrl.cpp


示例4: SetSelection

/// Updates the list
void wxRichTextStyleListBox::UpdateStyles()
{
    if (GetStyleSheet())
    {
        SetSelection(wxNOT_FOUND);

        m_styleNames.Clear();

        size_t i;
        if (GetStyleType() == wxRICHTEXT_STYLE_ALL || GetStyleType() == wxRICHTEXT_STYLE_PARAGRAPH)
        {
            for (i = 0; i < GetStyleSheet()->GetParagraphStyleCount(); i++)
                m_styleNames.Add(GetStyleSheet()->GetParagraphStyle(i)->GetName());
        }
        if (GetStyleType() == wxRICHTEXT_STYLE_ALL || GetStyleType() == wxRICHTEXT_STYLE_CHARACTER)
        {
            for (i = 0; i < GetStyleSheet()->GetCharacterStyleCount(); i++)
                m_styleNames.Add(GetStyleSheet()->GetCharacterStyle(i)->GetName());
        }
        if (GetStyleType() == wxRICHTEXT_STYLE_ALL || GetStyleType() == wxRICHTEXT_STYLE_LIST)
        {
            for (i = 0; i < GetStyleSheet()->GetListStyleCount(); i++)
                m_styleNames.Add(GetStyleSheet()->GetListStyle(i)->GetName());
        }

        m_styleNames.Sort();
        SetItemCount(m_styleNames.GetCount());

        Refresh();

        if (GetItemCount() > 0)
        {
            SetSelection(0);
            SendSelectedEvent();
        }
    }
}
开发者ID:hgwells,项目名称:tive,代码行数:38,代码来源:richtextstyles.cpp


示例5: InsertItem

void CRulesList::AddConflict (const CdlConflict &conf)
{
  // set the item column string
  CString strMacroName = (conf)->get_node ()->get_name ().c_str ();
  int nIndex = InsertItem (GetItemCount (), strMacroName);
  SetItemData (nIndex, (DWORD) (conf));
  
  // set the conflict column string
  if (0 != dynamic_cast<CdlConflict_Unresolved> (conf)) {// a conflict of type 'unresolved'
    SetItemText (nIndex, 1, _T("Unresolved"));
  } else if (0 != dynamic_cast<CdlConflict_IllegalValue> (conf)) { // a conflict of type 'illegal value'
    SetItemText (nIndex, 1, _T("Illegal"));
  } else if (0 != dynamic_cast<CdlConflict_EvalException> (conf)) { // a conflict of type 'evaluation exception'
    SetItemText (nIndex, 1, _T("Exception"));
  } else if (0 != dynamic_cast<CdlConflict_Requires> (conf)) { // a conflict of type 'goal unsatisfied'
    SetItemText (nIndex, 1, _T("Unsatisfied"));
  } else if (0 != dynamic_cast<CdlConflict_Data> (conf)) { // a conflict of type 'bad data'
    SetItemText (nIndex, 1, _T("Bad data"));
  } else {
    ASSERT (0);
  }
  
	// set the property column string
	CString strProperty = conf->get_property ()->get_property_name ().c_str ();
	strProperty += _T(" ");
	const std::vector<std::string> & argv = conf->get_property ()->get_argv ();
	std::vector<std::string>::const_iterator argv_i;
  for (argv_i = argv.begin (); argv_i != argv.end (); argv_i++) {// for each property argument...
    if (argv_i != argv.begin ())                              // ...except the first
    {
      strProperty += argv_i->c_str (); // add the argument to the string
      strProperty += _T (" "); // separate arguments by a space character
    }
  }
	strProperty.TrimRight (); // remove the trailing space character
	SetItemText (nIndex, 2, strProperty);
}
开发者ID:axonim,项目名称:ecos-ax-som-bf609,代码行数:37,代码来源:RulesList.cpp


示例6: wxXmlNode

void wxExListViewFile::DoFileSave(bool save_as)
{
  wxXmlNode* root = new wxXmlNode(wxXML_ELEMENT_NODE, "files");
  wxXmlNode* comment = new wxXmlNode(
    wxXML_COMMENT_NODE,
    wxEmptyString,
    wxTheApp->GetAppDisplayName() + " project " + GetFileName().GetFullName() + 
      " "  + wxDateTime::Now().Format());

  root->AddChild(comment);

  for (int i = 0; i < GetItemCount(); i++)
  {
    const wxExFileName fn = wxExListItem(this, i).GetFileName();

    wxXmlNode* element = new wxXmlNode(
      wxXML_ELEMENT_NODE,
      (fn.FileExists() ? "file": "folder"));

    if (!fn.FileExists() && fn.DirExists())
    {
      element->AddAttribute("extensions", GetItemText(i, _("Type")));
    }
    
    wxXmlNode* text = new wxXmlNode(
      wxXML_TEXT_NODE, 
      wxEmptyString, 
      fn.GetFullPath());
      
    element->AddChild(text);
    root->AddChild(element);
  }
  
  wxXmlDocument doc;
  doc.SetRoot(root);
  doc.Save(GetFileName().GetFullPath());
}
开发者ID:hugofvw,项目名称:wxExtension,代码行数:37,代码来源:listviewfile.cpp


示例7: Input

/******************************************************************************
 Function Name  :   OnRButtonDown

 Description    :   The framework calls this member function when the user
                    right clicks on the list box
 Input(s)       :   nFlags -
                    point -
 Output         :   -
 Functionality  :   Shows a popup menu to remove an entry or to clear entries
 Member of      :   CSignalWatchListBox

 Author(s)      :   Ratnadip Choudhury, Amarnath Shastri
 Date Created   :   03-04-2002
 Modified by    :   Ratnadip Choudhury
 Modified on    :   26-04-2002
 Modified by    :   Raja N
 Modified on    :   22.07.2004, Modified the function call to refer ListCtrl
******************************************************************************/
void CSignalWatchListBox::OnRButtonDown(UINT nFlags, CPoint omPoint)
{
    if (GetItemCount() > 0)
    {
        CMenu* pomContextMenu = new CMenu;
        if (pomContextMenu != NULL)
        {
            // Load the Menu from the resource
            pomContextMenu->DestroyMenu();
            pomContextMenu->LoadMenu(IDM_MENU_SIGNAL_WATCH);
            CMenu* pomSubMenu = pomContextMenu->GetSubMenu(1);

            if (pomSubMenu != NULL)
            {
                CPoint omSrcPt = omPoint;
                ClientToScreen(&omSrcPt);
                UINT unEnable;
                // If no item is selected, make "Delete" menu item disabled
                if (GetSelectedCount() == -1)
                {
                    unEnable = MF_BYCOMMAND | MF_DISABLED | MF_GRAYED;
                }
                else
                {
                    unEnable = MF_BYCOMMAND | MF_ENABLED;
                }
                pomSubMenu->EnableMenuItem(IDM_SG_WATCH_CLEAR, unEnable);
                pomSubMenu->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON,
                                           omSrcPt.x, omSrcPt.y, this, NULL);
            }
            delete pomContextMenu;
            pomContextMenu = NULL;
        }
    }

    CFFListCtrl::OnRButtonDown(nFlags, omPoint);
}
开发者ID:Huigang610,项目名称:busmaster-1,代码行数:55,代码来源:SignalWatchListBox.cpp


示例8: wxASSERT

int ecPropertyListCtrl::SetItem(const wxString& item, const wxString& value, int nInsertAs, int nRepeat)
{
    wxASSERT( nInsertAs <= GetItemCount() );

/*
    LVFINDINFO info;
    info.flags =LVFI_STRING;
    info.psz   =pszItem;
    info.vkDirection=VK_DOWN;
    int nIndex=-1;
    do {
        nIndex=FindItem(&info,nIndex);
    } while (--nRepeat>0 && nIndex!=-1);
*/
    // NB: wxListCtrl doesn't support reverse search, so could do it explicitly
    // by iterating through the items.
    // But for now, just ignore the nRepeat flag and find the first one.
    int nIndex = -1;
    nIndex = FindItem(0, /* nIndex */ item);
    
    if(-1==nIndex){
        nIndex = InsertItem(nInsertAs, item);
    }
    
    wxListCtrl::SetItem(nIndex, 1, value);

    // TODO
#if 0
    CDC *pDC=GetDC();
    CFont *pOldFont=pDC->SelectObject(GetFont());
    m_nMaxValueWidth=max(m_nMaxValueWidth,pDC->GetTextExtent(pszValue).cx);
    pDC->SelectObject(pOldFont);
    ReleaseDC(pDC);
#endif

    return nIndex;
}
开发者ID:0xCA5A,项目名称:dd-wrt,代码行数:37,代码来源:propertywin.cpp


示例9: GetItemCount

BOOL CTDLFindResultsListCtrl::AddHeaderRow(LPCTSTR szText, BOOL bSpaceAbove)
{
	int nPos = GetItemCount();

	// add space above?
	if (bSpaceAbove)
	{
		int nIndex = InsertItem(nPos, _T(""));
		SetItemData(nIndex, 0);
		nPos++;
	}

	// add result
	int nIndex = InsertItem(nPos, szText);
	SetItemData(nIndex, 0);

	// bold font for rendering
	if (m_fontBold.GetSafeHandle() == NULL)
	{
		GraphicsMisc::CreateFont(m_fontBold, (HFONT)SendMessage(WM_GETFONT), MFS_BOLD);
	}

	return (nIndex != -1);
}
开发者ID:noindom99,项目名称:repositorium,代码行数:24,代码来源:TDLFindResultsListCtrl.cpp


示例10: ASSERT_VALID

//*********************************************************************************
int CBCGPHeaderCtrl::GetSortColumn () const
{
    ASSERT_VALID (this);

    if (m_bMultipleSort)
    {
        TRACE0("Call CBCGPHeaderCtrl::GetColumnState for muliple sort\n");
        ASSERT (FALSE);
        return -1;
    }

    int nCount = GetItemCount ();
    for (int i = 0; i < nCount; i++)
    {
        int nSortVal = 0;
        if (m_mapColumnsStatus.Lookup (i, nSortVal) &&
                nSortVal != 0)
        {
            return i;
        }
    }

    return -1;
}
开发者ID:cugxiangzhenwei,项目名称:WorkPlatForm,代码行数:25,代码来源:BCGPHeaderCtrl.cpp


示例11: OnMDIActivate

void CXTPMDIWndTab::OnMDIActivate(HWND hWnd)
{
	// Loop through all of the tabs to find the view that has activated.
	int iItem;
	for (iItem = 0; iItem < GetItemCount(); ++iItem)
	{
		// Get the item data for this tab.
		TC_ITEM tci;
		tci.mask = TCIF_PARAM;

		if (GetItem(iItem, &tci))
		{
			MDICHILD* pMDIChild = (MDICHILD*)tci.lParam;
			ASSERT(pMDIChild != NULL);

			// If it is the activated window select it and exit loop.
			if (pMDIChild && (hWnd == pMDIChild->hWnd))
			{
				SetCurSel(iItem);
				break;
			}
		}
	}
}
开发者ID:lai3d,项目名称:ThisIsASoftRenderer,代码行数:24,代码来源:XTPMDIWndTab.cpp


示例12: InsertItem

int CSortListCtrl::AddItem( LPCTSTR pszText, ... )
{
	const int iIndex = InsertItem( GetItemCount(), pszText );
	LPTSTR* arrpsz = new LPTSTR[ m_iNumColumns ];
	COLORREF * clrText = new COLORREF[ m_iNumColumns ];
	COLORREF * clrBak= new COLORREF[ m_iNumColumns ];

	arrpsz[ 0 ] = new TCHAR[ lstrlen( pszText ) + 1 ];
	clrText[ 0 ] = crWindowText;
	clrBak[ 0 ] = crWindow;
	(void)lstrcpy( arrpsz[ 0 ], pszText );
	

 	va_list list;
	va_start( list, pszText );


	//insert sub item  and set subitem data
	for( int iColumn = 1; iColumn < m_iNumColumns; iColumn++ )
	{
		pszText = va_arg( list, LPCTSTR );
		ASSERT_VALID_STRING( pszText );
		VERIFY( CListCtrl::SetItem( iIndex, iColumn, LVIF_TEXT, pszText, 0, 0, 0, 0 ) );

		arrpsz[ iColumn ] = new TCHAR[ lstrlen( pszText ) + 1 ];
		clrText[ iColumn ] = crWindowText;
		clrBak[ iColumn ] = crWindow;
		(void)lstrcpy( arrpsz[ iColumn ], pszText );
	}

	va_end( list );

	VERIFY( SetArray( iIndex, arrpsz,clrText,clrBak ) );

	return iIndex;
}
开发者ID:myswirl,项目名称:myworkspace,代码行数:36,代码来源:SortListCtrl.cpp


示例13: ApplyLanguageToMenu

void CWndLog::OnRClick()
{
	CMenu menu;
	menu.LoadMenu (IDM_LOG);
	CMenu *pPopup = menu.GetSubMenu (0);
	ApplyLanguageToMenu (pPopup);

	if (m_bAutoScroll)
		pPopup->CheckMenuItem (ID_AUTOSCROLL, MF_CHECKED | MF_BYCOMMAND);

	if (GetItemCount () == 0)
	{
		pPopup->EnableMenuItem (ID_CLEAR, MF_BYCOMMAND | MF_GRAYED);
		pPopup->EnableMenuItem (ID_COPY_TO_CB, MF_BYCOMMAND | MF_GRAYED);
	}

	ClientToScreen (&m_rbPt);

	m_odmenu.Attach (&menu, FALSE);
	pPopup->TrackPopupMenu (TPM_RIGHTBUTTON | TPM_TOPALIGN | TPM_LEFTALIGN,	m_rbPt.x, m_rbPt.y, this);
	m_odmenu.Detach ();

	menu.DestroyMenu ();
}
开发者ID:HackLinux,项目名称:Free-Download-Manager-vs2010,代码行数:24,代码来源:WndLog.cpp


示例14: FindCellRef

int CEsmSubListCtrl::AddItem (CEsmSubCellRef* pCellRef) {
  esmrecinfo_t*   pRecInfo;
  CEsmSubNameFix* pName;
  int		  ListIndex;
  int		  ImageIndex;
  
	/* Find an existing reference in the list (no duplicates) */
  ListIndex = FindCellRef(pCellRef);
  if (ListIndex >= 0) return (ListIndex);

	/* Initialize the record info */
  if (pCellRef != NULL && pCellRef->GetRecInfo() == NULL) {
    pName = (CEsmSubNameFix *) pCellRef->FindSubRecord(MWESM_SUBREC_NAME);

    if (pName != NULL) {
      pRecInfo = m_pEsmDlgHandler->GetDocument()->FindRecord(pName->GetName());
      pCellRef->SetRecInfo(pRecInfo);
     }
   
   }

  if (pCellRef->GetRecInfo() == NULL)
    ImageIndex = -1;
  else
    ImageIndex = GetImageIndex(pCellRef->GetRecInfo()->pRecord);
  
	/* Add the item to the end of the list */
  ListIndex = InsertItem(GetItemCount(), "", ImageIndex);
  if (ListIndex < 0) return (ListIndex);

	/* Set the item data */
  SetItemData(ListIndex, (DWORD) pCellRef);
  SetItem(ListIndex, pCellRef);

  return (ListIndex);
 }
开发者ID:Purr4me,项目名称:TES5Edit-GoogleCode,代码行数:36,代码来源:EsmSubListCtrl.cpp


示例15: OnLvnEndlabeledit

void CMyListCtrl::OnLvnEndlabeledit(NMHDR *pNMHDR, LRESULT *pResult)
{
    NMLVDISPINFO *pDispInfo = reinterpret_cast<NMLVDISPINFO*>(pNMHDR);
    *pResult = 0;
    
    if (pDispInfo->item.mask & LVIF_TEXT)
    {
        if (pDispInfo->item.iItem == (GetItemCount() - 1))
        {
            InsertItem(pDispInfo->item.iItem, pDispInfo->item.pszText);
        }
        else
        {
            if (strlen(pDispInfo->item.pszText) > 0)
            {
                SetItemText(pDispInfo->item.iItem, 0, pDispInfo->item.pszText);
            }
            else
            {
                GetParent()->PostMessage(WM_COMMAND, MAKEWPARAM(ID_FILE_CLIPBOARD_REMOVE, BN_CLICKED));
            }
        }
    }
}
开发者ID:cdesjardins,项目名称:DCom,代码行数:24,代码来源:FileClipBoardDlg.cpp


示例16: GetOffsetItem

int CXTPTaskPanelGroup::GetOffsetItem() const
{
	if (m_nScrollOffset == 0)
		return 0;

	if (m_nScrollOffset < GetItemCount())
	{
		CXTPTaskPanelGroupItem* pItem = GetAt(m_nScrollOffset);

		if (pItem->IsVisible())
			return m_nScrollOffset;

		int nScrollOffset = m_pItems->GetNextVisibleIndex(m_nScrollOffset, +1);

		if (nScrollOffset != -1)
			return nScrollOffset;

		nScrollOffset = m_pItems->GetNextVisibleIndex(m_nScrollOffset, -1);
		if (nScrollOffset != -1)
			return nScrollOffset;
	}

	return 0;
}
开发者ID:killbug2004,项目名称:ghost2013,代码行数:24,代码来源:XTPTaskPanelGroup.cpp


示例17: rcItem

/*void CListDocs::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
{
   if(lpDrawItemStruct->itemData<0)
		return;
	
   CDC* pDC=CDC::FromHandle(lpDrawItemStruct->hDC);
   CRect rcItem(lpDrawItemStruct->rcItem);
   UINT uiFlags=ILD_TRANSPARENT;
   
   int nItem=lpDrawItemStruct->itemID;
   BOOL bFocus=(GetFocus()==this);
   
   static _TCHAR szBuff[MAX_PATH];
   
   COLORREF  BkText;
   if(lSelRow==lpDrawItemStruct->itemID)
   {
	   BkText = ::GetSysColor(COLOR_HIGHLIGHT);
	   pDC->SetTextColor(RGB(255,255,255));
   }
   else
   {
	   BkText = RGB(255,255,255);	
	   pDC->SetTextColor(RGB(0,0,0));
   }
   CRect rcLabel;
   
   GetItemRect(nItem,rcLabel,LVIR_LABEL);
   UINT nJustify=DT_LEFT;
   

   CBrush b(BkText);
   CRect rcAllLabels;
   GetItemRect(nItem,rcAllLabels,LVIR_BOUNDS);

   LV_ITEM lvi;
          lvi.mask=LVIF_TEXT | LVIF_IMAGE | LVIF_STATE;
          lvi.iItem=nItem;
          lvi.iSubItem=0;
          lvi.pszText=szBuff;
          lvi.cchTextMax=sizeof(szBuff);
          lvi.stateMask=0xFFFF;       // get all state flags
          GetItem(&lvi);
       
          BOOL bSelected=(bFocus || (GetStyle() & LVS_SHOWSELALWAYS)) && lvi.state & LVIS_SELECTED;
          bSelected=bSelected || (lvi.state & LVIS_DROPHILITED);

	
	
	pDC->FillRect(rcAllLabels,&b);
	
	long lCount;
	lCount = GetHeaderCtrl()->GetItemCount();
	for(int i = 0;i<lCount;i++)
	{
		CString sName = GetItemText(nItem,i);
		GetSubItemRect(nItem,i,LVIR_BOUNDS,rcLabel);
		rcLabel.left = rcLabel.left + 2;
		pDC->DrawText(sName,-1,rcLabel,nJustify | DT_SINGLELINE | DT_NOPREFIX | DT_NOCLIP | DT_VCENTER);
	}
	
}
*/
void CListDocs::SelectItem(long lItem)
{
	if((lItem>-1)&&(lItem<GetItemCount()))
	{
		if(lSelRow != lItem)
		{
			if(lSelRow>-1)
			{
				RedrawItems(lSelRow,lSelRow);
			}
			
			lSelRow = lItem;
			RedrawItems(lSelRow,lSelRow);
			SendMessageToParent(NCLD_SELECTED);
		}
	}
	else
	{
		if(lSelRow>-1)
				RedrawItems(lSelRow,lSelRow);
		lSelRow = -1;
		SendMessageToParent(NCLD_SELECTED);
	}
}
开发者ID:BeL1kOFF,项目名称:SHATE,代码行数:87,代码来源:ListDocs.cpp


示例18: GetKeyState

void CFVDownloads_Tasks::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) 
{
	BOOL bShift = GetKeyState (VK_SHIFT) & 0x8000;
	BOOL bCtrl = GetKeyState (VK_CONTROL) & 0x8000;

	switch (nChar)
	{
		case 'S':
			if (bShift)
			{
				OnFvdldStart ();
				return;
			}
			break;

		case 'O':
			if (bShift)
			{
				OnFvdldStop ();
				return;
			}
			break;

		case 'A':
			if (bCtrl)
			{
				int cItems = GetItemCount ();
				for (int i = cItems-1; i >= 0; i--)
					SetItemState (i, LVIS_SELECTED, LVIS_SELECTED);
				return;
			}
			break;
	}
	
	CListCtrl::OnKeyDown(nChar, nRepCnt, nFlags);
}
开发者ID:naroya,项目名称:freedownload,代码行数:36,代码来源:FVDownloads_Tasks.cpp


示例19: GetCurrentDirectory

void
CProject::RefreshItems()
{
  m_Groups.clear();
  // store the old directory
  char old_directory[MAX_PATH];
  GetCurrentDirectory(MAX_PATH, old_directory);
  if (SetCurrentDirectory(m_Directory.c_str()) != 0)
  {
    UpdateGroupItems(m_Groups);
    if (m_GameScript.empty())
    {
      if (GetItemCount(GT_SCRIPTS) == 1) {
        m_GameScript = GetItem(GT_SCRIPTS, 0);
      }
      if (!m_Filename.empty()) {
        Save();
      }
      SetCurrentDirectory(m_Directory.c_str());
    }
  }
  // restore the old directory
  SetCurrentDirectory(old_directory);
}
开发者ID:FlyingJester,项目名称:sphere,代码行数:24,代码来源:Project.cpp


示例20: _tstoi

bool CIrcChannelListCtrl::AddChannelToList(const CString& sName, const CString& sUsers, const CString& sDesc)
{
	UINT uUsers = _tstoi(sUsers);
	if (thePrefs.GetIRCUseChannelFilter())
	{
		if (uUsers < thePrefs.GetIRCChannelUserFilter())
			return false;
		// was already filters with "/LIST" command
		//if (!thePrefs.GetIRCChannelFilter().IsEmpty())
		//{
		//	if (stristr(sName, thePrefs.GetIRCChannelFilter()) == NULL)
		//		return false;
		//}
	}

	ChannelName* pChannel = new ChannelName(sName, uUsers, m_pParent->StripMessageOfFontCodes(sDesc));
	m_lstChannelNames.AddTail(pChannel);
	int iItem = InsertItem(LVIF_TEXT | LVIF_PARAM, GetItemCount(), pChannel->m_sName, 0, 0, 0, (LPARAM)pChannel);
	if (iItem < 0)
		return false;
	SetItemText(iItem, 1, 0);
	SetItemText(iItem, 2, 0);
	return true;
}
开发者ID:acat,项目名称:emule,代码行数:24,代码来源:IrcChannelListCtrl.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetItemData函数代码示例发布时间:2022-05-30
下一篇:
C++ GetItemByIndex函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap