//Passing images wxSkinFrame::wxSkinFrame(wxWindow* parent, int id, const wxString &label, const wxImage& bmp, const wxPoint& pos, const wxSize& size, long style, const wxString& name) :m_bmpSkin(bmp), wxSkinFrameBase(parent,id,label,pos,size,style/*|wxFRAME_SHAPED*/ ,name) { m_titlePlacement = wxTITLE_LEFT; m_initial_close_x = -1; m_initial_min_x = -1; m_isMovable = false; m_bSizeable = true; if(!bmp.ISOK()) { m_bmpSkin = wxImage(1,1); } wxSize s(m_bmpSkin.GetWidth(), m_bmpSkin.GetHeight()); SetClientSize(s); #ifndef __WXGTK__ SetWindowShape(m_bmpSkin); #endif }
void wxSkinFrame::OnSize(wxSizeEvent& e) { if( CreateFrame(GetClientSize())) { SetWindowShape(m_bmpSkin); } /*if(m_sizeMode == 0) {*/ Refresh(); Layout(); //} e.Skip(); }
frmAbout::frmAbout(wxFrame *parent) : wxFrame(parent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(100, 100), 0 | wxFRAME_SHAPED | wxSIMPLE_BORDER | wxFRAME_NO_TASKBAR | wxSTAY_ON_TOP) { appearanceFactory->SetIcons(this); about = appearanceFactory->GetSplashImage(); SetClientSize(about.GetWidth(), about.GetHeight()); #ifndef __WXGTK__ SetWindowShape(); #endif CenterOnParent(); }
void frmAbout::OnWindowCreate(wxWindowCreateEvent &WXUNUSED(evt)) { SetWindowShape(); }
void wxSkinFrame::OnWindowCreate(wxWindowCreateEvent& evt) { SetWindowShape(m_bmpSkin); }