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

C++ GetItemData函数代码示例

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

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



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

示例1: DoItemActivated

bool CppSymbolTree::DoItemActivated(wxTreeItemId item, wxEvent &event, bool notify)
{
    //-----------------------------------------------------
    // Each tree items, keeps a private user data that
    // holds the key for searching the its corresponding
    // node in the m_tree data structure
    //-----------------------------------------------------
    if (item.IsOk() == false)
        return false;

    MyTreeItemData* itemData = static_cast<MyTreeItemData*>(GetItemData(item));
    if ( !itemData ) {
        event.Skip();
        return false;
    }

    wxString filename = itemData->GetFileName();
    wxString project = ManagerST::Get()->GetProjectNameByFile(filename);
    wxString pattern = itemData->GetPattern();
    int      lineno  = itemData->GetLine();

    // Open the file and set the cursor to line number
    if(clMainFrame::Get()->GetMainBook()->OpenFile(filename, project, lineno-1)) {
        // get the editor, and search for the pattern in the file
        LEditor *editor = clMainFrame::Get()->GetMainBook()->GetActiveEditor();
        if (editor) {
            FindAndSelect(editor, pattern, GetItemText(item));
        }
    }

    // post an event that an item was activated
    if ( notify ) {
        wxCommandEvent e(wxEVT_CMD_CPP_SYMBOL_ITEM_SELECTED);
        e.SetEventObject(this);
        wxPostEvent(GetEventHandler(), e);
    }
    return true;
}
开发者ID:05storm26,项目名称:codelite,代码行数:38,代码来源:cpp_symbol_tree.cpp


示例2: OnBeginDrag

void BFBackupTree::OnBeginDrag (wxTreeEvent& event)
{
    // get data behind the item
    BFBackupTreeItemData* pItemData = dynamic_cast<BFBackupTreeItemData*>(GetItemData(event.GetItem()));

    if (pItemData == NULL)
        return;

    // selected the currently draging item
    SelectItem(event.GetItem());

    // init
    wxFileDataObject    my_data;
    wxDropSource        dragSource  ( this );

    // drag a task or a directory?
    if (pItemData->GetOID() == BFInvalidOID)
    {
        my_data.AddFile(pItemData->GetPath());
    }
    else
    {
        // remember the currently draged task
        BFTask* pTask = BFProject::Instance().GetTask(pItemData->GetOID());

        if (pTask == NULL)
            return;

        oidCurrentDrag_ = pTask->GetOID();

        // just set dummy data
        my_data.AddFile("<oid>");
    }

    // start dragging
    dragSource.SetData(my_data);
    dragSource.DoDragDrop( TRUE );
}
开发者ID:BackupTheBerlios,项目名称:blackfisk-svn,代码行数:38,代码来源:BFBackupTree.cpp


示例3: GetChildItem

HTREEITEM FolderTree::FindServersNode(HTREEITEM hFindFrom) const
{
	if (m_bDisplayNetwork)
	{
		//Try to find some "servers" in the child items of hFindFrom
		HTREEITEM hChild = GetChildItem(hFindFrom);
		while (hChild)
		{
			FolderTreeItemInfo* pItem = (FolderTreeItemInfo*) GetItemData(hChild);
			
			if (pItem->m_pNetResource)
			{
				//Found a share
				if (pItem->m_pNetResource->dwDisplayType == RESOURCEDISPLAYTYPE_SERVER)
					return hFindFrom;
			}

			//Get the next sibling for the next loop around
			hChild = GetNextSiblingItem(hChild);
		}

		//Ok, since we got here, we did not find any servers in any of the child nodes of this
		//item. In this case we need to call ourselves recursively to find one
		hChild = GetChildItem(hFindFrom);
		while (hChild)
		{
			HTREEITEM hFound = FindServersNode(hChild);
			if (hFound)
				return hFound;

			//Get the next sibling for the next loop around
			hChild = GetNextSiblingItem(hChild);
		}
	}

	//If we got as far as here then no servers were found.
	return NULL;
}
开发者ID:BackupTheBerlios,项目名称:airdc-svn,代码行数:38,代码来源:FolderTree.cpp


