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

C++ GetColumn函数代码示例

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

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



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

示例1: GetColumn

void TableSettings::OnRemoveColumnClick(wxCommandEvent& event)
{
    Column *col = GetColumn( GetSelectedColumnName() );
    if( col ) {
		// delete associated keys
		SerializableList keys;
		GetConstraints( keys, col->GetName() );
		for(SerializableList::iterator it = keys.begin(); it != keys.end(); ++it ) {
			Constraint *key = (Constraint*) *it;
			m_lstKeys.DeleteObject( key );
			delete key;
		}
		// delete the column
        m_lstColumns.DeleteObject( col );
        delete col;
        UpdateView();
    }
}
开发者ID:AndrianDTR,项目名称:codelite,代码行数:18,代码来源:TableSettings.cpp


示例2: GetColumn

void wxHeaderCtrlBase::OnSeparatorDClick(wxHeaderCtrlEvent& event)
{
    const unsigned col = event.GetColumn();
    const wxHeaderColumn& column = GetColumn(col);

    if ( !column.IsResizeable() )
    {
        event.Skip();
        return;
    }

    int w = GetColumnTitleWidth(column);

    if ( !UpdateColumnWidthToFit(col, w) )
        event.Skip();
    else
        UpdateColumn(col);
}
开发者ID:chromylei,项目名称:third_party,代码行数:18,代码来源:headerctrlcmn.cpp


示例3: GetScrollPos

BOOL CSHListCtrl::AddHeaderToolTip(int nCol, LPCTSTR sTip )
{
	const int TOOLTIP_LENGTH = 80;
	char buf[TOOLTIP_LENGTH+1];

	CHeaderCtrl* pHeader = (CHeaderCtrl*)GetDlgItem(0);
	int nColumnCount = pHeader->GetItemCount();
	if( nCol >= nColumnCount)
		return FALSE;

	if( (GetStyle() & LVS_TYPEMASK) != LVS_REPORT )
		return FALSE;

	// Get the header height
	RECT rect;
	pHeader->GetClientRect( &rect );
	int height = rect.bottom;

	RECT rctooltip;
	rctooltip.top = 0;
	rctooltip.bottom = rect.bottom;

	// Now get the left and right border of the column
	rctooltip.left = 0 - GetScrollPos( SB_HORZ );
	for( int i = 0; i < nCol; i++ )
		rctooltip.left += GetColumnWidth( i );
	rctooltip.right = rctooltip.left + GetColumnWidth( nCol );

	if( sTip == NULL )
	{
		// Get column heading
		LV_COLUMN lvcolumn;
		lvcolumn.mask = LVCF_TEXT;
		lvcolumn.pszText = buf;
		lvcolumn.cchTextMax = TOOLTIP_LENGTH;
		if( !GetColumn( nCol, &lvcolumn ) )
			return FALSE;
	}


	m_tooltip.AddTool( GetDlgItem(0), sTip ? sTip : buf, &rctooltip, nCol+1 );
	return TRUE;

}
开发者ID:fredrikjonsson,项目名称:cadof72bian,代码行数:44,代码来源:shListCtrl.cpp


示例4: wxASSERT

bool CBOINCListCtrl::OnSaveState(wxConfigBase* pConfig) {
    wxString    strBaseConfigLocation = wxEmptyString;
    wxListItem  liColumnInfo;
    wxInt32     iIndex = 0;
    wxInt32     iColumnCount = 0;


    wxASSERT(pConfig);


    // Retrieve the base location to store configuration information
    // Should be in the following form: "/Projects/"
    strBaseConfigLocation = pConfig->GetPath() + wxT("/");

    // Convert to a zero based index
    iColumnCount = GetColumnCount() - 1;

    // Which fields are we interested in?
    liColumnInfo.SetMask(
        wxLIST_MASK_TEXT |
        wxLIST_MASK_WIDTH |
        wxLIST_MASK_FORMAT
    );

    // Cycle through the columns recording anything interesting
    for (iIndex = 0; iIndex <= iColumnCount; iIndex++) {
        GetColumn(iIndex, liColumnInfo);

        pConfig->SetPath(strBaseConfigLocation + liColumnInfo.GetText());

        pConfig->Write(wxT("Width"), liColumnInfo.GetWidth());
        
#if (defined(__WXMAC__) &&  wxCHECK_VERSION(2,8,0))
        pConfig->Write(wxT("Width"), GetColumnWidth(iIndex)); // Work around bug in wxMac-2.8.0 wxListCtrl::SetColumn()
#endif
    }

    // Save sorting column and direction
    pConfig->SetPath(strBaseConfigLocation);
    pConfig->Write(wxT("SortColumn"), m_pParentView->m_iSortColumn);
    pConfig->Write(wxT("ReverseSortOrder"), m_pParentView->m_bReverseSort);

    return true;
}
开发者ID:BME-IK,项目名称:gridbee-nacl-framework,代码行数:44,代码来源:BOINCListCtrl.cpp


