wxStaticBitmap
does accept wxBitmap
in its constructor (wx API-Doc)
The error message produced by the compiler might be a bit misleading
im guessing you see something like this:
include/wx/msw/statbmp.h:80: note: candidates are: wxStaticBitmap::wxStaticBitmap(const wxStaticBitmap&)
include/wx/msw/statbmp.h:34: note: wxStaticBitmap::wxStaticBitmap(wxWindow*, wxWindowID, const wxGDIImage&, const wxPoint&, const wxSize&, long int, const wxString&)
include/wx/msw/statbmp.h:25: note: wxStaticBitmap::wxStaticBitmap()
Since it is the only thing context depending, there seems to be a problem with your this
pointer, either you are not "inside" a wxWindow
or your compiler can't figure out the static type. You can use something like this to verify: (don't do that in productive code)
wxStaticBitmap* tmtBitmap = new wxStaticBitmap( (wxWindow*)NULL, wxID_ANY, wxBitmap( wxT("directory"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, 0 );
or
wxStaticBitmap* tmtBitmap = new wxStaticBitmap( (wxWindow*)this, wxID_ANY, wxBitmap( wxT("directory"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, 0 );