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

C++ GetListCtrl函数代码示例

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

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



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

示例1: GetListCtrl

void CSideBar::SetAttributeChecks()
{
   MetaGraph *graph = m_treeDoc->m_meta_graph;
   if (graph == NULL) {
      return;
   }
   CListCtrl& list = GetListCtrl();

   if (graph->viewingProcessed()) {
            
      int displayed_attribute = graph->getDisplayedAttribute();

      LVITEM item;
      for (int i = 0; i < list.GetItemCount(); i++) {
         item.iItem = i;
         item.iSubItem = 0;
         item.iImage = 0;
         item.mask = LVIF_IMAGE;
         list.GetItem(&item);
         int image = item.iImage;
         if ((i-1) == displayed_attribute) {
            if (!m_attribute_locked[i]) {
               image = 0;
            }
            else {
               image = 2;
            }
         }
         else {
            if (!m_attribute_locked[i]) {
               image = 1;
            }
            else {
               image = 3;
            }
         }
         if (item.iImage != image) {
            item.iImage = image;
            list.SetItem(&item);
         }
      }
   }
}
开发者ID:SZ-whf,项目名称:Depthmap,代码行数:43,代码来源:SideBar.cpp


示例2: GetListCtrl

/**
* Called when a stage is moved
* @param pMaterial The material that was deleted.
* @param from The from index
* @param to The to index
*/
void StageView::MV_OnMaterialStageMove(MaterialDoc* pMaterial, int from, int to) {

	if(!internalChange) {
		from++;
		to++;

		CListCtrl& list = GetListCtrl();

		char szLabel[256];
		LV_ITEM lvi;
		ZeroMemory(&lvi, sizeof(LV_ITEM));
		lvi.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_STATE | LVIF_PARAM;
		lvi.stateMask = LVIS_DROPHILITED | LVIS_FOCUSED | LVIS_SELECTED;
		lvi.pszText = szLabel;
		lvi.iItem = from;
		lvi.cchTextMax = 255;
		list.GetItem(&lvi);

		//Delete the original item
		list.DeleteItem(from);

		//Insert the item
		lvi.iItem = to;
		list.InsertItem(&lvi);

		int type = -1;

		int stageType = currentMaterial->GetAttributeInt(to-1, "stagetype");
		switch(stageType) {
				case MaterialDoc::STAGE_TYPE_NORMAL:
					type = MaterialDefManager::MATERIAL_DEF_STAGE;
					break;
				case MaterialDoc::STAGE_TYPE_SPECIALMAP:
					type = MaterialDefManager::MATERIAL_DEF_SPECIAL_STAGE;
					break;
		}

		m_propView->SetPropertyListType(type, to-1);

		Invalidate();

	}
}
开发者ID:ProfessorKaos64,项目名称:tdm,代码行数:49,代码来源:StageView.cpp


示例3: GetListCtrl

CString CLeftView::GetHeaderState(void)
{
	CString szHeader;
	CListCtrl& ctlList = (CListCtrl&) GetListCtrl();
	CHeaderCtrl* pHeaderCtrl = ctlList.GetHeaderCtrl();

	HDITEM hdi;
	int   nCount = pHeaderCtrl->GetItemCount();
	for(int i = 0; i < nCount; i++)
	{
		hdi.mask = HDI_WIDTH;
		pHeaderCtrl->GetItem(i, &hdi);
		CString szWidth;
		szWidth.Format( _T("%d,"), hdi.cxy);
		szHeader.Append( szWidth ) ;
	}

	return szHeader;
}
开发者ID:zephyrer,项目名称:activelog,代码行数:19,代码来源:LeftView.cpp


示例4: GetListCtrl