示例5: GetColumn

void wxHeaderCtrlBase::OnSeparatorDClick(wxHeaderCtrlEvent& event)
{
    const unsigned col = event.GetColumn();
    const wxHeaderColumn& column = GetColumn(col);

    if ( !column.IsResizeable() )
    {
        event.Skip();
        return;
    }

    int w = wxWindowBase::GetTextExtent(column.GetTitle()).x;
    w += 4*GetCharWidth(); // add some arbitrary margins around text

    if ( !UpdateColumnWidthToFit(col, w) )
        event.Skip();
    else
        UpdateColumn(col);
}
开发者ID:mark711,项目名称:Cafu,代码行数:19,代码来源:headerctrlcmn.cpp


示例6: wxASSERT_MSG

int wxHeaderCtrl::MSWFromNativeOrder(int order)
{
    wxASSERT_MSG( order >= 0 && order < GetShownColumnsCount(),
                  "native column position out of range" );

    unsigned pos = order;
    for ( unsigned n = 0; n < m_numColumns; n++ )
    {
        if ( n > pos )
            break;

        if ( GetColumn(m_colIndices[n]).IsHidden() )
            pos++;
    }

    wxASSERT_MSG( MSWToNativeOrder(pos) == order, "logic error" );

    return pos;
}
开发者ID:mael15,项目名称:wxWidgets,代码行数:19,代码来源:headerctrl.cpp


示例7: DoSetColumnsOrder

void wxHeaderCtrl::DoSetColumnsOrder(const wxArrayInt& order)
{
    wxArrayInt orderShown;
    orderShown.reserve(m_numColumns);

    for ( unsigned n = 0; n < m_numColumns; n++ )
    {
        const int idx = order[n];
        if ( GetColumn(idx).IsShown() )
            orderShown.push_back(MSWToNativeIdx(idx));
    }

    if ( !Header_SetOrderArray(GetHwnd(), orderShown.size(), &orderShown[0]) )
    {
        wxLogLastError(wxT("Header_GetOrderArray"));
    }

    m_colIndices = order;
}
开发者ID:mael15,项目名称:wxWidgets,代码行数:19,代码来源:headerctrl.cpp


示例8: GetUninlinedColumnCount

// Compare two schemas
bool Schema::operator==(const Schema &other) const {
  if (other.GetColumnCount() != GetColumnCount() ||
      other.GetUninlinedColumnCount() != GetUninlinedColumnCount() ||
      other.IsInlined() != IsInlined()) {
    return false;
  }

  for (oid_t column_itr = 0; column_itr < other.GetColumnCount();
       column_itr++) {
    const Column &column_info = other.GetColumn(column_itr);
    const Column &other_column_info = GetColumn(column_itr);

    if (column_info != other_column_info) {
      return false;
    }
  }

  return true;
}
开发者ID:GeorgeErickson,项目名称:peloton,代码行数:20,代码来源:schema.cpp


示例9: GET_X_LPARAM

LRESULT CDrawHeader::DoLButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
	POINT point;
	point.x = GET_X_LPARAM(lParam);
	point.y = GET_Y_LPARAM(lParam);

	m_ptLastLButtonDown = point;
	
	if (!m_bColumnResizing)
	{
		m_pAlmSum->SetCapture(TRUE, this);
		if (MouseOverColumnResizeArea(point))
		{
			SetCursor(m_hColDivCursor); 
			m_bColumnResizing = TRUE;
		}
		else
		{
			m_nColumnCatpture = GetColumn(point);

			CDCHandle dcHandle = m_pAlmSum->GetDC();
			DoDraw(dcHandle);
			m_pAlmSum->ReleaseDC(dcHandle);
		}
	}

	if (m_bColumnResizing)
	{
		if (!GetResizeColumn(point, m_nResizingColumn, m_nDragDivideOffset))
			return 1;
		
		CRect rect = m_pAlmSum->m_rect;
		CRect invertedRect(point.x - 1 - m_nDragDivideOffset, rect.top, 
			point.x - m_nDragDivideOffset, rect.bottom);
		
		CDCHandle dcHandle = m_pAlmSum->GetDC();
		dcHandle.InvertRect(&invertedRect);
		m_pAlmSum->ReleaseDC(dcHandle);
	}
		
	return 0;
}
开发者ID:JackWangCUMT,项目名称:SuperCxHMI,代码行数:42,代码来源:DrawHeader.cpp


