开发者

How does the LPtoDP function work?

开发者 https://www.devze.com 2023-01-01 09:36 出处:网络
I have a book about programmin开发者_开发百科g under Windows, and the author uses a function called LPtoDP (MSDN).

I have a book about programmin开发者_开发百科g under Windows, and the author uses a function called LPtoDP (MSDN).

But I can't see the difference between code that uses this function and code that doesn't.

I use this function in this way, which seems to me to be a proper way.

POINT po;
po.x = -50;
po.y = 100;
pDC->LPtoDP(&po);
pDC->LineTo(po);

PS: First question on SO.


The difference becomes apparent when there is mapping mode set.

For example, as a result of viewport (scroll). Read about mapping modes here: http://wvware.sourceforge.net/caolan/mapmode.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号