佚名通过本文主要向大家介绍了mfc模块,模块mfc100u.dll,故障模块mfc42.dll,模块mfc71.dll,mfc添加状态栏等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: MFC的模块状态切换后,如何切换回去
描述:
解决方案1:
描述:
切换模块状态 AFX_MANAGE_STATE(AfxGetStaticModuleState());
我用完了,想切换回去,怎么做哈
解决方案1:
当前函数调用结束后原模块的状态自动被恢复。可以考虑把代码放在一个单独的函数里。
解决方案2: MSDN:
When this macro is invoked, pModuleState is the effective module state for the remainder of the immediate containing scope. Upon leaving the scope, the previous effective module state will be automatically restored.
也就是说这玩样在其声明周期结束的时候,状态自动还原。是两个{}之间吧