If you need to use Device Contexts on every frame, you could do as follows:
1. Modify GapiApplication so you call CGapiDisplay::CreateOffscreenDisplay instead of CGapiDisplay::OpenDisplay. This means that your backbuffer will be stored as a Device Context DIB image. You then blit the backbuffer to the display using DC BitBlt instead of CGapiDisplay::Flip.
2. Modify the code inside CGapiSurface (assuming you have a GapiDraw source code license) so that each surface memory is allocated as a DC DIB image instead of just a memory block. You can then change the GetDC function of CGapiSurface so that it then just returns the handle to the DIB image that the surface represents.
All this is fairly simple to implement and could probably be done within an hour or so, assuming you have access to a source code license. The results would be a slightly slower final blit to the screen (since DC is used instead of DirectDraw) but all GetDC operations would be done with zero overhead.