Wait...does it say you have 7GB remaining or 7GB total? If you have 7gb remaining you are ok, you just need to remove a lot of stuff (or just reinstall windows).
However, if it basically says you have only a 7gb hard drive, you have a bigger problem. Either:
1) You just partitioned it into many partitions, and the other ones are just not formatted. How did you partition the drive?
2) Your BIOS is too old for a 40gb hard drive. How old is your computer? If it came with winXP, it is not that old.

If it is too old, you will need to either get a new IDE controller card, use a software bios thingy, or use a different operating system that can get around the bios limitation
3) Something is just WRONG with your partition table. If you know #1 is not true and your comptuer is too new for #2, this is problably the problem. In this case, a simple filesystem re-creation (I believe that's what they call a high-level format) will not do anything. You will need to repartition the drive from scratch.
Have fun.
~psi42