示例4: GetItemRect

void SeriesListCtrl::OnLButtonDown(UINT nFlags, CPoint point) 
{
	ProtectedSeriesArray& Series=*(SeriesListCtrl::Series); void *x;
	HitItem=HitTest(point);
	
	if (HitItem>=0)
	{
		CRect rect; GetItemRect(HitItem, rect, LVIR_ICON);
		if (point.x < rect.left)
		{
			BYTE state=GetState(HitItem);
			state++; if(state>2) state=1;
			SetState(HitItem,state); 			
			
			if((x=Series.GainAcsess(WRITE))!=0)
			{
				SeriesProtector Protector(x); TSeriesArray& Series(Protector);
				Series[GetItemData(HitItem)]->SetVisible(state-1);
			}
		}		
	}		
	CListCtrl::OnLButtonDown(nFlags, point);
}
开发者ID:mar80nik,项目名称:TChart,代码行数:23,代码来源:SeriesListCtrl.cpp


示例5: MultiSelectItem

//selects a specified node in multiple selection mode
void CLTWinTreeMgr::MultiSelectItem(HTREEITEM hItem, BOOL bSelect)
{
	//get the item
	if(hItem == NULL)
	{
		return;
	}

	CLTWinTreeItem* pItem = (CLTWinTreeItem*)GetItemData(hItem);

	if(pItem && (pItem->m_bSelected != bSelect))
	{

		//save it
		pItem->m_bSelected = bSelect;

		//set the flag to the appropriate item
		SetItemState(hItem, (bSelect) ? TVIS_SELECTED : 0, TVIS_SELECTED);

		//trigger the callback
		TriggerChangeSel(pItem);
	}
}
开发者ID:Joincheng,项目名称:lithtech,代码行数:24,代码来源:ltwintreemgr.cpp


示例6: if

/////////////////////////////////////////////////////////////////////////////
// CReportCtrl message handlers
void CReportCtrl::OnCustomDraw(NMHDR* pNMHDR, LRESULT* pResult) 
{
	LPNMLVCUSTOMDRAW lplvcd = (LPNMLVCUSTOMDRAW)pNMHDR;

	if (lplvcd->nmcd.dwDrawStage == CDDS_PREPAINT)
	{
		*pResult = CDRF_NOTIFYITEMDRAW;
	}
	else if (lplvcd->nmcd.dwDrawStage == CDDS_ITEMPREPAINT)
	{
		*pResult = CDRF_NOTIFYSUBITEMDRAW;
	}
	else if (lplvcd->nmcd.dwDrawStage == (CDDS_ITEMPREPAINT | CDDS_SUBITEM))
	{
		int serial = GetItemData(lplvcd->nmcd.dwItemSpec);
		ItemColorMap::iterator it = m_itemColor.find(serial);
		if (it != m_itemColor.end())
		{
			lplvcd->clrText = it->second;
		}
		*pResult = CDRF_DODEFAULT;
	}
}
开发者ID:c4bbage,项目名称:trochilus,代码行数:25,代码来源:ReportCtrl.cpp


示例7: GetItemData

void SFTPTreeView::OnMenuNewFile(wxCommandEvent& event)
{
    wxArrayTreeItemIds items;
    m_treeCtrl->GetSelections(items);
    if(items.size() != 1) return;

    MyClientData* cd = GetItemData(items.Item(0));
    CHECK_PTR_RET(cd);

    if(!cd->IsFolder()) { return; }

    wxString defaultValue;
    static size_t s_untitledCounter = 0;
    defaultValue << "Untitled" << ++s_untitledCounter;

    wxString new_name = ::wxGetTextFromUser(_("Enter the new file name:"), _("New File"), defaultValue);
    if(!new_name.IsEmpty()) {
        wxString fullpath = cd->GetFullPath();
        fullpath << "/" << new_name;
        wxTreeItemId fileItem = DoAddFile(items.Item(0), fullpath);
        if(fileItem.IsOk()) { DoOpenFile(fileItem); }
    }
}
开发者ID:lpc1996,项目名称:codelite,代码行数:23,代码来源:SFTPTreeView.cpp


