git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20423
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
HMENU hmenu = ::GetSystemMenu(GetHwnd(), FALSE /* get it */);
if ( !hmenu )
{
HMENU hmenu = ::GetSystemMenu(GetHwnd(), FALSE /* get it */);
if ( !hmenu )
{
- wxLogLastError(_T("GetSystemMenu"));
-
- return FALSE;
+ // no system menu at all -- ok if we want to remove the close button
+ // anyhow, but bad if we want to show it
+ return !enable;
}
// enabling/disabling the close item from it also automatically
}
// enabling/disabling the close item from it also automatically