http://www.eq2interface.com/forums/s...&highlight=bag
The above thread was a life saver when I was designing my bag window. If you follow thos instructions it should solve your problem of the window not being the right size.
It basically tells you what zonx said, but has some code to look at.
Oh, and what are you looking for in a bag? My mod allows the 32 or however many pixels you want and 6 colums. Is it just the title bar at the top?