示例8: GetItemCount

void CCheckList::OnLvnColumnclick(NMHDR *pNMHDR, LRESULT *pResult)
{
	LPNMLISTVIEW pNMLV = reinterpret_cast<LPNMLISTVIEW>(pNMHDR);
	// TODO: Add your control notification handler code here
	*pResult = 0;

	int ItemCount = GetItemCount( );
	if( ItemCount == 0 )
		return;	

	//跟踪每一行绘制其中文字和内容
	for( int i = 0; i < ItemCount; i++ )
	{
		ListNode* Node = (ListNode*)GetItemData( i );
		if( pNMLV->iSubItem == 1 )
			Node->m_ExpType = enumPT_VERTEXANI;
		if( pNMLV->iSubItem == 2 && Node->m_NodeType == enumNT_SKELETALMESH )
			Node->m_ExpType = enumPT_SKELETALANI;
		if( pNMLV->iSubItem == 3 )
			Node->m_ExpType = enumPT_NONEANI;
	}
	Invalidate();
}
开发者ID:LaoZhongGu,项目名称:RushGame,代码行数:23,代码来源:CheckList.cpp


示例9: GetCursorPos

void MyGameTreeCtrl::ClickTreeItem( HTREEITEM treeItem )
{
	CPoint pt;
	GetCursorPos(&pt);
	ScreenToClient(&pt);	

	m_iCurItem = (int)GetItemData(treeItem);

	if( m_BtnRect.PtInRect(pt) )
	{
		//显示右键
	}
	else
	{
		if( m_mapNode.find( treeItem) != m_mapNode.end() )
		{			
			//GLOBAL_QQDATA->IQQData_ChangeItem2Old( m_iCurItem );
			//SetItemImage( treeItem,m_mapBitmap2Index[m_mapNode[treeItem].second],m_mapBitmap2Index[m_mapNode[treeItem].second] );
			m_mapNode.erase( treeItem );
		}
		SearchTreeItem( treeItem );
	}
}
开发者ID:2Dou,项目名称:PlayBox,代码行数:23,代码来源:MyGameTreeCtrl.cpp


示例10: DelItemRecursive

BOOL CPropertiesCtrl::DelItemRecursive( HTREEITEM hItem )
{
	if( !hItem )
		return TRUE;

	HTREEITEM hChild = NULL;

	for( hChild = GetNextItem( hItem, TVGN_CHILD ); hChild; hChild = GetNextItem( hItem, TVGN_CHILD ) )
		DelItemRecursive( hChild );
	
	CFTCItemData * pItemData = (CFTCItemData*)GetItemData( hItem );

	if( pItemData )
	{
		m_piMalloc->Free( pItemData->m_pIDL );
		pItemData->m_pIDL = NULL;
	}
	delete pItemData;
	
	DeleteItem( hItem );

	return TRUE;
}
开发者ID:tchv71,项目名称:ScadViewer,代码行数:23,代码来源:PropertiesCtrl.cpp


示例11: GetItemData

void TTreeView::AppendEntry(XGDraw &draw, short inset, TableEntryRecord *r)
{
	TableDrawRecord data;
	TableEntryRecord *te;
	long width;
	char buffer[256];
	
	fLength++;
	data.inset = inset;
	data.entry = r;
	fDrawList.Append(sizeof(data),&data);
	
	GetItemData((uint32)r,buffer,sizeof(buffer));
	width = 5 + (inset + 1) * 22 + draw.StringWidth(buffer);
	if (width > fWidth) fWidth = width;
	
	if (r->fOpen) {
		inset++;
		for (te = r->child; te != NULL; te = te->next) {
			AppendEntry(draw,inset,te);
		}
	}
}
开发者ID:ElusiveMind,项目名称:ballistic,代码行数:23,代码来源:TTreeView.cpp


