hi gang, this question seems simple but i don't know what is happening.

when i run the following line of code to bring up an error message box:

MessageBox(error_string, _T("Error"), MB_ICONEXCLAMATION | MB_OK);

it works if i do it inside a class derived from CDialog.

however, if i make the same call in a regular function (not inside of a class or anything) i get the following error:

error C2660: 'MessageBoxA' : function does not take 3 parameters


so i thought that maybe CDialog had access to a special version of MessageBox(). so instead of calling simply MessageBox() i called CDialog::MessageBox() in my regular function. i get this error message instead:

error C2352: 'CWnd::MessageBoxA' : illegal call of non-static member function

how do i get around this? thanx -kel