I got the game to work now (using UndelphiX in Delphi 5), but the Steam overlay doesn't appear (probably because it uses DirectX 7), achievements are shown after ending the game.

Would a game be allowed on Steam if the overlay doesn't work? (Are there other games that don't have the steam overlay?)

I tried adding an OpenGL layer. That works, but it is always UNDER the game and is invisible (if I make the game window smaller, I see it on the sides). Anyone know a way to get something in front of a UndelphiX DXDraw?