i want to add some features to MessageBox. does anybody know where the function is defined? i need it to model my own messagebox from it.
IIRC, MessageBox is a Windows OS function call.
MFC has a wrapper function around this call, to pass some parameters to it by default, if you don't specify them explicitly, but other than that, there's not much more you can do to it. The function was designed to provide a consistent set of message boxes.
If you want to make your own message box, you're probably better off making your own Dialog window and displaying it.
Within MFC, MessageBox is a method of the CWnd class.
The same functionality is found in a global function, AfxMessageBox.