OS/2 loads bitmap resources via integer ID, not via a string filename
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -275,8 +275,15 @@ wxContextHelpButton::wxContextHelpButton(wxWindow* parent,
|
|||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
const wxSize& size,
|
const wxSize& size,
|
||||||
long style)
|
long style)
|
||||||
|
#if defined(__WXPM__)
|
||||||
|
: wxBitmapButton(parent, id, wxBitmap(wxCSQUERY_BITMAP
|
||||||
|
,wxBITMAP_TYPE_RESOURCE
|
||||||
|
),
|
||||||
|
pos, size, style)
|
||||||
|
#else
|
||||||
: wxBitmapButton(parent, id, wxBITMAP(csquery),
|
: wxBitmapButton(parent, id, wxBITMAP(csquery),
|
||||||
pos, size, style)
|
pos, size, style)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -335,7 +335,14 @@ wxControl *wxResourceTable::CreateItem(wxWindow *parent, const wxItemResource* c
|
|||||||
((wxItemResource*) childResource)->SetBitmap(bitmap);
|
((wxItemResource*) childResource)->SetBitmap(bitmap);
|
||||||
}
|
}
|
||||||
if (!bitmap.Ok())
|
if (!bitmap.Ok())
|
||||||
|
#if defined(__WXPM__)
|
||||||
|
//
|
||||||
|
// OS/2 uses integer id's to access resources, not file name strings
|
||||||
|
//
|
||||||
|
bitmap.LoadFile(wxCROSS_BITMAP, wxBITMAP_TYPE_BMP_RESOURCE);
|
||||||
|
#else
|
||||||
bitmap.LoadFile("cross_bmp", wxBITMAP_TYPE_BMP_RESOURCE);
|
bitmap.LoadFile("cross_bmp", wxBITMAP_TYPE_BMP_RESOURCE);
|
||||||
|
#endif
|
||||||
control = new wxBitmapButton(parent, id, bitmap, pos, size,
|
control = new wxBitmapButton(parent, id, bitmap, pos, size,
|
||||||
childResource->GetStyle() | wxBU_AUTODRAW, wxDefaultValidator, childResource->GetName());
|
childResource->GetStyle() | wxBU_AUTODRAW, wxDefaultValidator, childResource->GetName());
|
||||||
}
|
}
|
||||||
@@ -2477,7 +2484,11 @@ wxBitmap wxResourceCreateBitmap(const wxString& resource, wxResourceTable *table
|
|||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
|
#if defined(__WXPM__)
|
||||||
|
return wxNullBitmap;
|
||||||
|
#else
|
||||||
return wxBitmap(name, (wxBitmapType)bitmapType);
|
return wxBitmap(name, (wxBitmapType)bitmapType);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifndef __WXGTK__
|
#ifndef __WXGTK__
|
||||||
|
Reference in New Issue
Block a user