AfxMessageBox is an MFC function. In a non-MFC app, use the MessageBox API function. Thank you for your help. What about GetFileSize () ? Can you post that as a separate question please? That way the QA thread will remain lucid and associated with a single topic for anyone searching for the same thing in future. Thanks.
In addition, The AfxMessageBox()function is overloaded with two versions whose syntaxes are: int AfxMessageBox(LPCTSTR lpszText, UINT nType= MB_OK, UINT nIDHelp= 0); int AFXAPI AfxMessageBox(UINT nIDPrompt, UINT nType= MB_OK, UINT nIDHelp= (UINT) -1); Based on the above functions, a message box can be illustrated as follows: Additionally, Although this function is global, its scope is limited to MFC applications. This means that you can use the Win32's global MessageBox()function with any compiler used on the Microsoft Windows operating systems but you cannot use the MFC's global AfxMessageBox()function with any compiler other Visual C++. Next, MessageBox function (winuser.h) 12/05/2018; 7 minutes to read; In this article. Displays a modal dialog box that contains a system icon, a set of buttons, and a brief application-specific message, such as status or error information. The message box returns an integer value that indicates which button the user clicked. Syntax In this manner, The message box returns an integer value that indicates which button the user clicked.
2 Similar Question Found
What does afxmessagebox ( ) do for a message box?
If you create a message box using the AfxMessageBox () function, it allows you to specify only one argument, namely the text to display to the user, which is the value of the Text argument. In this case, the title bar of the message box would display the name of the application that "owns" the message box.
Is the afxmessagebox function global in mfc?
To still make it easier, the MFC framework provides the AfxMessageBox function used to create a message box. Although this function is global, its scope is limited to MFC applications.
This website uses cookies or similar technologies, to enhance your browsing experience and provide personalized recommendations. By continuing to use our website, you agree to our Privacy Policy