示例10: GetColumn

HRESULT CADsSearch::GetColumn( UINT nIndex, CStringList &sList )
{
	CString s;

	if ( m_sColumnList.IsEmpty() )
	{
		return E_FAIL;
	}

	POSITION pos;
	pos = m_sColumnList.FindIndex( nIndex );

	if ( pos == NULL )
	{
		return E_FAIL;
	}

	s = m_sColumnList.GetAt(pos);
	return GetColumn( s, sList );

}
开发者ID:Essjay1,项目名称:Windows-classic-samples,代码行数:21,代码来源:DirectorySearch.cpp


示例11: SetCapture

void EGridCtrl::OnLButtonDown(UINT nFlags, CPoint point)
{
	SetCapture();

	m_MouseDownCP = point;

	bool bOnHeaderRow = ( 0<=point.y && point.y<GetHeaderRowHeight() );

	if( bOnHeaderRow )
	{
		m_pDragColumn = GetColumn(point.x,true);

		if( m_pDragColumn!=NULL )
		{
			SetCursor( LoadCursor(NULL,IDC_SIZEWE) );
		}
	}
	else
	{
		int nCol=-1;
		int nRow=-1;

		EProperty* pProperty = GetProperty( point , nCol , nRow );

		m_SeletectPropertyIndex.x = nCol;
		m_SeletectPropertyIndex.y = nRow;

		SetActiveProperty(pProperty);

		if( m_pActiveProperty != NULL )
		{
			if( m_pActiveProperty->OnLButtonDown( this , point ) )
			{
				NotifyPropertyChanged();
				Invalidate();
			}
		}
	}

}
开发者ID:sosoayaen,项目名称:DescentBoardGameTools,代码行数:40,代码来源:EGridCtrl.cpp


示例12: if

// CTwoListCtrl 消息处理程序
void CSkinListProgressCtrl::DrawItem(LPDRAWITEMSTRUCT lpDIS )
{
    // TODO: Add your message handler code here and/or call default
    CDC   *pDC = CDC::FromHandle(lpDIS->hDC);  
    int   nRows = m_lstItemColor.GetCount();  
    COLORREF *clrCol = NULL;  
    if   (nRows && (int)lpDIS->itemID < nRows)  
    {  
        clrCol = m_lstItemColor.GetAt(m_lstItemColor.FindIndex(lpDIS->itemID));  
    }  
    CRect  rcItem(lpDIS->rcItem);  
    LVCOLUMN lvColumn;  
    ZeroMemory(&lvColumn, sizeof(LVCOLUMN));  
    lvColumn.mask = LVCF_FMT | LVCF_WIDTH;  
    for (int nCol = 0; nCol < GetHeaderCtrl()->GetItemCount(); nCol++)  
    {  
        if (clrCol)  
        {
            pDC->SetBkColor(clrCol[nCol]);
            pDC->SetTextColor(clrCol[nCol]);  
        }
        GetColumn(nCol, &lvColumn);  
        UINT   uStyle = DT_SINGLELINE | DT_END_ELLIPSIS;  
        if   (lvColumn.fmt & LVCFMT_LEFT)  
            uStyle |= DT_LEFT;  
        if   (lvColumn.fmt   &   LVCFMT_RIGHT)  
            uStyle |= DT_RIGHT;  
        if   (lvColumn.fmt & LVCFMT_CENTER)  
            uStyle |= DT_CENTER;  
        rcItem.right = rcItem.left + lvColumn.cx;  
     //   COLORREF color;
     //   GetSysColor(color);
     //   pDC->FillSolidRect(rcItem, RGB(122,122,122));//::GetSysColor(COLOR_INACTIVECAPTION));     
		 pDC->FillSolidRect(rcItem, m_listItemColor1); 
        pDC->DrawText(GetItemText(lpDIS->itemID, nCol), rcItem, uStyle);
        rcItem.left += lvColumn.cx;  
    }   
//     CListCtrl::OnDrawItem(nIDCtl, lpDIS);

}
开发者ID:anyboo,项目名称:project,代码行数:41,代码来源:SkinListProgressCtrl.cpp


