views:

33

answers:

2

I want to subclass wx.Dialog to get a little more functionality than is provided by the wx.MessageDialog class but I would still like to be able to use the native windows icons (ie the ones used in the wx.MessageDialog that can be set by the flags such as wx.ICON_ERROR etc.. )

Is there anyway to access these?

Update:

Thanks to steven for pointing out that this can easily be accomplished with wx.ArtProvider

e.g.

wx.ArtProvider.GetBitmap(wx.ART_ERROR, wx.ART_CMN_DIALOG)
A: 

Not sure how you'd do in in wx, but here's a Microsoft article on how to do it with the native API:

http://msdn.microsoft.com/en-us/magazine/cc188763.aspx

Mark Ransom
Thanks for that...but hopefully a *pre cooked* solution exists, Id rather not have to go coding wrappers for the winapi (as Id imagine that is what I would have to do?)
volting
+1  A: 

This should do the trick:

wx.ArtProvider.GetBitmap(wx.ART_ERROR, wx.ART_CMN_DIALOG)
Steven Sproat
That is definitely a good trick:) (worked once I changed wx.ICON_ERROR to wx.ART_ERROR). Ive come across the ArtProvider class before but for some reason I thought it was GTK only. Just used it to get icons for all my menu items as well -very handy. Thanks!! –
volting
Yup, I've used it to add icons to my menus that don't use standard wx IDs. I noticed how Windows never had icons in their menus so I only do it for GTK (not sure what mac does)
Steven Sproat
whoops I did have ART_ERROR originally but then copied/pasted your ID over :)
Steven Sproat
No worries, Thanks again -
volting
yes your right Iv noticed that two about windows menus, they look pretty though :) so its hard to resist adding them...
volting