
Signature
kind regards, muechel
while(!sleep())
++sheep;
That's what I want to say, that Afx is in the thread which does not have MFC
support., So, I can not use MessageBox function... I want to ask whether
there is any way of changing caption in AfxMessageBox function or not...
Jigar Mehta
Jigar.Mehta@gmx.net
use MessageBox instead
--
kind regards, muechel
while(!sleep())
++sheep;
Jigar Mehta - 30 Mar 2005 20:25 GMT
At last i have got the answer from one of my friend,, so, i want to share
it with u all...
AfxMessageBox uses this pointer for the caption -
AfxGetApp()->m_pszAppName
So I temporarily change it, I call AfxMessageBox, and then I restore it.
-----------------------------------------------------------
const char lpszTitle[] = "MyTitle";
const char pszMsgBuff[] = "The message";
UINT nMsgBoxStyle = MB_OK;
-----------------------------------------------------------
const char* psz;
psz = AfxGetApp()->m_pszAppName;
AfxGetApp()->m_pszAppName = lpszTitle;
AfxMessageBox(pszMsgBuff, nMsgBoxStyle);
AfxGetApp()->m_pszAppName = psz;
-----------------------------------------------------------