2 main points to make here.
Read the tutorials in the proper section (where you should have posted this also: Movies Divx, Dvd Ripping, etc.) and what resolution did you pick in TMPGEnc as your source? It should be for DivX copies (vga 1:1) or something like that. This will give you the same aspect ratio as your DivX movie, but also make sure if it is PAL to have the output come out to 352x288 & if NTSC 352x240. Probably easier if you just choose templates to set things, but you still have to change the settings of the video source.
Good luck.