long CDDBaseGrid::QuickGetParam(int col, long row) { CUGCell cell; this->GetCell(col, row, &cell); return cell.GetParam(); }
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); } } } }