diff --git a/src/msw/menu.cpp b/src/msw/menu.cpp index 3ab2343f1a..86dd6df83c 100644 --- a/src/msw/menu.cpp +++ b/src/msw/menu.cpp @@ -580,21 +580,11 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos) // boxes are used together with bitmaps and this is not the // case in wx API WinStruct mi; - - // don't call SetMenuInfo() directly, this would prevent - // the app from starting up under Windows 95/NT 4 - typedef BOOL (WINAPI *SetMenuInfo_t)(HMENU, MENUINFO *); - - wxDynamicLibrary dllUser(wxT("user32")); - wxDYNLIB_FUNCTION(SetMenuInfo_t, SetMenuInfo, dllUser); - if ( pfnSetMenuInfo ) + mi.fMask = MIM_STYLE; + mi.dwStyle = MNS_CHECKORBMP; + if ( !::SetMenuInfo(GetHmenu(), &mi) ) { - mi.fMask = MIM_STYLE; - mi.dwStyle = MNS_CHECKORBMP; - if ( !(*pfnSetMenuInfo)(GetHmenu(), &mi) ) - { - wxLogLastError(wxT("SetMenuInfo(MNS_NOCHECK)")); - } + wxLogLastError(wxT("SetMenuInfo(MNS_NOCHECK)")); } } }