这篇教程C++ GetCount函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GetCount函数的典型用法代码示例。如果您正苦于以下问题:C++ GetCount函数的具体用法?C++ GetCount怎么用?C++ GetCount使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GetCount函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: whilevoid CheckPointListBox::DeleteAllItems() { while (GetCount() > 0) { DeleteString(0); }}
开发者ID:Echo-M,项目名称:producingManagementAK47,代码行数:5,
示例2: IsEmptybool CCQuestNPCQueue::IsEmpty(){ if ((m_Queue.empty()) || (m_nCursor >= GetCount())) return true; return false;}
开发者ID:Kallontz,项目名称:gunz-the-tps-mmorpg,代码行数:5,
示例3: Enable// Enable all subcontrolsbool wxRadioBox::Enable(bool enable){ for(int i=0; i<GetCount(); i++) Enable(i, enable); return true;}
开发者ID:gitrider,项目名称:wxsj2,代码行数:7,
示例4: GetCountint wxRadioBoxBase::GetNextItem(int item, wxDirection dir, long style) const{ const int itemStart = item; int count = GetCount(), numCols = GetColumnCount(), numRows = GetRowCount(); bool horz = (style & wxRA_SPECIFY_COLS) != 0; do { switch ( dir ) { case wxUP: if ( horz ) { item -= numCols; } else // vertical layout { if ( !item-- ) item = count - 1; } break; case wxLEFT: if ( horz ) { if ( !item-- ) item = count - 1; } else // vertical layout { item -= numRows; } break; case wxDOWN: if ( horz ) { item += numCols; } else // vertical layout { if ( ++item == count ) item = 0; } break; case wxRIGHT: if ( horz ) { if ( ++item == count ) item = 0; } else // vertical layout { item += numRows; } break; default: wxFAIL_MSG( wxT("unexpected wxDirection value") ); return wxNOT_FOUND; } // ensure that the item is in range [0..count) if ( item < 0 ) { // first map the item to the one in the same column but in the last // row item += count; // now there are 2 cases: either it is the first item of the last // row in which case we need to wrap again and get to the last item // or we can just go to the previous item if ( item % (horz ? numCols : numRows) ) item--; else item = count - 1; } else if ( item >= count ) { // same logic as above item -= count; // ... except that we need to check if this is not the last item, // not the first one if ( (item + 1) % (horz ? numCols : numRows) ) item++; else item = 0; } wxASSERT_MSG( item < count && item >= 0, wxT("logic error in wxRadioBox::GetNextItem()") ); } // we shouldn't select the non-active items, continue looking for a // visible and shown one unless we came back to the item we started from in//.........这里部分代码省略.........
开发者ID:BauerBox,项目名称:wxWidgets,代码行数:101,
示例5: AdjustDisplayRectangleint COXListPopup::Pick(CRect rect, CRect rectParent){ AdjustDisplayRectangle(rect, rectParent); MoveWindow(rect); ShowWindow(SW_SHOWNA); SetCapture(); // init message loop bool bBreak = false; int iReturnItemIdx = -1; while (!bBreak) { MSG msg; VERIFY(::GetMessage(&msg, NULL, 0, 0)); if (msg.message == WM_LBUTTONUP) { // Get the item under the mouse cursor int xPos = GET_X_LPARAM(msg.lParam); int yPos = GET_Y_LPARAM(msg.lParam); BOOL bOutside; UINT nIndex = ItemFromPoint(CPoint(xPos, yPos), bOutside); if (!bOutside) iReturnItemIdx = (int) nIndex; bBreak = true; } else if (msg.message == WM_KEYDOWN) { // Handle ESCAPE, UP, DOWN and ENTER if (msg.wParam == VK_ESCAPE) bBreak = true; else if (msg.wParam == VK_UP) { int iSel = GetCurSel(); if (iSel == -1 || iSel == 0) SetCurSel(0); else SetCurSel(iSel - 1); } else if (msg.wParam == VK_DOWN) { // Move the selection 1 item down int iSel = GetCurSel(); if (iSel == -1) SetCurSel(0); else if (iSel == GetCount() - 1) { // Do nothing } else SetCurSel(iSel + 1); } else if (msg.wParam == VK_RETURN) { iReturnItemIdx = GetCurSel(); bBreak = true; } } else if (msg.message == WM_LBUTTONDOWN) { // Do nothing } else if (msg.message == WM_MOUSEMOVE) { // Select the item under the mouse cursor int xPos = GET_X_LPARAM(msg.lParam); int yPos = GET_Y_LPARAM(msg.lParam); BOOL bOutside; UINT nIndex = ItemFromPoint(CPoint(xPos, yPos), bOutside); if (!bOutside) SetCurSel((int) nIndex); } else { DispatchMessage(&msg); } } ReleaseCapture(); ShowWindow(SW_HIDE); return iReturnItemIdx;}
开发者ID:Spritutu,项目名称:AiPI-1,代码行数:85,
|