示例12: GetFirstSelectedItemPosition

void CDownloads_Deleted::OnDeletedRestore()
{
	DLDS_LIST v;
	POSITION pos = GetFirstSelectedItemPosition ();
	while (pos)
	{
		int iItem = GetNextSelectedItem (pos);
		vmsDownloadSmartPtr dld = (fsDownload*) GetItemData (iItem);
		v.push_back (dld);
	}

	if (v.size ())
	{
		if (_pwndDownloads->Get_DWWN () == DWWN_DELETED)
			_pwndDownloads->m_wndDeleted.ShowWindow (SW_HIDE);
		try {
			_DldsMgr.RestoreDownloads (v);
		}
		catch (...) {}
		if (_pwndDownloads->Get_DWWN () == DWWN_DELETED)
			_pwndDownloads->m_wndDeleted.ShowWindow (SW_SHOW);
	}	
}
开发者ID:pedia,项目名称:raidget,代码行数:23,代码来源:downloads_deleted.cpp


示例13: DragData

void wxGISToolExecuteView::OnBeginDrag(wxListEvent& event)
{
    wxGxObject* pGxObject = m_pCatalog->GetRegisterObject(m_nParentGxObjectId);
    if(!pGxObject)
        return;
    wxGISTaskDataObject DragData(wxThread::GetMainId(), wxDataFormat(wxGIS_DND_ID));


    long nItem = wxNOT_FOUND;
    int nCount(0);
    for ( ;; )
    {
        nItem = GetNextItem(nItem, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
        if ( nItem == wxNOT_FOUND )
            break;

        DragData.AddDecimal(GetItemData(nItem));
    }

    wxDropSource dragSource( this );
    dragSource.SetData( DragData );
    wxDragResult result = dragSource.DoDragDrop( wxDrag_DefaultMove );
}
开发者ID:GimpoByte,项目名称:nextgismanager,代码行数:23,代码来源:gxtoolexecview.cpp


示例14: ScreenToClient

// Show help for this window
void ctConfigTreeCtrl::OnHelp(wxHelpEvent& event)
{
    wxPoint pt = ScreenToClient(event.GetPosition());
    int flags = 0;
    wxTreeItemId id = HitTest(pt, flags);
    ctTreeItemData *itemData = (ctTreeItemData*) GetItemData(id);
    wxHelpProvider *helpProvider = wxHelpProvider::Get();
    if ( helpProvider && itemData)
    {
        ctConfigItem* item = itemData->GetConfigItem();
        if (item)
        {
            wxString helpTopic = item->GetPropertyString(wxT("help-topic"));
            if (!helpTopic.IsEmpty())
            {
                wxGetApp().GetReferenceHelpController().DisplaySection(helpTopic);
                return;
            }
        }
    }

    event.Skip();
}
开发者ID:gitrider,项目名称:wxsj2,代码行数:24,代码来源:configtree.cpp


示例15: GetNextItem

void CQueueListCtrl::OnContextMenu(CWnd* /*pWnd*/, CPoint point)
{
	int iSel = GetNextItem(-1, LVIS_SELECTED | LVIS_FOCUSED);
	const CUpDownClient* client = (iSel != -1) ? (CUpDownClient*)GetItemData(iSel) : NULL;

	CTitleMenu ClientMenu;
	ClientMenu.CreatePopupMenu();
	ClientMenu.AddMenuTitle(GetResString(IDS_CLIENTS), true);
	ClientMenu.AppendMenu(MF_STRING | (client ? MF_ENABLED : MF_GRAYED), MP_DETAIL, GetResString(IDS_SHOWDETAILS), _T("CLIENTDETAILS"));
	ClientMenu.SetDefaultItem(MP_DETAIL);
	//Xman friendhandling
	ClientMenu.AppendMenu(MF_SEPARATOR); 
	//Xman end
	ClientMenu.AppendMenu(MF_STRING | ((client && client->IsEd2kClient() && !client->IsFriend()) ? MF_ENABLED : MF_GRAYED), MP_ADDFRIEND, GetResString(IDS_ADDFRIEND), _T("ADDFRIEND"));
	//Xman friendhandling
	ClientMenu.AppendMenu(MF_STRING | (client && client->IsFriend() ? MF_ENABLED : MF_GRAYED), MP_REMOVEFRIEND, GetResString(IDS_REMOVEFRIEND), _T("DELETEFRIEND"));
	ClientMenu.AppendMenu(MF_STRING | (client && client->IsFriend() ? MF_ENABLED : MF_GRAYED), MP_FRIENDSLOT, GetResString(IDS_FRIENDSLOT), _T("FRIENDSLOT"));
	ClientMenu.CheckMenuItem(MP_FRIENDSLOT, (client && client->GetFriendSlot()) ? MF_CHECKED : MF_UNCHECKED);
	ClientMenu.AppendMenu(MF_SEPARATOR); 
	//Xman end

	ClientMenu.AppendMenu(MF_STRING | ((client && client->IsEd2kClient()) ? MF_ENABLED : MF_GRAYED), MP_MESSAGE, GetResString(IDS_SEND_MSG), _T("SENDMESSAGE"));
	ClientMenu.AppendMenu(MF_STRING | ((client && client->IsEd2kClient() && client->GetViewSharedFilesSupport()) ? MF_ENABLED : MF_GRAYED), MP_SHOWLIST, GetResString(IDS_VIEWFILES), _T("VIEWFILES"));
	if (thePrefs.IsExtControlsEnabled())
		ClientMenu.AppendMenu(MF_STRING | ((client && client->IsEd2kClient() && client->IsBanned()) ? MF_ENABLED : MF_GRAYED), MP_UNBAN, GetResString(IDS_UNBAN));
	if (Kademlia::CKademlia::IsRunning() && !Kademlia::CKademlia::IsConnected())
		ClientMenu.AppendMenu(MF_STRING | ((client && client->IsEd2kClient() && client->GetKadPort()!=0 && client->GetKadVersion() > 1) ? MF_ENABLED : MF_GRAYED), MP_BOOT, GetResString(IDS_BOOTSTRAP));
	ClientMenu.AppendMenu(MF_STRING | (GetItemCount() > 0 ? MF_ENABLED : MF_GRAYED), MP_FIND, GetResString(IDS_FIND), _T("Search"));
	// - show requested files (sivka/Xman)
	ClientMenu.AppendMenu(MF_SEPARATOR); 
	ClientMenu.AppendMenu(MF_STRING | (GetItemCount() > 0 ? MF_ENABLED : MF_GRAYED),MP_LIST_REQUESTED_FILES, GetResString(IDS_LISTREQUESTED), _T("FILEREQUESTED")); 
	//Xman end

	GetPopupMenuPos(*this, point);
	ClientMenu.TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y, this);
	VERIFY( ClientMenu.DestroyMenu() ); // XP Style Menu [Xanatos] - Stulle
}
开发者ID:rusingineer,项目名称:eMule-mephisto-mod,代码行数:37,代码来源:QueueListCtrl.cpp


