Setting icon at the title bar of wxMessageBox Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
aishwarya
Experienced Solver
Experienced Solver
Posts: 66
Joined: Tue Oct 04, 2011 1:13 pm

Setting icon at the title bar of wxMessageBox

Post by aishwarya » Fri Nov 11, 2011 5:57 am

Hi,

I need my wxMessageBox to contain icon set at its title bar ,just like SetIcon is available for wxFrame.

Is there a way to set it?

User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2254
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania
Contact:

Re: Setting icon at the title bar of wxMessageBox

Post by evstevemd » Fri Nov 11, 2011 6:21 am

That is not possible. Maybe try wxMessageDialog and use SetIcon
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 19.04/Windows 10 Pro/MacOS 10.13 - GCC/MinGW/Clang, CodeLite IDE]

DerKleineNik
Knows some wx things
Knows some wx things
Posts: 29
Joined: Fri Sep 09, 2011 9:59 am

Re: Setting icon at the title bar of wxMessageBox

Post by DerKleineNik » Fri Nov 11, 2011 6:29 am

Just have a look at this helppage to wxMessageBox:

http://docs.wxwidgets.org/stable/wx_dia ... messagebox

You can choose between
wxICON_EXCLAMATION Shows an exclamation mark icon.
wxICON_HAND Shows an error icon.
wxICON_ERROR Shows an error icon - the same as wxICON_HAND.
wxICON_QUESTION Shows a question mark icon.
wxICON_INFORMATION Shows an information (i) icon.

I hope this is what you wanted

User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2254
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania
Contact:

Re: Setting icon at the title bar of wxMessageBox

Post by evstevemd » Fri Nov 11, 2011 6:32 am

DerKleineNik wrote:Just have a look at this helppage to wxMessageBox:

http://docs.wxwidgets.org/stable/wx_dia ... messagebox

You can choose between
wxICON_EXCLAMATION Shows an exclamation mark icon.
wxICON_HAND Shows an error icon.
wxICON_ERROR Shows an error icon - the same as wxICON_HAND.
wxICON_QUESTION Shows a question mark icon.
wxICON_INFORMATION Shows an information (i) icon.

I hope this is what you wanted
He is asking Icon on titlebar not what you are talking about!
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 19.04/Windows 10 Pro/MacOS 10.13 - GCC/MinGW/Clang, CodeLite IDE]

aishwarya
Experienced Solver
Experienced Solver
Posts: 66
Joined: Tue Oct 04, 2011 1:13 pm

Re: Setting icon at the title bar of wxMessageBox

Post by aishwarya » Mon Nov 14, 2011 5:35 am

Thank a lot wxMessageDialog solves my issue.

Post Reply