I would like to know the difference between AfxMessageBox and
MessageBox in VC++ 6.0 version.
which one should I use?
I am a newbie in VC.
Pls advise me!
Thank you very much.'
cheers,
Alan
MessageBox() is provided by Win32 itself and is meant to be called from just
about anything in any language that knows what an exported function in a DLL
is.
AfxMessageBox() is a function in the Microsoft Foundation Class (MFC)
library that comes with MS' C++ compiler.
> which one should I use?
Whichever one you want. :-)
Regards,
Will
The other thing that is cool about AfxMessageBox() is that it sticks in the
application name automatically in the message box's caption. And if you
don't like the default behavior, you can just override CWinApp::DoMessageBox
and customize it to your heart's desire.
Like Will says, the choice is completely yours as to which to use -- as long
as you are writing an MFC app. FWIW, I've found AfxMB more useful in most
situations.
Regards,
Mike
"William DePalo [MVP VC++ ]" <willd....@mvps.org> wrote in message
news:eQliXGBC...@TK2MSFTNGP12.phx.gbl...
"alan" <cheung...@i-cable.com>
??????:7bd5ab13.03042...@posting.google.com...
All these responses ignore CWnd::MessageBox, whose different from
AfxMessageBox isn't as clear....
--
Truth,
James Curran
www.noveltheory.com (personal)
www.njtheater.com (professional)
CWnd::MessageBox simply calls ::MessageBox, after supplying one or two
defaults (the HWND and the caption, unless a caption was passed-in).
-cd