I' writing a screen capturing application. The screen is captured using Direct3d 9 API and the output media file is written using Windows Media Foundation h264 codec.
The app must work on all Windows versions starting from 7. Therefore, d3d9 API was chosen.
Image is captured using GetFrontBufferData() method.
Everything works fine, except that NO mouse cursor is captured.
How can I fix this?
This is to be expected (the cursor isn't rendered into the display surface referenced in the call to GetFrontBufferData
). You have to do the composition manually:
HDC
is not feasible you could also manually write the cursor info into the front buffer (tedios, but not exactly complicated either).