void CGldEditorView::LoadGlobals(void)
{
	CListCtrl &list = GetListCtrl();
	
	int nColumns = list.GetHeaderCtrl()?list.GetHeaderCtrl()->GetItemCount():0;
	for (int i=0; i<nColumns; i++)
		list.DeleteColumn(0);

	CRect wr;
	list.GetClientRect(&wr);
	int nCol=0;
	int nWid=0;
	#define W(X) (nWid+=X,X)
	int Name = list.InsertColumn(nCol++,"Name",LVCFMT_LEFT,W(150),nCol);
	int Module = list.InsertColumn(nCol++,"Module",LVCFMT_LEFT,W(150),nCol);
	int Type = list.InsertColumn(nCol++,"Type",LVCFMT_LEFT,W(100),nCol);
	int Access = list.InsertColumn(nCol++,"Access",LVCFMT_LEFT,W(150),nCol);
	int Data = list.InsertColumn(nCol++,"Data",LVCFMT_LEFT,wr.Width()-nWid,nCol);
	#undef W

	GLOBALVAR *var = NULL;
	while ((var=global_getnext(var))!=NULL)
	{
		char modname[1024], varname[1024];
		int nItem = list.InsertItem(list.GetItemCount(),var->name);
		char buffer[1024]="";

		if (sscanf(var->name,"%[^:]::%s", modname, varname)==2)
		{
			list.SetItemText(nItem,Name,varname);
			list.SetItemText(nItem,Module,modname);
		}

		list.SetItemText(nItem,Type,class_get_property_typename(var->prop->ptype));

		convert_from_enumeration(buffer,sizeof(buffer),&(var->prop->access),object_access_property());
		list.SetItemText(nItem,Access,buffer);

		global_getvar(var->name,buffer,sizeof(buffer));
		list.SetItemText(nItem,Data,buffer);
	}
}
开发者ID:GridOPTICS,项目名称:FNCS-gridlab-d,代码行数:42,代码来源:GldEditorView.cpp


示例5: OnInitialUpdate

void RightListView::OnInitialUpdate()
{
	CListView::OnInitialUpdate();
	const int numofColumn=7;
	int i;
	CString m_ColumnLabelStr[numofColumn]={"Frequence(lp/mm)","MTF(T)","MTF(S)","LSF(T)","LSF(S)","POS(t)","POS(s)"};
	CListCtrl& listctrl=GetListCtrl();
	listctrl.SetExtendedStyle(LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES|LVS_EX_UNDERLINEHOT);
	int ColumnWidth[numofColumn]={140,100,100,100,100,100,100};
	for(i=0;i<numofColumn;i++)
	{
		listctrl.InsertColumn(i,m_ColumnLabelStr[i],LVCFMT_LEFT,ColumnWidth[i]);
	}
	
	CBackgroundWnd* FrameWndPoint=(CBackgroundWnd*)(GetParentFrame());
	int arraylen=FrameWndPoint->getarraylength();
	double* dpfreq=FrameWndPoint->getdFreq();
	double* dpmtft=FrameWndPoint->getdMTFt();
	double* dpmtfs=FrameWndPoint->getdMTFs();
	double* dplsft=FrameWndPoint->getdLSFt();
	double* dplsfs=FrameWndPoint->getdLSFs();
	double* dppost=FrameWndPoint->getdPOSt();
	double* dpposs=FrameWndPoint->getdPOSs();
	char insertbuffer[100];
	for(i=0;i<arraylen;i++)
	{
		sprintf(insertbuffer,"%.4lf",dpfreq[i]);
		listctrl.InsertItem(i,insertbuffer);
		sprintf(insertbuffer,"%.4lf",dpmtft[i]);
		listctrl.SetItemText(i,1,insertbuffer);
		sprintf(insertbuffer,"%.4lf",dpmtfs[i]);
		listctrl.SetItemText(i,2,insertbuffer);
		sprintf(insertbuffer,"%.4lf",dplsft[i]);
		listctrl.SetItemText(i,3,insertbuffer);
		sprintf(insertbuffer,"%.4lf",dplsfs[i]);
		listctrl.SetItemText(i,4,insertbuffer);
		sprintf(insertbuffer,"%.4lf",dppost[i]);
		listctrl.SetItemText(i,5,insertbuffer);
		sprintf(insertbuffer,"%.4lf",dpposs[i]);
		listctrl.SetItemText(i,6,insertbuffer);
	}
}
开发者ID:LoveWX,项目名称:Projects_in_master_stage,代码行数:42,代码来源:RightListView.cpp


示例6: GetListCtrl

