void Maze::readFromFile(std::ifstream &f) { for (int i = 0; i < size; i++) { for(int j = 0; j < size; j++) { f >> maze[i][j]; } } x = getStartRow(); y = getStartCol(); startRow = getStartRow(); startCol = getStartCol(); endRow = getEndRow(); endCol = getEndCol(); }
LRESULT ListCtrl::onKeyDown( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled ) { if (getScrollBar(SB_VERT) != NULL) { LONG nHeight = 0; LONG nTotal = getEndRow() + 1; LONG nPos = 0; for (LONG n = 0; n < nTotal; n++) { nPos += getRowHeight(n); } getScrollBar(SB_VERT)->setPos(nPos); BOOL bh; getScrollBar(SB_VERT)->onSize(0, 0, 0, bh); } return 1; }
LRESULT ListCtrl::ongetProperties( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled ) { switch(wParam) { case LCP_START_ROW: return getStartRow(); case LCP_END_ROW: return getEndRow(); case LCP_START_COL: return getStartCol(); case LCP_END_COL: return getEndCol(); case LCP_ROWNUM_WIDTH: return getRowNumBarWidth(); default: return 0; } }