I'm writing a program which is essentially a simplified CAD program. It uses a series of the gdi drawing functions (like line/rect/polygon/textout/draw(bitmaps)/etc.) to produce an overall drawing. So when these files are saved to a file, they are in their own format to describe the item to draw (written as a structure with binary data to the file).
I'm looking to be able to convert this drawing into the .dxf and .dwg formats.
How do I do this? I'd like to just use a program which I can give a description of my structures to or somehow inform on how to read/write with my format, and then do the rest for me. But if this isn't possible how else can I do this?