int CRuleListView::RefreshAdapter(CAdapterInfo *pAdapterInfo)
{
    CListCtrl& listView = GetListCtrl();
    
    int nIndex = 0;
    CHAR szIndex[10];
    RtlZeroMemory(szIndex, sizeof(szIndex));
    
    // VirtualAdapterName
    _stprintf(szIndex, _T("%d"), nIndex + 1);
    
    listView.InsertItem(nIndex, szIndex);
    
    listView.SetItemText(nIndex, 1, _T("VirtualAdapterName"));
    listView.SetItemText(nIndex, 2, pAdapterInfo->m_strVirtualAdapterName);
    
    // LowerAdapterName
    _stprintf(szIndex, _T("%d"), ++nIndex + 1);
    
    listView.InsertItem(nIndex, szIndex);
    
    listView.SetItemText(nIndex, 1, _T("LowerAdapterName"));
    listView.SetItemText(nIndex, 2, pAdapterInfo->m_strLowerAdapterName);
    
    // FriendlyAdapterName
    _stprintf(szIndex, _T("%d"), ++nIndex + 1);
    
    listView.InsertItem(nIndex, szIndex);
    
    listView.SetItemText(nIndex, 1, _T("FriendlyAdapterName"));
    listView.SetItemText(nIndex, 2, pAdapterInfo->m_strFriendlyAdapterName);

    // FriendlyAdapterName
    _stprintf(szIndex, _T("%d"), ++nIndex + 1);
    
    listView.InsertItem(nIndex, szIndex);
    
    listView.SetItemText(nIndex, 1, _T("PhysicalAddress"));
    listView.SetItemText(nIndex, 2, pAdapterInfo->m_strAdapterMacAddress);
    
    return nIndex;
}
开发者ID:340211173,项目名称:hf-2011,代码行数:42,代码来源:RuleListView.cpp


示例7: AfxMessageBox

void CTblInfoView::UpdateListInfo(CString strTblName)
{
    if (m_Operation != OP_NONE)
    {
        AfxMessageBox("请先提交操作");
        return;
    }

    //just need to set the header.
    static CMainFrame* pMainFrame = reinterpret_cast<CMainFrame*>(AfxGetMainWnd());
    static CListCtrl &ctrl        = GetListCtrl();
    CHeaderCtrl *pHeader          = ctrl.GetHeaderCtrl(); 
    CNetWork *pNet                = &pMainFrame->m_Nets;
    
    int nCount = pHeader->GetItemCount();
    int i;
    for (i = 0; i < nCount; i++)
    {
        //pHeader->DeleteItem(0);   bug, should do like this
        ctrl.DeleteColumn(0);
    }

    ctrl.DeleteAllItems();

    //m_map_tbl_cols[strTblName];
    CString strOri  = pNet->GetOriName(strTblName);
    CString strCols = pNet->GetColsForTbl(strOri);
    CString strSub  = _T("");
    for (i = 0; ; i++)
    {
        if (!AfxExtractSubString(strSub, strCols, i, '|')
            || 0 == strSub.GetLength())
        {
            break;
        }
        
        //we use alias
        ctrl.InsertColumn(i, pNet->GetAlias(strSub), LVCFMT_LEFT, 70);
    }

    m_strCurTbl = strOri;
}
开发者ID:xuwenbo,项目名称:Ph2_StudManage,代码行数:42,代码来源:TblInfoView.cpp


示例8: GetListCtrl

// @pymethod <o LV_COLUMN>|PyCListCtrl|GetColumn|Retrieves the details of a column in the control.
PyObject *PyCListCtrl_GetColumn( PyObject *self, PyObject *args )
{
	int col;
	if (!PyArg_ParseTuple( args, "i:GetColumn", 
	                   &col)) // @pyparm int|column||The index of the column whose attributes are to be retrieved.
		return NULL;
	CListCtrl *pList = GetListCtrl(self);
	if (!pList) return NULL;
	TCHAR textBuf[256];
	LV_COLUMN lvItem;
	lvItem.pszText = textBuf;
	lvItem.cchTextMax = sizeof(textBuf)/sizeof(TCHAR);
	lvItem.mask = LVCF_FMT | LVCF_SUBITEM | LVCF_TEXT | LVCF_WIDTH;
	GUI_BGN_SAVE;
	BOOL ok = pList->GetColumn( col, &lvItem);
	GUI_END_SAVE;
	if (!ok)
		RETURN_ERR("GetColumn failed");
	return PyWinObject_FromLV_COLUMN(&lvItem);
}
开发者ID:DavidGuben,项目名称:rcbplayspokemon,代码行数:21,代码来源:win32ctrlList.cpp


示例9: make

