|
-
October 12th, 2003, 04:33 PM
#1
easy question about MessageBox()
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|