示例16: Input

/*******************************************************************************
 Function Name  : OnKillFocus
 Input(s)       : pNewWnd - Pointer to the window that got focus
 Output         :  -
 Functionality  : This will be called if ComboItem losses its focus. This
                  function will post a message to parent list control to inform
                  that list data has been editied. If the loss of focus is
                  because of Escape key this will restore the old value. These
                  will be executed only if it is non- editable control
 Member of      : CComboItem
 Friend of      :
 Author(s)      : Raja N
 Date Created   : 21.07.2004
 Modifications  : Raja N on 30.07.2004, Implemented code review comments
*******************************************************************************/
void CComboItem::OnKillFocus(CWnd* pNewWnd) 
{   
    CComboBox::OnKillFocus(pNewWnd);

    int nIndex = GetCurSel();
    if( m_bIsEditable == FALSE && pNewWnd // NULL condition 
        && pNewWnd != GetParent()->GetParent() )//For Dialog Close using X Button
    {

        CString omStr;
        // As it is non editable Get the window text to get the selected
        // item text
        GetWindowText(omStr);
        // Send Notification to parent of ListView ctrl 
        LV_DISPINFO lvDispinfo;
        lvDispinfo.hdr.hwndFrom = GetParent()->m_hWnd;
        lvDispinfo.hdr.idFrom = GetDlgCtrlID();//that's us
        lvDispinfo.hdr.code = LVN_ENDLABELEDIT;
        lvDispinfo.item.mask = LVIF_TEXT | LVIF_PARAM;  
        lvDispinfo.item.iItem = m_nItem;
        lvDispinfo.item.iSubItem = m_nSubItem;
        lvDispinfo.item.pszText =
            m_bVK_ESCAPE ? LPTSTR((LPCTSTR)omStrText) : LPTSTR((LPCTSTR)omStr);
        lvDispinfo.item.cchTextMax = omStr.GetLength();
        lvDispinfo.item.lParam = GetItemData(GetCurSel());
        // For non editable the selection should not be -1
        PostMessage(WM_CLOSE);
        if( nIndex != CB_ERR )
        {
            // Send the End Label Edit Message
            GetParent()->GetParent()->SendMessage( WM_NOTIFY, 
                                                   GetParent()->GetDlgCtrlID(),
                                                   (LPARAM)&lvDispinfo);
        }
    }
    
}
开发者ID:Conti-Meissner,项目名称:busmaster,代码行数:52,代码来源:ComboItem.cpp


