Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经开发了一个应用程序,它的用户界面像下面的图片,
原图
现在我打开控制面板窗口覆盖应用程序窗口,如下图,
封面图片
当我关闭控制面板窗口时,
关闭控制面板窗口
使用 DrawText/TextOut 函数绘制的文本,
将被抹去,
我如何确定情况,何时删除文本....
这意味着您的 DrawText 和其他绘画功能写错了地方。您必须在 OnPaint 或 OnEraseBkgnd 中执行此操作,以便它们始终被绘制(当其他窗口重叠时,在调整大小等时)。
此外,您必须确保正确创建 (CreateDC) 和释放每个对象的设备上下文 (ReleaseDC)。