yoby - this warning usually says something like "no directx 9 blah blah was found"
This invariably means you need to update your video card driver or update your video card, you are most likely using the Microsoft reference driver - and this seems to be at least several months out of date for supporting 3D games, mostly it won't work at all for a true 3D game like The Sims 2.
Naturally, the driver is the cheaper way to go and usually corrects most issues of this kind. See this thread for a list of links for the most common video card drivers:
General Help for Windows and Games