关于LINEDDA的用法!

最近阅读关于蚂蚁线的一些方法,在网上找了一些相关的资料,发现在MFC中,能够利用LINEDDA绘制复杂曲线,通过该函数就能够设计蚂蚁线了。

通过查阅MSDN得到:

BOOL LineDDA(  int nXStart,             // x-coordinate of starting point
         int nYStart,             // y-coordinate of starting point
                int nXEnd,               // x-coordinate of ending point
              int nYEnd,               // y-coordinate of ending point
              LINEDDAPROC lpLineFunc,  // callback function
              LPARAM lpData            // application-defined data);

相应的回调函数: 
VOID CALLBACK LineDDAProc(  int X,          // x-coordinate of point
                 int Y,          // y-coordinate of point
                LPARAM lpData   // application-defined data);
利用回调函数中的两个点的坐标值,能够在屏幕上绘制相应的复杂曲线。
通过调用该函数,在OnTimer函数中,利用计数器可以画出蚂蚁线。



posted on 2012-12-18 10:22  Scorpionss  阅读(385)  评论(0编辑  收藏  举报

导航