]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/ownerdrw.cpp
wxIniConfig added (pre-alpha quality, many functions not implemented), some
[wxWidgets.git] / src / msw / ownerdrw.cpp
index 87e3ba77b65b96013b2d21fc849a29dfcf66ef5a..117b784af36f0edf71809ba4b72a69df4b2adde1 100644 (file)
@@ -35,7 +35,7 @@
 
 // ctor
 // ----
-wxOwnerDrawn::wxOwnerDrawn(const wxTString& str, 
+wxOwnerDrawn::wxOwnerDrawn(const wxString& str, 
                            bool bCheckable, bool bMenuItem)
             : m_strName(str)
 {
@@ -45,7 +45,7 @@ wxOwnerDrawn::wxOwnerDrawn(const wxTString& str,
   m_nMarginWidth = ms_nLastMarginWidth;
 }
 
-#if defined(__WINDOWS__) && defined(__WIN32__)
+#if defined(__WXMSW__) && defined(__WIN32__)
   uint wxOwnerDrawn::ms_nDefaultMarginWidth = GetSystemMetrics(SM_CXMENUCHECK);
 #else   // # what is the reasonable default?
   uint wxOwnerDrawn::ms_nDefaultMarginWidth = 15;
@@ -128,7 +128,7 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODSt
   #ifdef  O_DRAW_NATIVE_API
     int nPrevMode = SetBkMode(hdc, TRANSPARENT);
     HBRUSH  hbr = CreateSolidBrush(colBack),
-            hPrevBrush = SelectObject(hdc, hbr);
+            hPrevBrush = (HBRUSH) SelectObject(hdc, hbr);
 
     RECT rectAll = { rc.GetLeft(), rc.GetTop(), rc.GetRight(), rc.GetBottom() };
     FillRect(hdc, &rectAll, hbr);
@@ -143,7 +143,7 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODSt
       hfont = (HFONT)::GetStockObject(SYSTEM_FONT);
     }
 
-    HFONT hPrevFont = ::SelectObject(hdc, hfont);
+    HFONT hPrevFont = (HFONT) ::SelectObject(hdc, hfont);
     DrawState(hdc, NULL, NULL, 
               (LPARAM)(const char *)m_strName, m_strName.Length(), 
               x, rc.y, rc.GetWidth(), rc.GetHeight(),