Vs2012下Win32简单画线功能实现
本文章为个人见解,存在错误或解释不清之处还请大家批评、讲解,谢谢!
环境:
vs2012下新建“win32项目”,创建过程默认即可,创建之后就是可运行的简单窗口界面。
(创建初始界面)
画线
MoveToEx()
LineTo()
1、MoveToe函数原型
BOOL MoveToEx(
HDC hdc, // handle to device context
int X, // x-coordinate of new current position
int Y, // y-coordinate of new current position
LPPOINT lpPoint // pointer to old current position
);
Parameters
hdc
Handle to a device context.
X
Specifies the x-coordinate of the new position, in logical units.
Y
Specifies the y-coordinat

本文介绍了如何在VS2012下使用Win32 API实现简单的画线功能,通过MoveToEx和LineTo函数原型,结合鼠标事件(LBUTTONDOWN和LBUTTONUP)来绘制从起点到终点的线条。
最低0.47元/天 解锁文章
1305

被折叠的 条评论
为什么被折叠?



