void CDDBaseGrid::QuickSetParam(int col, long row, long paramval) { CUGCell cell; this->GetCell(col, row, &cell); cell.SetParam(paramval); this->SetCell(col, row, &cell); }
VOID CALLBACK EXPORT CUGMarqueeType::TimerProc( HWND hwnd, // handle to window UINT uMsg, // WM_TIMER message unsigned int idEvent, // timer identifier DWORD dwTime // current system time ) #endif { UNREFERENCED_PARAMETER(dwTime); UNREFERENCED_PARAMETER(uMsg); CUGCtrl* ctrl = (CUGCtrl*)CWnd::FromHandle(hwnd); //check for errors if(ctrl == NULL) return; //check to see if any CUGMarqueeType cells are visible //if so then mark them for redraw int leftCol = ctrl->GetLeftCol(); int rightCol = ctrl->GetRightCol(); long topRow = ctrl->GetTopRow(); long bottomRow = ctrl->GetBottomRow(); CUGCell cell; for(long rows = topRow; rows <= bottomRow; rows++){ for(int cols = leftCol; cols <= rightCol; cols++){ ctrl->GetCell(cols,rows,&cell); if(cell.GetCellType() == (int)idEvent){ //run other windows messages first //update the position for the next time the cell is drawn cell.SetParam(cell.GetParam() +1); ctrl->SetCell(cols,rows,&cell); RECT rect; ctrl->GetCellRect(cols,rows,&rect); ctrl->m_CUGGrid->m_drawHint.AddHint(cols,rows,cols,rows); if(ctrl->GetCurrentRow() != rows || ctrl->GetCurrentCol() != cols) ctrl->TempDisableFocusRect(); ctrl->m_CUGGrid->PaintDrawHintsNow(&rect); } } } }
void CNPBPSType1Grid::filter() { try { CMenu *pMnenu; pMnenu= GetPopupMenu(); if ( CNPBPSType1Grid::insertFilterFlag==0) { addItemToCombobox(); CNPBPSType1Grid::insertFilterFlag=1; InsertRow(0); for (int col_count=0;col_count<13;col_count++) { CUGCell cell; int row=0; int col=col_count; cell.ClearAll(); cell.SetCellType(UGCT_DROPLIST); cell.SetCellTypeEx(UGCT_DROPLISTHIDEBUTTON); cell.SetParam(CELLTYPE_IS_EDITABLE); QuickSetRange(col,row,col,row,&cell); QuickSetLabelText(col,row,str[col_count]); } pMnenu->CheckMenuItem(2001,MF_CHECKED); } else { DeleteRow(0); CNPBPSType1Grid::insertFilterFlag=0; pMnenu->CheckMenuItem(2001,MF_UNCHECKED); } RedrawAll(); } catch(_com_error & ce) { AfxMessageBox(ce.Description()+L" filter"); } }