示例13: GetColumn

void SmartListCtrl::Init(DWORD dwStyle, INT nCols, INT nFormat, LPCWSTR *pHeaders, DOUBLE *pColWidth /* = NULL */) {
	this->DeleteAllItems();
	this->SetExtendedStyle(this->GetExtendedStyle() | dwStyle);
	
	int nTotalWidth;
	CRect rc;
	this->GetWindowRect(&rc);
	nTotalWidth = static_cast<int>(rc.Size().cx);
	for(int i = 0; i < nCols; i++) {
		this->InsertColumn(i, pHeaders[i], nFormat, (pColWidth) ? static_cast<int>(nTotalWidth * pColWidth[i]) : (nTotalWidth / nCols));
	}

	// 修改参数使得支持第一列标题居中显示
	if(nFormat == LVCFMT_CENTER) {
		LVCOLUMN lvc;
		lvc.mask = LVCF_FMT;
		GetColumn(0, &lvc);
		lvc.fmt &= ~LVCFMT_JUSTIFYMASK;
		lvc.fmt |= LVCFMT_CENTER;
		SetColumn(0, &lvc);
	}
}
开发者ID:NeetSonic,项目名称:MFCUtils,代码行数:22,代码来源:SmartListCtrl.cpp


示例14: return

CEdit* CPlayerListCtrl::ShowInPlaceEdit(int nItem, int nCol)
{
	CRect rect;
	if(!PrepareInPlaceControl(nItem, nCol, rect))
		return(NULL);

	DWORD dwStyle = /*WS_BORDER|*/WS_CHILD|WS_VISIBLE|ES_AUTOHSCROLL;

	LV_COLUMN lvcol;
	lvcol.mask = LVCF_FMT;
	GetColumn(nCol, &lvcol);
	dwStyle |= (lvcol.fmt&LVCFMT_JUSTIFYMASK) == LVCFMT_LEFT ? ES_LEFT
		: (lvcol.fmt&LVCFMT_JUSTIFYMASK) == LVCFMT_RIGHT ? ES_RIGHT
		: ES_CENTER;

	CEdit* pEdit = new CInPlaceEdit(nItem, nCol, GetItemText(nItem, nCol));
	pEdit->Create(dwStyle, rect, this, IDC_EDIT1);

	m_fInPlaceDirty = false;

	return pEdit;
}
开发者ID:banduladh,项目名称:meplayer,代码行数:22,代码来源:PlayerListCtrl.cpp


示例15: sizeof

int CTreeList::QuerySubItemText(int item, CHAR *Data, int length)
{
    LV_COLUMN lvc;
    LV_ITEM lvi;
    int     ncol;
    CRect   rect;

    ::ZeroMemory(&lvc, sizeof(lvc));
    lvc.mask = LVCF_WIDTH |LVCF_FMT;

    for (ncol=0; GetColumn(ncol, &lvc); ncol++) {

        if (ncol > 0) {
            GetSubItemRect(item, ncol,LVIR_BOUNDS, rect);
        } else {
            GetItemRect(item, rect, LVIR_BOUNDS);
            rect.right = GetColumnWidth(0);
            rect.left = 0;
        }

        if (rect.PtInRect(m_Point)) {

            ::ZeroMemory(Data, length);
            ::ZeroMemory(&lvi, sizeof(lvi));

            lvi.iItem = item;
            lvi.mask = LVIF_TEXT;
            lvi.iSubItem = ncol;
            lvi.pszText = Data;
            lvi.cchTextMax = length;

            return GetItem(&lvi);
            break;
        }
    }

    return FALSE;
}
开发者ID:Axure,项目名称:Ext3Fsd,代码行数:38,代码来源:TreeList.cpp


示例16: GetColumn

