[OpenGL / Windows GDI] GetDeviceCaps() and DPI-Awareness

Hi There,

in order to develop DPI-Aware applications, it is necessary for the SimpleOpenGLControl to acquire the current DPI setting and store it in a protected variable or public property.

Under Windows, getting the DPI setting can be accomplished using GDI's GetDeviceCaps() method:

http://msdn2.microsoft.com/en-us/library/ms533266(VS.85).aspx

Unfortunately, it seems this method is not yet available in the framework.

Are you planning to add this method to the framework? Is there perhaps another way to acquire DPI-Settings?

Thanks,

Christoph Menge

Tao just implements the

Tao just implements the parts of GDI that are required to get OpenGL running properly, so probably no one needed this one so far. I took the liberty of adding GetDeviceCaps() to SVN. You can get it straight from SVN or download the snapshot tomorrow (it's rebuild once every 24h).

Hi SeaEagle, thanks a lot! I

Hi SeaEagle,

thanks a lot! I just added the functionality I needed with your modifications!

I also modified the SimpleOpenGLControl, because I think the overhead is very small and the implementation is straightforward. Can I send my modifications to you for review so you can commit them? I think DPI-Awareness will be an issue in the not so far future...

Thanks again,

Chris

Please! You can send it to

Please! You can send it to 'seaeagle1 @t users.sourceforge.net' or post it online somewhere and I'll have a look at it.

Theme by La Boite a site | Powered by Drupal