diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h index dcf23526ab..4e95ca8b5b 100644 --- a/include/wx/msw/private.h +++ b/include/wx/msw/private.h @@ -34,6 +34,7 @@ WXDLLEXPORT_DATA(extern HICON) wxDEFAULT_MDICHILDFRAME_ICON; WXDLLEXPORT_DATA(extern HFONT) wxSTATUS_LINE_FONT; WXDLLEXPORT HINSTANCE wxGetInstance(); +WXDLLEXPORT void wxSetInstance(HINSTANCE hInst); WXDLLEXPORT void wxFillLogFont(LOGFONT *logFont, wxFont *font); WXDLLEXPORT wxFont wxCreateFontFromLogFont(LOGFONT *logFont); // , bool createNew = TRUE); diff --git a/src/msw/app.cpp b/src/msw/app.cpp index 16b58ba2f9..ba4a42af25 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -1126,6 +1126,11 @@ HINSTANCE wxGetInstance() return wxhInstance; } +void wxSetInstance(HINSTANCE hInst) +{ + wxhInstance = hInst; +} + // For some reason, with MSVC++ 1.5, WinMain isn't linked in properly // if in a separate file. So include it here to ensure it's linked. #if (defined(__VISUALC__) && !defined(__WIN32__)) || (defined(__GNUWIN32__) && !defined(__TWIN32__))