c++ - Direct2D WM_MOUSEMOVE message with scaled display -


i new direct2d programming , have encountered issue wm_mousemove message handling.

as documented in msdn, should use enum handle mouse move, , should use loword & hiword extract current x , y coordinates.

that works fine when working on normal display, when trying run on scaled displays (e.g. 125% in case), values of x , y aren't accurate, in other words, there "indentation" between current position of mouse , values extracted lparam.

i guess should query os or window current scaling can calculate right position, don't know how!

any please?

you can take control of scaling declaring program dpi aware. automatic scaling stop , you'll original coordinates. you'll need scale window though.

creating dpi-aware application


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -