Remove dynamic loading of SetMenuInfo.
SetMenuInfo is available since Win2k
This commit is contained in:
parent
27ffe525b5
commit
79d485d7a9
@ -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<MENUINFO> 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)"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user