您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ DrawItem函数代码示例

51自学网 2021-06-01 20:30:03
  C++
这篇教程C++ DrawItem函数代码示例写得很实用,希望能帮到您。

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

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

示例1: ItemsRect

void ListPage::PartialDraw(short int iOldSel, short int iOldFirstInView){	Rect r = ItemsRect();	short int iDiff = m_firstItemInView - iOldFirstInView;	if (iDiff !=0)	{		if (abs(iDiff)>1)		{			Draw();			return;		}		int iH = (CountItemsInView()-1) * m_itemHeight;		int ySrc = r.y;		int yDst = r.y;		if (iDiff == 1)			ySrc += m_itemHeight;		else			yDst += m_itemHeight;		TAP_Osd_Copy(m_osdRegionIndex, m_osdRegionIndex, r.x, ySrc, r.w, iH, r.x, yDst, false);	}	DrawItem(r, m_selectedItem);		DrawItem(r, iOldSel);	DrawFooterAndScrollBar();	TAP_Osd_Copy(m_osdRegionIndex, GetTAPScreenRegion(), 0, 0, m_rcList.w, m_rcList.h, m_rcList.x, m_rcList.y, false);}
开发者ID:BackupTheBerlios,项目名称:tap-svn,代码行数:32,


示例2: PaintTopRow

static void PaintTopRow(HDC hDC, HDC arrow, MENUITEM *items, MENUITEM *selected, int x, int y, HFONT font, int fontHeight){    MENUITEM *orig = items;    int orig_x = x;    SIZE xx;    xx.cx =40;    while (items)    {        GetTextExtentPoint32W(hDC, items->text, wcslen(items->text), &xx);        xx.cx += 16;        DrawItem(hDC, items->text, selected == items, COLOR_BTNFACE, x, y, xx.cx, fontHeight);        x += xx.cx;        items = items->next;    }    DrawItem(hDC, L"<---->", FALSE, COLOR_WINDOW, x, y, xx.cx, fontHeight);        items = orig;    x = orig_x;    while (items)    {        SIZE xx;        if (items->expanded)            PaintColumn(hDC, arrow, items->popup, selected, x, y+fontHeight, font, fontHeight);        GetTextExtentPoint32W(hDC, items->text, wcslen(items->text), &xx);        xx.cx += 16;        x += xx.cx;        items = items->next;    }    }
开发者ID:jossk,项目名称:OrangeC,代码行数:29,


示例3: SortArray

/* --------------------------------------------------------------------* FUNCTION NAME: Draw* DESCRIPTION  : Draws Combobox on console, will check whether to draw*				  One label or the entire combobox using _isOpen.* RETURN       : None.* NOTES        : Polymorphic function - inherited from Widget.* -------------------------------------------------------------------- */void ComboBox::Draw(COORD CursorPosition, const HANDLE& console){	if (!_comboNames.size())		return;	if (!_isSorted) {		SortArray();	}	strVecItr itr = _comboNames.begin();	if (!_isOpen) {		_isOpen = true;		CursorPosition = GetCoord();		clearWidget(CursorPosition, console, GetLongestString() + 6, _comboNames.size()*HEIGHT_OF_CELL);		while (itr->index != _selected)			itr++;		DrawItem(CursorPosition, console, itr, true);	}	else {		while (itr != _comboNames.end())		{			_isOpen = false;			if (itr->index == _selected)				DrawItem(CursorPosition, console, itr, true);			else				DrawItem(CursorPosition, console, itr, false);			CursorPosition.Y += 2;			++itr;		}	}}
开发者ID:GolanSabo,项目名称:Shenkar,代码行数:36,


示例4: VisibleLength

/*bool TLView::ItemPosOnScreen(TLItem* item){}*/long TLView::DrawTrack(wxDC& dc, long yoffset, TLTrack* track){	gg_tl_dat start, end, delta_start;	for ( TLItemList::Node *node = track->GetFirst(); node; node = node->GetNext() ) {		TLItem *current = node->GetData();		if ( !ItemVisible( current ) )			continue;		start = current->GetPosition() - m_PositionVisible;		delta_start = 0;		if ( start < 0 ) {			delta_start = start;			start = 0;		}		end = current->GetEndPosition() - m_PositionVisible;		if ( end > VisibleLength() )			end = VisibleLength();		long left       = (long) ( start /  GetRealZoom() ) + VIEW_LEFT_BORDER;		long delta_left = (long) ( delta_start / GetRealZoom() );		long top        = yoffset - m_YscrollPosition;		long width      = (long) ( ( end - start ) /  GetRealZoom() );		long height     = track->GetHeight();		DrawItem( dc, current, left, delta_left, top, width, height );		for ( int i = 1; i < current->GetExtended(); i++ ) {			DrawItem( dc, current, ( ( current->GetPosition() - m_PositionVisible ) / GetRealZoom() ) + VIEW_LEFT_BORDER + ( i * ( current->GetLen() / GetRealZoom() ) ), 0, top, ( current->GetLen() / GetRealZoom() ), height );		}	}	return yoffset + track->GetHeight() + m_TrackDrawDist;}
开发者ID:oracle2025,项目名称:ggseq,代码行数:33,


示例5: TEXT

void CInformationPanel::CRecordItem::Draw(HDC hdc,const RECT &Rect){	if (m_fRecording) {		TCHAR szText[256];		int Length;		unsigned int RecordSec=(unsigned int)(m_RecordTime/1000);		Length=StdUtil::snprintf(szText,lengthof(szText),			TEXT("● %d:%02d:%02d"),			RecordSec/(60*60),(RecordSec/60)%60,RecordSec%60);		if (m_WroteSize>=0) {			unsigned int Size=				(unsigned int)(m_WroteSize/(ULONGLONG)(1024*1024/100));			Length+=StdUtil::snprintf(szText+Length,lengthof(szText)-Length,									  TEXT(" / %d.%02d MB"),									  Size/100,Size%100);		}		if (m_DiskFreeSpace>=0) {			unsigned int FreeSpace=				(unsigned int)(m_DiskFreeSpace/(ULONGLONG)(1024*1024*1024/100));			StdUtil::snprintf(szText+Length,lengthof(szText)-Length,							  TEXT(" / %d.%02d GB空き"),							  FreeSpace/100,FreeSpace%100);		}		DrawItem(hdc,Rect,szText);	} else {		DrawItem(hdc,Rect,TEXT("■ <
C++ DrawLine函数代码示例
C++ DrawImage函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。