Visual studio wont work with “MoveTo” (win32api)

前端 未结 1 937
我在风中等你
我在风中等你 2021-01-29 08:34

Here\'s the code below, VS said that on line 109 ( MoveTo(hdc, x, y);
\"MoveTo\" is undefined.

Can someone explain me what\'s wrong ? Th

相关标签:
1条回答
  • 2021-01-29 09:15

    MoveTo() is a Windows 3.x function that is no longer supported. Use MoveToEx() instead, setting the last argument to NULL. You can define your own MoveTo() to do that, eg:

    #define MoveTo(hdc, x, y) ((void)MoveToEx(hdc, x, y, NULL))
    

    Or:

    inline void MoveTo(HDC hdc, int X, int Y) { MoveToEx(hdc, X, Y, NULL); }
    
    0 讨论(0)
提交回复
热议问题