示例17: GetFolderItemPath

BOOL CCJShellTree::GetFolderItemPath(HTREEITEM hItem, CString &strFolderPath)
{
	LPTVITEMDATA	lptvid;  //Long pointer to TreeView item data
	LPSHELLFOLDER	lpsf2=NULL;
	static TCHAR	szBuff[MAX_PATH];
	HRESULT			hr;
	BOOL			bRet=FALSE;
	
	lptvid=(LPTVITEMDATA)GetItemData(hItem);
	
	if (lptvid && lptvid->lpsfParent && lptvid->lpi)
	{
		hr=lptvid->lpsfParent->BindToObject(lptvid->lpi,
			0,IID_IShellFolder,(LPVOID *)&lpsf2);
		
		if (SUCCEEDED(hr))
		{
			ULONG ulAttrs = SFGAO_FILESYSTEM;
			
			// Determine what type of object we have.
			lptvid->lpsfParent->GetAttributesOf(1, (const struct _ITEMIDLIST **)&lptvid->lpi, &ulAttrs);
			
			if (ulAttrs & (SFGAO_FILESYSTEM))
			{
				if(SHGetPathFromIDList(lptvid->lpifq,szBuff)){
					strFolderPath = szBuff;
					bRet = TRUE;
				}
			}
		}

		if(lpsf2)
			lpsf2->Release();
	}
	
	return bRet;
}
开发者ID:noindom99,项目名称:repositorium,代码行数:37,代码来源:CJShellTree.cpp


示例18: dc

