If you mean moving like side-scrolling then you can try this:
Say for instance your game screen is 300 pixels wide and your
background bitmap 300 pixels wide too. Define a variable (int i for
our purposes) to hold the start of your bitmap (at first this would
be 0). When needed (say the user pushes the right arrow key to
make your hero walk), you incriment the bitmap start int. In your
blit routine you would test to see if(i==0). If so, then blit your
bitmap starting a 0. If not, run a blit 2 instances of your bitmap.
The first will have a Source X of whatever i equals, will have a
width of (300-i) and will have a Destination X of 0. The second will
have a Source X of 0, a width of (300-i) and a Destination X of i.
Here's an example (pseudo) of this if the hero walks 10 pixels to
If this isn't what you're looking for let me know and hopefully I
//look, Ma! Code tags!
blit grass.bmp starting at destinatin 0 with source width of 300
and source starting at 0
blit grass.bmp starting at destination 0 with source width of 290
and source starting at 10
blit grass.bmp starting at destination 290 with source width of
10 and source starting at 0
can explain another method.