[英]Is it possible/necessary to have call to OnDraw in separate thread [MFC]
This is a MFC Doc/View application: 这是MFC Doc / View应用程序:
Is it possible/necessary to have call to OnDraw in separate thread of execution, ie worker thread? 是否有可能/必须在单独的执行线程(即工作线程)中调用OnDraw? In the software we building we have enormous problem with view in Doc/View application. 在我们构建的软件中,Doc / View应用程序中的视图存在巨大的问题。 That is, every time the view is scrolled the processing of this takes such long time that the application freezes. 也就是说,每次滚动视图时,处理时间都非常长,以至于应用程序冻结。
The bitmaps that need to be processed are rather large (over 1GB on average) 需要处理的位图相当大(平均超过1GB)
Thank you. 谢谢。
As specifically asked, the answer is "no". 如明确要求的那样,答案是“否”。 OnDraw must be called in the context of the main GUI thread. 必须在主GUI线程的上下文中调用OnDraw。 What you could do, is: 您可以做的是:
(But splitting the gigantic bitmap into pieces would be a better idea.) (但是将巨大的位图分成几块是一个更好的主意。)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.