In a
C++
program using
MFC
you may use either the
Windows API
function
MessageBox[
^] or the
MFC
method
CWnd::MessageBox[
^].
The former takes four parameters, the latter may take three, two or just one parameter (because it has two optional parameters).
In your dialog application you are probably using the dialog's method (
CDialog
inherits from
CWnd
) while in your
SDI
application you are using the
Windows API
function (you are calling it from global scope, that is not in a
CWnd
-derived object method).