void wxHeaderCtrl::DoUpdate(unsigned int idx)
{
    // the native control does provide Header_SetItem() but it's inconvenient
    // to use it because it sends HDN_ITEMCHANGING messages and we'd have to
    // arrange not to block setting the width from there and the logic would be
    // more complicated as we'd have to reset the old values as well as setting
    // the new ones -- so instead just recreate the column

    const wxHeaderColumn& col = GetColumn(idx);
    if ( col.IsHidden() )
    {
        // column is hidden now
        if ( !m_isHidden[idx] )
        {
            // but it wasn't hidden before, so remove it
            if ( !Header_DeleteItem(GetHwnd(), MSWToNativeIdx(idx)) )
                wxLogLastError(wxS("Header_DeleteItem()"));

            m_isHidden[idx] = true;
        }
        //else: nothing to do, updating hidden column doesn't have any effect
    }
    else // column is shown now
    {
        if ( m_isHidden[idx] )
        {
            m_isHidden[idx] = false;
        }
        else // and it was shown before as well
        {
            // we need to remove the old column
            if ( !Header_DeleteItem(GetHwnd(), MSWToNativeIdx(idx)) )
                wxLogLastError(wxS("Header_DeleteItem()"));
        }

        DoInsertItem(col, idx);
    }
}
开发者ID:Anti-Ultimate,项目名称:dolphin,代码行数:38,代码来源:headerctrl.cpp


示例17: while

// scan for the next block element of type, returns true if no error, , bEof will be set to true if eof is hit
bool Elementizer::GetNextBlock(int type, bool& bEof)
{
    bool bFound = false;
    while(bFound == false)
    {
        if (GetNext(bEof) == false || bEof == true)
        {
            break;
        }
        if (GetType() == type_block && GetValue() == type)
        {
            if (GetColumn() != 1)
            {
                m_pCompilerData->error = true;
                m_pCompilerData->error_msg = g_pErrorStrings[error_bdmbifc];
                return false;
            }
            bFound = true;
        }
    }
    // if we found the block or we hit eof, then we got no error so return true
    return (bFound || bEof);
}
开发者ID:BackupGGCode,项目名称:open-source-spin-compiler,代码行数:24,代码来源:Elementizer.cpp


示例18: GetColumnCount

unsigned int wxHeaderCtrl::FindColumnAtPoint(int x, bool *onSeparator) const
{
    int pos = 0;
    const unsigned count = GetColumnCount();
    for ( unsigned n = 0; n < count; n++ )
    {
        const unsigned idx = m_colIndices[n];
        const wxHeaderColumn& col = GetColumn(idx);
        if ( col.IsHidden() )
            continue;

        pos += col.GetWidth();

        // if the column is resizable, check if we're approximatively over the
        // line separating it from the next column
        //
        // TODO: don't hardcode sensitivity
        if ( col.IsResizeable() && abs(x - pos) < 8 )
        {
            if ( onSeparator )
                *onSeparator = true;
            return idx;
        }

        // inside this column?
        if ( x < pos )
        {
            if ( onSeparator )
                *onSeparator = false;
            return idx;
        }
    }

    if ( onSeparator )
        *onSeparator = false;
    return COL_NONE;
}
开发者ID:Toonerz,项目名称:project64,代码行数:37,代码来源:headerctrlg.cpp


示例19: GetNewColumnData

CColumnData* CEnListCtrl::CreateColumnData(int nCol)
{
	CColumnData* pData = NULL;

	if (!m_mapColumnData.Lookup(nCol, pData)) // see if its already added
	{
		pData = GetNewColumnData();
		
		if (pData)
			m_mapColumnData.SetAt(nCol, pData);

		// set the column format to the most appropriate
		LV_COLUMN lvc = { 0 };
		lvc.mask = LVCF_FMT;
		
		if (GetColumn(nCol, &lvc))
		{
			if ((lvc.fmt & LVCFMT_JUSTIFYMASK) == LVCFMT_RIGHT)
				pData->nFormat = ES_START;
		}
	}

	return pData;
}
开发者ID:jithuin,项目名称:infogeezer,代码行数:24,代码来源:enlistctrl.cpp


示例20: GetColumnCount

// event handling:
void wxDataViewCtrl::OnSize(wxSizeEvent& event)
{
  unsigned int const noOfColumns = GetColumnCount();


 // reset DC of all custom renderers because DC has changed:
  for (unsigned int i=0; i<noOfColumns; ++i)
  {
    wxDataViewColumn* dataViewColumnPtr(GetColumn(i));

    if (dataViewColumnPtr != NULL)
    {
      wxDataViewCustomRenderer* dataViewCustomRendererPtr(dynamic_cast<wxDataViewCustomRenderer*>(dataViewColumnPtr->GetRenderer()));

      if (dataViewCustomRendererPtr != NULL)
        dataViewCustomRendererPtr->SetDC(NULL);
    }
  }

 // update the layout of the native control after a size event:
  GetDataViewPeer()->OnSize();

  event.Skip();
}
开发者ID:Annovae,项目名称:Dolphin-Core,代码行数:25,代码来源:dataview_osx.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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