// @pymethod int|PyCListCtrl|SetImageList|Assigns an image list to a list view control.
PyObject *PyCListCtrl_SetImageList( PyObject *self, PyObject *args )
{
	CListCtrl *pList;
	PyObject *obList;
	int imageType;
	if (!(pList=GetListCtrl(self)))
		return NULL;
	if (!PyArg_ParseTuple(args, "Oi:SetImageList", 
		                  &obList, // @pyparm <o PyCImageList>|imageList||The Image List to use.
						  &imageType )) // @pyparm int|imageType||Type of image list. It can be one of (COMMCTRL.) LVSIL_NORMAL, LVSIL_SMALL or LVSIL_STATE
		return NULL;
	CImageList *pImageList = PyCImageList::GetImageList(obList);
	if (pImageList==NULL) return NULL;
	GUI_BGN_SAVE;
	CImageList *pOldList = pList->SetImageList( pImageList, imageType );
	GUI_END_SAVE;
	if (pOldList==NULL)
		RETURN_NONE;
	return ui_assoc_object::make( PyCImageList::type, pOldList )->GetGoodRet();
}
开发者ID:DavidGuben,项目名称:rcbplayspokemon,代码行数:21,代码来源:win32ctrlList.cpp


示例10: GetDocument

void CLeftView::UpdateIcon()
{
	int i=0, iCount=0, iGap = 0;
	double dDeviation = 0;
	CFoulerDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	if( pDoc->m_sprt.GetReady() == FALSE ) return;
	dDeviation = pDoc->m_sprt.GetDeviation();
	if( dDeviation <= 0 ) return;
	CListCtrl& refCtrl = GetListCtrl();
	iCount = refCtrl.GetItemCount();
	for( i = 0 ; i < iCount ; i++ )
	{
		iGap = (int)( (pDoc->m_pData[i]->GetItem()-pDoc->m_sprt.GetTheta0())/dDeviation );
		iGap = abs(iGap);
		if( iGap > 3 ) iGap = 3;
		refCtrl.SetItem( i, 0, LVIF_IMAGE, NULL, iGap, 0, 0, 0 );
	}
	//refCtrl.Scroll( CSize(100, pDoc->m_iNo*20) );
}
开发者ID:WisemanLim,项目名称:femos,代码行数:20,代码来源:LeftView.cpp


示例11: GetListCtrl

bool CGumpListView::SaveGumpDesc(LPCTSTR szDescFile)
{
	CListCtrl& ctrl = GetListCtrl();

	CStdioFile file;
	if (!file.Open(szDescFile, CFile::modeCreate | CFile::modeWrite)) return false;

	int id = 0;
	LPCTSTR desc;
	for (int i = 0; i < ctrl.GetItemCount(); i++)
	{
		id = ctrl.GetItemData(i);
		desc = GetGumpDesc(id);
		file.WriteString(GfxSprintf("0x%04X=%s\n",id, desc ? desc : ""));
	}

	file.Close();

	return true;
}
开发者ID:BackupTheBerlios,项目名称:iris-svn,代码行数:20,代码来源:GumpListView.cpp


示例12:

// @pymethod int|PyCListCtrl|SetItem|Sets some of all of an items attributes.
PyObject *PyCListCtrl_SetItem( PyObject *self, PyObject *args )
{
	CListCtrl *pList;
	PyObject *obLVItem;
	if (!(pList=GetListCtrl(self)))
		return NULL;
	if (!PyArg_ParseTuple(args, "O:SetItem",
		                 &obLVItem)) // @pyparm <o LV_ITEM>|item||A tuple describing the new item.
		return NULL;
	LV_ITEM lvItem;
	if (!PyWinObject_AsLV_ITEM(obLVItem, &lvItem))
		return NULL;
	GUI_BGN_SAVE;
	BOOL ok = pList->SetItem(&lvItem);
	GUI_END_SAVE;
	PyWinObject_FreeLV_ITEM(&lvItem);
	if (!ok)
		RETURN_ERR("SetItem failed");
	RETURN_NONE;
}
开发者ID:DavidGuben,项目名称:rcbplayspokemon,代码行数:21,代码来源:win32ctrlList.cpp


示例13: OnColumnClick

/*
	OnColumnClick()
*/
void CWallBrowserFileView::OnColumnClick(NMHDR* pnmh,LRESULT* /*pResult*/)
{
	NM_LISTVIEW* pnmlv = (NM_LISTVIEW*)pnmh;
	
	switch(pnmlv->iSubItem)
	{
		case 0:
			g_bFileNameAscending = !g_bFileNameAscending;
			break;
		case 1:
			g_bSizeAscending = !g_bSizeAscending;
			break;
		case 2:
			g_bModifiedAscending = !g_bModifiedAscending;
			break;
	}

	g_nSortOrder = pnmlv->iSubItem;
	GetListCtrl().SortItems(CompareFunc,pnmlv->iSubItem);
}
开发者ID:code4bones,项目名称:crawlpaper,代码行数:23,代码来源:WallBrowserFileView.cpp


