Build fix for wx2.x

git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@1360 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
skidau 2015-04-23 10:00:14 +00:00
parent 24f820ace5
commit 5351d5d40f
2 changed files with 12 additions and 2 deletions

View File

@ -20,8 +20,13 @@ extern "C" {
#include "../gb/gbPrinter.h"
#include "../gba/agbprint.h"
#if (wxMAJOR_VERSION < 3)
#define GetXRCDialog(n) \
dynamic_cast<wxDialog*>(FindWindowByName(n))
wxStaticCast(wxGetApp().frame->FindWindow(XRCID(n)), wxDialog)
#else
#define GetXRCDialog(n) \
wxStaticCast(wxGetApp().frame->FindWindowByName(n), wxDialog)
#endif
bool cmditem_lt(const struct cmditem &cmd1, const struct cmditem &cmd2)
{

View File

@ -43,8 +43,13 @@ static void mark_recursive(wxWindowBase *w)
mark_recursive(*ch);
}
#if (wxMAJOR_VERSION < 3)
#define GetXRCDialog(n) \
wxStaticCast(wxGetApp().frame->FindWindowByName(n), wxDialog)
wxStaticCast(wxGetApp().frame->FindWindow(XRCID(n)), wxDialog)
#else
#define GetXRCDialog(n) \
wxStaticCast(wxGetApp().frame->FindWindowByName(n), wxDialog)
#endif
// Event handlers must be methods of wxEvtHandler-derived objects