How can I use the AnimateWindow function on a separate thread?

佐手、 提交于 2019-12-02 11:51:32
Joel Lucsy

If both windows were created by the same thread, then the AnimateWindow function will run on that thread. According to the MSDN documentation:

The function will fail in the following situations:

  • If the thread does not own the window. Note that, in this case, AnimateWindow fails but GetLastError returns ERROR_SUCCESS.

There is no way around this other than creating the second window on a separate thread. Additionally, you will have to call the AnimateWindow function from the thread that each window was created on.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!