For how to build and install DXGL via source consult https://www.williamfeely.info/wiki/DXGL.
Run your program after copying ddraw.dll into the directory where it is located.
If there is an error about missing files, or it does not start at all, make sure you are in the directory where it was installed and that you have installed the Visual C++ 2010 32-bit runtimes.
In case of failure, try adjusting settings by running dxglcfg.exe
If you have more questions, please contact us at admin@www.williamfeely.info.