Never ending WM_PAINT loop with ATL CWindowImpl

前提是你 提交于 2019-12-06 11:16:27

My guess is that you are not validating the window in your paint handler.

An application must call BeginPaint and EndPaint in response to WM_PAINT messages, or pass the message to the DefWindowProc function to validate the window. DefWindowProc validates the update region; it can send the WM_ERASEBKGND message if the window background needs to be erased.

This would mean the OS will think the window still needs to be painted, and call you again.

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