get available pixelformats?!!

how to check what pixelformats are supported in hardware so I can use the best??

ChoosePixelFormat() selects the best format for you. You don’t need to know anything about the pixel formats. only call this function and it selects the best format :wink:

ChoosePixelFormat is sufficient for most cases, but it is really not perfect.
It has bugs, ignores some flags, and doesn’t match the format nearest to your request in some cases.
For better matching you can enumerate all available formats manually with DescribePixelFormat and select the one which matches your requirements best.
To check which are accelerated by hardware, you need to evaluate the dwFlags field and look for the “accelerated” bits.
For special formats you need to use this extension
which matches formats more exactly than Microsoft’s ChoosePixelFormat.