]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/ownerdrw.cpp
Added missing file copying (patch 1204618)
[wxWidgets.git] / src / os2 / ownerdrw.cpp
index 3bc612cae4ed1130153ece28fee0406cbfbfb556..bf2684f6bb2f1664c31e8f03ed7de1a8eb7376d5 100644 (file)
@@ -111,7 +111,7 @@ bool wxOwnerDrawn::OnMeasureItem(
     // Add space at the end of the menu for the submenu expansion arrow
     // this will also allow offsetting the accel string from the right edge
     //
-    *pWidth += GetDefaultMarginWidth() * 1.5;
+    *pWidth = (size_t)(*pWidth + GetDefaultMarginWidth() * 1.5);
 
     //
     // JACS: items still look too tightly packed, so adding 5 pixels.
@@ -214,7 +214,7 @@ bool wxOwnerDrawn::OnDrawItem(
     //
     if (eStatus & wxODSelected)
     {
-        wxColour                        vCol2("WHITE");
+        wxColour                        vCol2(wxT("WHITE"));
         vColBack.Set( (unsigned char)0
                      ,(unsigned char)0
                      ,(unsigned char)160
@@ -246,7 +246,7 @@ bool wxOwnerDrawn::OnDrawItem(
         // Fall back to default colors if none explicitly specified
         //
         vRef = ::WinQuerySysColor( HWND_DESKTOP
-                                  ,SYSCLR_MENU  // we are using gray for all our window backgrounds in wxWindows
+                                  ,SYSCLR_MENU  // we are using gray for all our window backgrounds in wxWidgets
                                   ,0L
                                  );
         vColBack.Set( GetRValue(vRef)
@@ -300,10 +300,10 @@ bool wxOwnerDrawn::OnDrawItem(
     //
     // Display main text and accel text separately to allign better
     //
-    wxString                        sTgt = "\t";
+    wxString                        sTgt = wxT("\t");
     wxString                        sFullString = m_strName; // need to save the original text
     wxString                        sAccel;
-    size_t                          nIndex;
+    int                             nIndex;
     size_t                          nWidth;
     size_t                          nCharWidth;
     size_t                          nHeight;
@@ -324,7 +324,7 @@ bool wxOwnerDrawn::OnDrawItem(
     //
     // Deal with the mneumonic character
     //
-    sTgt = "~";
+    sTgt = wxT("~");
     nIndex = sFullString.Find(sTgt.c_str());
     if (nIndex != -1)
     {
@@ -336,12 +336,12 @@ bool wxOwnerDrawn::OnDrawItem(
                           ,(long *)&nWidth
                           ,(long *)&nHeight
                          );
-        sTmp = sFullString[nIndex + 1];
+        sTmp = sFullString[(size_t)(nIndex + 1)];
         rDC.GetTextExtent( sTmp
                           ,(long *)&nCharWidth
                           ,(long *)&nHeight
                          );
-        sFullString.Replace(sTgt.c_str(), "", TRUE);
+        sFullString.Replace(sTgt.c_str(), wxEmptyString, TRUE);
     }
 
     //
@@ -464,11 +464,6 @@ bool wxOwnerDrawn::OnDrawItem(
 
             if (eStatus & wxODSelected)
             {
-                RECT                vRectBmp = { rRect.x
-                                                ,rRect.y
-                                                ,rRect.x + GetMarginWidth() - 1
-                                                ,rRect.y + m_nHeight - 1
-                                               };
                 POINTL              vPnt1 = {rRect.x + 1, rRect.y + 3}; // Leave a little background border
                 POINTL              vPnt2 = {rRect.x + GetMarginWidth(), rRect.y + m_nHeight - 3};