When using CachedBitmaps
in GDIPlus, there is graphical corruption if Windows video "Hardware Acceleration" is lowered too much - such that DirectDraw is disabled:
There are six levels of hardware acceleration:
If DirectDraw is disabled, then using DrawCachedBitmap
in GDI+ will result in graphical corruption. It's easy enough for me to use the slower DrawImage()
API if DirectDraw is not enabled - but i have to be able to detect that DirectDraw is disabled.
How can i programatically check if DirectDraw is enabled?
The question is: How does dxdiag do this:
KB191660 - DirectDraw or Direct3D option is unavailable (archive)
If you download the latest DirectX SDK (I'm sure older sdk's have similar examples) there is an example of querying DXDIAG info.
The example is located at (SDK Root)\Samples\C++\Misc\DxDiagReport
In dxdiaginfo.cpp methods of note
CDxDiagInfo::CDxDiagInfo
CDxDiagInfo::Init
CDxDiagInfo::QueryDxDiagViaDll
CDxDiagInfo::GetDisplayInfo
If you run the program it ouputs a giant list of values. I think the value you're interested in is pDisplayInfo->m_szDDStatusEnglish
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With