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