这篇教程C++ DrawItem函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中DrawItem函数的典型用法代码示例。如果您正苦于以下问题:C++ DrawItem函数的具体用法?C++ DrawItem怎么用?C++ DrawItem使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了DrawItem函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: ItemsRectvoid 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: PaintTopRowstatic 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: TEXTvoid 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函数代码示例
|