示例14: ZeroMemory

void CLeftView::OnContextMenu(CWnd* pWnd, CPoint point) 
{
	char cStr[64];
	ZeroMemory( cStr, sizeof(cStr) );
	CMenu menu;
	CFoulerDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	menu.CreatePopupMenu();
	CListCtrl& refCtrl = GetListCtrl();
	int iCount = refCtrl.GetSelectedCount();
	if( iCount > 0 )
	{
		wsprintf( cStr, "%d items have been selected", iCount );
		menu.AppendMenu( MF_STRING, NULL, cStr );
		menu.AppendMenu( MF_STRING, ID_EDIT_COPY, "Copy" );
	}
	if( CanPaste() ) menu.AppendMenu( MF_STRING, ID_EDIT_PASTE, "Paste" );
	SetForegroundWindow();
	menu.TrackPopupMenu( TPM_LEFTALIGN, point.x, point.y, this, NULL );
}
开发者ID:WisemanLim,项目名称:femos,代码行数:20,代码来源:LeftView.cpp


示例15: GetListCtrl

/**
* Dispalys the popup menu with the appropriate menu items enabled.
*/
void StageView::PopupMenu( CPoint *pt ) {
	//Determine the type of object clicked on
	CListCtrl &list = GetListCtrl();
	ClientToScreen( pt );
	CMenu FloatingMenu;
	VERIFY( FloatingMenu.LoadMenu( IDR_ME_STAGELIST_POPUP ) );
	CMenu *pPopupMenu = FloatingMenu.GetSubMenu( 0 );
	ASSERT( pPopupMenu != NULL );
	POSITION pos = list.GetFirstSelectedItemPosition();
	int nItem = -1;
	if( pos ) {
		nItem = list.GetNextSelectedItem( pos );
	}
	if( nItem <= 0 ) {
		pPopupMenu->EnableMenuItem( ID_STAGEPOPUP_RENAMESTAGE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED );
		pPopupMenu->EnableMenuItem( ID_STAGEPOPUP_DELETESTAGE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED );
		pPopupMenu->EnableMenuItem( ID_STAGEPOPUP_CUT, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED );
		pPopupMenu->EnableMenuItem( ID_STAGEPOPUP_COPY, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED );
	} else {
		MaterialDoc *material = materialDocManager->GetCurrentMaterialDoc();
		if( material->GetAttributeInt( nItem - 1, "stagetype" ) != MaterialDoc::STAGE_TYPE_NORMAL ) {
			pPopupMenu->EnableMenuItem( ID_STAGEPOPUP_RENAMESTAGE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED );
		}
	}
	MaterialDoc *material = materialDocManager->GetCurrentMaterialDoc();
	if( material->FindStage( MaterialDoc::STAGE_TYPE_SPECIALMAP, "bumpmap" ) >= 0 ) {
		pPopupMenu->EnableMenuItem( ID_STAGEPOPUP_ADDBUMPMAP, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED );
	}
	if( material->FindStage( MaterialDoc::STAGE_TYPE_SPECIALMAP, "diffusemap" ) >= 0 ) {
		pPopupMenu->EnableMenuItem( ID_STAGEPOPUP_ADDDIFFUSEMAP, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED );
	}
	if( material->FindStage( MaterialDoc::STAGE_TYPE_SPECIALMAP, "specularmap" ) >= 0 ) {
		pPopupMenu->EnableMenuItem( ID_STAGEPOPUP_ADDSPECULAR, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED );
	}
	if( materialDocManager->IsCopyStage() ) {
		pPopupMenu->EnableMenuItem( ID_STAGEPOPUP_PASTE, MF_BYCOMMAND | MF_ENABLED );
	} else {
		pPopupMenu->EnableMenuItem( ID_STAGEPOPUP_PASTE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED );
	}
	pPopupMenu->TrackPopupMenu( TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt->x, pt->y, &list );
}
开发者ID:SL987654,项目名称:The-Darkmod-Experimental,代码行数:44,代码来源:StageView.cpp


示例16: GetListCtrl

