Document wxRendererNative::DrawTitleBarBitmap() and use it properly.

Comment and document the (non obvious) requirement for the PNG image handler
to be enabled when using this function under OS X. In fact, document the
entire function itself which was forgotten previously.

Do enable PNG image handler when using DrawTitleBarBitmap() in the sample.

Closes #11345.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-10-19 08:59:25 +00:00
parent eac789b529
commit 3427bc784e
3 changed files with 52 additions and 5 deletions

View File

@@ -35,6 +35,7 @@
#include "wx/log.h"
#include "wx/msgdlg.h"
#include "wx/icon.h"
#include "wx/image.h"
#endif
#include "wx/apptrait.h"
@@ -297,6 +298,13 @@ bool MyApp::OnInit()
if ( !wxApp::OnInit() )
return false;
#ifdef __WXOSX__
// currently the images used by DrawTitleBarBitmap() are hard coded as PNG
// images inside the library itself so we need to enable PNG support to use
// this function
wxImage::AddHandler(new wxPNGHandler);
#endif // OS X
// create the main application window
new MyFrame;