可以,但是要进行类型转换
((CYourMainFrame *)AfxGetApp()->m_pMainFrame)->m_statBar...
并且要在调用该语句的.cpp文件中包括主框架的头文件
#include "YourMainFrame.h"