Original Post
I'm working on a level editor in c++ for my new 2d tile-based RPG. I've gotten to the part where I'm testing my child windows (one displays the map, the other displays the selectable tiles) by drawing bitmaps on them. I've added a vertical scrollbar to the tile selector window, and a horizontal and vertical one to the map viewer window. I thought that whenever the tiles being drawn rendered past the window boundaries, the scrollbar would let me view the bitmaps that went off. The scrollbars do nothing though. They are there but when I click and drag them, they snap back to their original spot and the window stays where it was. Here's an example. I want the scrollbar to let me see the rest of the 15 freakin tiles I drew. I don't know how to make the scrollbar let me scroll past the boundaries of the window. Please help!
// Tile selector window client area is 600 pixels high
void fnTileWndPaint(HDC hDC){ // Sandwiched between BeginPaint() and EndPaint()
RECT rc;
int xPos, yPos;
GetClientRect(hTileWnd, &rc);
xPos = (rc.right / 2) - 16; // centers the tiles (32 x 32)
yPos = 16; // looks like a good spot to start the tiles off at
for(int i = 0; i < 25; i++){ // for testing purposes
pBitmap[0]->fnDraw(hDC, xPos, yPos); // Don't worry, this function works. It's part of my cBitmap class. It just draws the bitmap to a Device context and then to an x y position
yPos += 64; // Just moves the next tile down
}
}