MessageBox在公共种的静态函数里为什么不能用

MessageBox在公共类的静态函数里为什么不能用?
我MFC里建了个MFC类 目的是放些 静态变量 静态函数什么的,可是这个read函数有错误,我找不出在哪,反正程序总是终止,还有一个MessageBox为什么说“非静态成员引用必须与特定对象相对啊”

void CPublic::read(char* local)
{
MessageBox((CString)"OK");
//LPCTSTR   str1=(LPCTSTR)(LPTSTR)local;
CPublic::str.Empty();
CStdioFile myFile; 
CFileException fileException; 
if(myFile.Open((LPCTSTR)local,CFile::typeText|CFile::modeReadWrite))

myFile.SeekToBegin(); 
myFile.ReadString(CPublic::str); 


myFile.Close();

}

------解决方案--------------------
::MessageBox(NULL,(CString)"OK","",MB_OK);
------解决方案--------------------
AfxMessageBox(_T("OK!"));
------解决方案--------------------
::MessageBox((CString)"OK");
这样试试
你在debug模式下。运行,看看终止的时候.call stack停在哪里,哪里就有可能是错误的地方
------解决方案--------------------
把双冒号打出来,好好看看API的结构吧。楼上兄弟都说了。