• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 171
  • Last Modified:

MessageBox

Can you give me an example on how to show a message box with the error symbol on it?

And also provide the other symbols.  Thanks.
0
Nitro187
Asked:
Nitro187
  • 3
  • 2
1 Solution
 
akalmaniCommented:
Hope this helps u out ?
use the function of CWnd
int MessageBox( LPCTSTR lpszText, LPCTSTR lpszCaption = NULL, UINT nType = MB_OK );
 
In the type u can specify MB_ICONHAND, MB_ICONSTOP,  MB_ICONERROR for a cross mark in the error message .
MB_ICONQUESTION for a question mark in the error message.
MB_ICONEXCLAMATION and MB_ICONWARNING for a excalmatory mark and
MB_ICONASTERISK and MB_ICONINFORMATION for a question asterik.
many more styles are possible refer for messagebox styles help in msdn

Eg: MessageBox("My Error Message","Error message",MB_OK);
0
 
Nitro187Author Commented:
Cool, it worked great,  answer the question now, so I can accept  :)


0
 
sunrajCommented:
MessageBox("Message","Notify",MB_OK|MB_ICONERROR);
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
Nitro187Author Commented:
akalmani already answered the question,  i'm waiting for him to answer.

Thanks anyway...

akalmani,  gonna answer?  :)  
0
 
akalmaniCommented:
One more help i would provide for u is there is also a function
AfxMessageBox("Error Message"); which u can try if necessary
with MessageBox
0
 
Nitro187Author Commented:
Oh, thanks  :)

Well the first one you suggested worked great.  Thanks again.

-Nitro
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now