如题~    需要给出源代码~ 

解决方案 »

  1.   

    void CtestView::OnMouseMove(UINT nFlags, CPoint point)
    {
    ofstream txt("yyy.txt"); 
    CString   str1,str2; 
    str1.Format( "%d ",point.x);
    str2.Format( "%d ",point.y);txt.write(str1,strlen(str1));
    txt.write(str2,strlen(str2));}
      

  2.   

    vector<POINT> vec;
    WM_MOUSEMOVE消息响应函数中采样保存坐标值到vector中,需要的时候格式化为字符串然后CFile::Write写入文件中。
      

  3.   

    void CtestView::OnMouseMove(UINT nFlags, CPoint point)
    {
    ofstream txt("yyy.txt");  
    CString str1,str2;  
    str1.Format( "%d ",point.x);
    str2.Format( "%d ",point.y);txt.write(str1,strlen(str1));
    txt.write(str2,strlen(str2));}
    这段代码我没有调试过,可能有问题vector<POINT> vec;
    WM_MOUSEMOVE消息响应函数中采样保存坐标值到vector中,需要的时候格式化为字符串然后CFile::Write写入文件中。
    这个可借鉴,采样代码是需要的