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


C++ GetColumn函数代码示例

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


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


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