Set RADIOBTN_PARENT_IS_RADIOBOX to 0 (sorry, but...); fixed a
Dialog Editor crash problem; made wxStaticBitmap movable again git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5372 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -347,7 +347,7 @@ wxControl *wxResourceTable::CreateItem(wxWindow *parent, const wxItemResource* c
|
||||
else if (itemType == wxString(wxT("wxMessage")) || itemType == wxString(wxT("wxStaticText")) ||
|
||||
itemType == wxString(wxT("wxStaticBitmap")))
|
||||
{
|
||||
if (childResource->GetValue4() != wxT(""))
|
||||
if (childResource->GetValue4() != wxT("") || itemType == wxString(wxT("wxStaticBitmap")) )
|
||||
{
|
||||
// Bitmap message
|
||||
wxBitmap bitmap = childResource->GetBitmap();
|
||||
@@ -357,6 +357,12 @@ wxControl *wxResourceTable::CreateItem(wxWindow *parent, const wxItemResource* c
|
||||
((wxItemResource*) childResource)->SetBitmap(bitmap);
|
||||
}
|
||||
#if wxUSE_BITMAP_MESSAGE
|
||||
#ifdef __WXMSW__
|
||||
// Use a default bitmap
|
||||
if (!bitmap.Ok())
|
||||
bitmap.LoadFile("cross_bmp", wxBITMAP_TYPE_BMP_RESOURCE);
|
||||
#endif
|
||||
|
||||
if (bitmap.Ok())
|
||||
control = new wxStaticBitmap(parent, id, bitmap, pos, size,
|
||||
childResource->GetStyle(), childResource->GetName());
|
||||
|
||||
@@ -56,7 +56,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl)
|
||||
// reason to revert to the backward compatible behaviour - but I still
|
||||
// leave this possibility just in case.
|
||||
|
||||
#define RADIOBTN_PARENT_IS_RADIOBOX 1
|
||||
#define RADIOBTN_PARENT_IS_RADIOBOX 0
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// private functions
|
||||
|
||||
@@ -216,7 +216,9 @@ bool wxStaticBitmap::MSWOnDraw(WXDRAWITEMSTRUCT *item)
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
#endif // Win16
|
||||
|
||||
// We need this or the control can never be moved e.g. in Dialog Editor.
|
||||
long wxStaticBitmap::MSWWindowProc(WXUINT nMsg,
|
||||
WXWPARAM wParam,
|
||||
WXLPARAM lParam)
|
||||
@@ -228,4 +230,4 @@ long wxStaticBitmap::MSWWindowProc(WXUINT nMsg,
|
||||
|
||||
return wxWindow::MSWWindowProc(nMsg, wParam, lParam);
|
||||
}
|
||||
#endif // Win16
|
||||
|
||||
|
||||
Reference in New Issue
Block a user