void CRowListView::OnViewStateIcons()
{
	m_bStateIcons =! m_bStateIcons;

	CListCtrl& ListCtrl = GetListCtrl();

	if (m_bStateIcons)
	{
		ListCtrl.SetImageList(&m_StateImageList, LVSIL_STATE);
		ListCtrl.SetItemState(m_nCheckedItem, 0, LVIS_OVERLAYMASK);
	}
	else
	{
		ListCtrl.SetImageList(NULL,LVSIL_STATE);
		if (m_nCheckedItem != -1)
		{
			ListCtrl.SetItemState(m_nCheckedItem,
				INDEXTOOVERLAYMASK(1), LVIS_OVERLAYMASK);
		}
	}
}
开发者ID:jetlive,项目名称:skiaming,代码行数:21,代码来源:rlistvw.cpp


示例17: GetListCtrl

void CPakViewFiles::OnInitialUpdate() 
{
	CListView::OnInitialUpdate();
	CListCtrl& lc = GetListCtrl();

	// modify the list control's attributes
	DWORD dwStyle = GetWindowLong(lc.m_hWnd, GWL_STYLE);
	SetWindowLong(lc.m_hWnd, GWL_STYLE, (dwStyle & ~LVS_TYPEMASK) |
		LVS_ALIGNLEFT | LVS_AUTOARRANGE | LVS_REPORT | // LVS_ICON |
  		// LVS_NOITEMDATA | 
		 LVS_SORTASCENDING);

	// add some headers
	
	// 1. name of entry
	lc.InsertColumn(0, "Name", LVCFMT_LEFT, 150, colName);
	// 2. size of entry
	lc.InsertColumn(1, "Size", LVCFMT_RIGHT, 80, colSize);
	// 3. type of entry
	lc.InsertColumn(2, "Type", LVCFMT_LEFT, 180, colType);
}
开发者ID:DeadZoneLuna,项目名称:SourceEngine2007,代码行数:21,代码来源:pakviewfiles.cpp


示例18: ModifyStyle

int CUserView::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CListView::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	// TODO: Add your specialized creation code here
    ModifyStyle(0,LVS_REPORT);

	CListCtrl &theCtrl=GetListCtrl();
    theCtrl.InsertColumn(0,"计算机名称",
        LVCFMT_LEFT,100);
    theCtrl.InsertColumn(1,"IP地址",
        LVCFMT_LEFT,100);
    theCtrl.InsertColumn(2,"签名",
        LVCFMT_LEFT,100);

    //检测HeartBeat的定时器
    SetTimer(2,1000*20,NULL);

	return 0;
}
开发者ID:zhangruizhru,项目名称:FeiQ,代码行数:21,代码来源:UserView.cpp


示例19: GetWindowLong

void CTblInfoView::OnInitialUpdate() 
{
	CListView::OnInitialUpdate();
	
    //设置TreeView Style
    LONG lOld = GetWindowLong(GetSafeHwnd(), GWL_STYLE);

    SetWindowLong(GetSafeHwnd(),
                    GWL_STYLE, 
                    lOld 
                    | WS_CHILDWINDOW| WS_VISIBLE | WS_CLIPCHILDREN | WS_HSCROLL | WS_VSCROLL |WS_TABSTOP 
                    | LVS_REPORT | LVS_SHAREIMAGELISTS | LVS_ALIGNLEFT 
                    | LVS_NOSORTHEADER 
                    | LVS_EX_FULLROWSELECT
                  );

    GetListCtrl().SetExtendedStyle(WS_EX_LEFT|WS_EX_RIGHTSCROLLBAR|WS_EX_CLIENTEDGE
                                |LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES
                                );
	
}
开发者ID:xuwenbo,项目名称:Ph2_StudManage,代码行数:21,代码来源:TblInfoView.cpp


示例20: GetListCtrl

int ValueView::OnCreate(LPCREATESTRUCT lpcs)
{
    if (CListView::OnCreate(lpcs) == -1)
        return -1;

    CListCtrl &list = GetListCtrl();
    list.SetExtendedStyle(/*LVS_EX_GRIDLINES | */LVS_EX_FULLROWSELECT);

    // Add the columns
    int ncols = sizeof(headers) / sizeof(LPCSTR);
    int nwidth = (lpcs->cx / ncols);

    for (int i = 0; i < ncols; i++) {
        list.InsertColumn(i, headers[i], LVCFMT_CENTER,
                          nwidth);
    }

    OnSettingChange(0, 0);

    return 0;
}
开发者ID:trieck,项目名称:source,代码行数:21,代码来源:ValueView.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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