]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/menuitem.cpp
wxFopen arg fixes
[wxWidgets.git] / src / msw / menuitem.cpp
index 0c44163a9afab9c3d3854cf022033184a32d7daa..e4a9d1beb90e7e780156978fd013249bdabd1541 100644 (file)
@@ -170,9 +170,13 @@ void wxMenuItem::Init()
 
     #undef  SYS_COLOR
 
-    // we don't want normal items be owner-drawn
+    // setting default colors switched ownerdraw on: switch it off again
     ResetOwnerDrawn();
 
+    //  switch ownerdraw back on if using a non default margin
+    if ( GetId() != wxID_SEPARATOR )
+        SetMarginWidth(GetMarginWidth());
+
     // tell the owner drawing code to to show the accel string as well
     SetAccelString(m_text.AfterFirst(_T('\t')));
 #endif // wxUSE_OWNER_DRAWN
@@ -330,7 +334,7 @@ void wxMenuItem::Check(bool check)
                              GetRealId(),
                              MF_BYCOMMAND | flags) == (DWORD)-1 )
         {
-            wxASSERT_MSG( _T("CheckMenuItem() failed, item not in the menu?") );
+            wxFAIL_MSG( _T("CheckMenuItem() failed, item not in the menu?") );
         }
     }