mercredi 1 avril 2015

DS_ABSALIGN style to avoid calculations

I have a tablet with a stylus, in normal operation it's easy to draw and figure out where the stylus is since hardware feeds the correct coordinates. Then i rotate the monitor 90 º via ChangeDisplaySettingsEx API, in this situation i have to apply a translation (2nd monitor) + rotation which i'd like to avoid. Then i read about this style DS_ABSALIGN in MSDN:



Indicates that the coordinates of the dialog box are screen coordinates. If this style is not specified, the coordinates are client coordinates.



I'd like to draw to a DC in screen coordinates which is what i'm being feeded, not client coordinates, but defining that style doesn't make any difference.



//unaffected by the style
DrawIcon(hDevCtx, m_Point.x, m_Point.y, LoadCursor(NULL, IDC_ARROW));


Is it there any way to draw an icon in screen coordinates?


edit: finally i had no choice but to do the calculations for every turn so i close the question


Aucun commentaire:

Enregistrer un commentaire