Quote: "How can i do that?.."
Basically you just create an array to hold the blocks of the map...
int gMap(Width, Height);
Then you make some kind of interface that you can use to fill in this array with values...
So for example
gMap(x,y) = 1 // 1 = A block of some type
gMap(x,y) = 0 // 0 = An empty space...
An easy way to use the mouse to draw is:
TilePosX = dbMouseX() / TileSize;
TilePosY = dbMouseY() / TileSize;
So if your tiles are 32 pixels in size (32x32)
TilePosX = dbMouseX() / 32;
TilePosY = dbMouseY() / 32;
gMap(TilePosX, TilePosY) = CurrentTile;