本文主要是介绍wxWidgets禁止刷新窗口,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
wxWidgets中提供wxWindowUpdateLocker来禁止重绘wxWindow,代码如下:
void MyFrame::Foo()
{
m_text = new wxTextCtrl(this, ...);
wxWindowUpdateLocker noUpdates(m_text);
m_text->AppendText();
... many other operations with m_text...
m_text->WriteText();
}
Using this class is easier and safer than calling Freeze and Thaw because you don't risk to forget calling the latter.
这篇关于wxWidgets禁止刷新窗口的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!