// ----------------------------------------------------------------------------
// private classes
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// private classes
// ----------------------------------------------------------------------------
wxImage::AddHandler(new wxPNGHandler);
// create the main application window
MyFrame *frame = new MyFrame(_T("wxSplashScreen sample application"));
wxBitmap bitmap;
wxImage::AddHandler(new wxPNGHandler);
// create the main application window
MyFrame *frame = new MyFrame(_T("wxSplashScreen sample application"));
wxBitmap bitmap;
- if (bitmap.LoadFile(_T("splash.png"), wxBITMAP_TYPE_PNG))
+
+ if (frame->m_isPda)
+ bitmap = wxBitmap(mobile_xpm);
+
+ bool ok = frame->m_isPda
+ ? bitmap.Ok()
+ : bitmap.LoadFile(_T("splash.png"), wxBITMAP_TYPE_PNG);
+
+ if (ok)
{
new wxSplashScreen(bitmap,
wxSPLASH_CENTRE_ON_SCREEN|wxSPLASH_TIMEOUT,
6000, frame, wxID_ANY, wxDefaultPosition, wxDefaultSize,
wxSIMPLE_BORDER|wxSTAY_ON_TOP);
}
{
new wxSplashScreen(bitmap,
wxSPLASH_CENTRE_ON_SCREEN|wxSPLASH_TIMEOUT,
6000, frame, wxID_ANY, wxDefaultPosition, wxDefaultSize,
wxSIMPLE_BORDER|wxSTAY_ON_TOP);
}
MyFrame::MyFrame(const wxString& title)
: wxFrame(NULL, wxID_ANY, title)
{
MyFrame::MyFrame(const wxString& title)
: wxFrame(NULL, wxID_ANY, title)
{
bitmap = wxBitmap(image);
wxSplashScreen *splash = new wxSplashScreen(bitmap,
wxSPLASH_CENTRE_ON_PARENT | wxSPLASH_NO_TIMEOUT,
0, this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
wxSIMPLE_BORDER|wxSTAY_ON_TOP);
bitmap = wxBitmap(image);
wxSplashScreen *splash = new wxSplashScreen(bitmap,
wxSPLASH_CENTRE_ON_PARENT | wxSPLASH_NO_TIMEOUT,
0, this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
wxSIMPLE_BORDER|wxSTAY_ON_TOP);
wxWindow *win = splash->GetSplashWindow();
#if wxUSE_MEDIACTRL
wxMediaCtrl *media = new wxMediaCtrl( win, wxID_EXIT, _T("press.mpg"), wxPoint(2,2));
wxWindow *win = splash->GetSplashWindow();
#if wxUSE_MEDIACTRL
wxMediaCtrl *media = new wxMediaCtrl( win, wxID_EXIT, _T("press.mpg"), wxPoint(2,2));
- wxStaticText *text = new wxStaticText( win, wxID_EXIT, _T("click somewhere\non image"), wxPoint(13,11) );
+ wxStaticText *text = new wxStaticText( win,
+ wxID_EXIT,
+ _T("click somewhere\non this image"),
+ wxPoint(m_isPda ? 0 : 13,
+ m_isPda ? 0 : 11)
+ );
text->SetBackgroundColour(*wxWHITE);
text->SetForegroundColour(*wxBLACK);
wxFont font = text->GetFont();
text->SetBackgroundColour(*wxWHITE);
text->SetForegroundColour(*wxBLACK);
wxFont font = text->GetFont();