X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..fe593cc504195a3c91281eae4edf5e852a51a59c:/src/os2/menu.cpp diff --git a/src/os2/menu.cpp b/src/os2/menu.cpp index 5fa5301703..ca8af4aa8e 100644 --- a/src/os2/menu.cpp +++ b/src/os2/menu.cpp @@ -6,7 +6,7 @@ // Created: 10/10/99 // RCS-ID: $Id$ // Copyright: (c) David Webster -// Licence: wxWidgets licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ @@ -47,7 +47,7 @@ extern wxMenu* wxCurrentPopupMenu; // // The (popup) menu title has this special id // -static const int idMenuTitle = -2; +static const int idMenuTitle = -3; // // The unique ID for Menus @@ -280,7 +280,7 @@ bool wxMenu::DoInsertOrAppend( rItem.id = pItem->GetId(); } - BYTE* pData; + BYTE* pData=NULL; #if wxUSE_OWNER_DRAWN if (pItem->IsOwnerDrawn()) @@ -304,10 +304,18 @@ bool wxMenu::DoInsertOrAppend( } else { - // - // Menu is just a normal string (passed in data parameter) - // - rItem.afStyle |= MIS_TEXT; + if (pItem->GetId() == idMenuTitle) + { + // Item is an unselectable title to be passed via pData + rItem.afStyle = MIS_STATIC; + } + else + { + // + // Menu is just a normal string (passed in data parameter) + // + rItem.afStyle |= MIS_TEXT; + } pData = (char*)pItem->GetText().c_str(); }