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.
Comments
Post a Comment