void KGMemDateList::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
{
	CClientDC dc(this);
	//CDC* pDC = CDC::FromHandle(lpDrawItemStruct->hDC);

	LPKGLISTITEM pItem = (LPKGLISTITEM)GetItemData(lpDrawItemStruct->itemID);
	_ItemDate itemData;

	KGListCtrl::DrawItem(lpDrawItemStruct);

	KG_PROCESS_ERROR(pItem);

	pItem->GetStructData(&itemData, sizeof(itemData));

	if (itemData.dwType == MEM_TYPE_COLOR)
	{
		COLORREF colorRef;// = (COLORREF)atoi(itemData.szDate);
		DWORD    dwColor;
		int      nColorARGB[4];
		sscanf(itemData.szDate, _T("%X"), &dwColor);
		nColorARGB[0] = (dwColor & 0xFF000000)>>24;
		nColorARGB[1] = (dwColor & 0x00FF0000)>>16;
		nColorARGB[2] = (dwColor & 0x0000FF00)>>8;
		nColorARGB[3] = (dwColor & 0x000000FF);
		colorRef =
			((COLORREF)((((nColorARGB[3])&0xff)<<24)|(((nColorARGB[2])&0xff)<<16)|(((nColorARGB[1])&0xff)<<8)|((nColorARGB[0])&0xff)));
		CRect rect;
		GetSubItemRect(
			lpDrawItemStruct->itemID, 1, LVIR_BOUNDS, rect
			);
		rect.left += 12;
		rect.top  += 2;
		rect.bottom -= 1;
		rect.right = rect.left + rect.Height();
		dc.FillRect(&rect, &CBrush(colorRef));
		dc.Draw3dRect(&rect, RGB(100, 100, 100), RGB(100, 100, 100));
	}
开发者ID:viticm,项目名称:pap2,代码行数:37,代码来源:KGMemDateList.cpp


示例19: GetItemData

LRESULT FolderTree::OnChecked(HTREEITEM hItem, BOOL &bHandled)
{
	FolderTreeItemInfo* pItem = (FolderTreeItemInfo*) GetItemData(hItem);
	if(!Util::validatePath(Text::fromT(pItem->m_sFQPath)))
	{
		// no checking myComp or network
		bHandled = TRUE;
		return 1;
	}
	
	HTREEITEM hSharedParent = HasSharedParent(hItem);
	// if a parent is checked then this folder should be removed from the ex list
	if(hSharedParent != NULL)
	{
		ShareParentButNotSiblings(hItem);
	}
	else
	{
        // if no parent folder is checked then this is a new root dir
		LineDlg virt;
		virt.title = TSTRING(VIRTUAL_NAME);
		virt.description = TSTRING(VIRTUAL_NAME_LONG);

		tstring path = pItem->m_sFQPath;
		if( path[ path.length() -1 ] != '\\' )
			path += '\\';

		if (!sp->addDirectory(path))
			return 1;

		UpdateParentItems(hItem);
	}
	
	UpdateChildItems(hItem, true);
	
	return 0;
}
开发者ID:BackupTheBerlios,项目名称:airdc-svn,代码行数:37,代码来源:FolderTree.cpp


示例20: GetItemData

/// Set the appropriate icon
bool wxCheckListCtrl::SetIcon(long& item)
{
  wxCheckListItemAttr* data = (wxCheckListItemAttr*) GetItemData(item);
  std::cout << "SetIcon : " << data << '\n';
  if (data)
  {
    int imageIndex = 0;
    if (data->GetChecked())
    {
      if (data->GetEnabled())
      {
        imageIndex = wxCHECKLIST_IMAGE_CHILD_CHECK_ENABLED;
      }
      else
      {
        imageIndex = wxCHECKLIST_IMAGE_CHILD_CHECK_DISABLED;
      }
    }
    else
    {
      if (data->GetEnabled())
      {
        imageIndex = wxCHECKLIST_IMAGE_CHILD_UNCHECKED_ENABLED;
      }
      else
      {
        imageIndex = wxCHECKLIST_IMAGE_CHILD_UNCHECKED_DISABLED;
      }
    }
    SetItemImage(item, imageIndex);

    return true;
  }
  else
    return false;
}
开发者ID:jmfrouin,项目名称:gnulinux-scleaner,代码行数:37,代码来源:checklistctrl.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ GetItemImage函数代码示例发布时间:2022-05-30
下一篇:
C++ GetItemCount函数代码示例发布时间: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