]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dc.cpp
wxMenu code clean up
[wxWidgets.git] / src / msw / dc.cpp
index 73f33909521e59a5f224378bc019e6c523a04fd0..970a074492b8f92ca23c2885a7dbd0395eeb7389 100644 (file)
@@ -92,7 +92,7 @@ wxDC::wxDC(void)
   m_signY = 1;
   m_systemScaleX = 1.0;
   m_systemScaleY = 1.0;
-  m_mappingMode = MM_TEXT;
+  m_mappingMode = wxMM_TEXT;
   m_bOwnsDC = FALSE;
   m_hDC = 0;
   m_clipping = FALSE;
@@ -808,7 +808,14 @@ void wxDC::SetBackground(const wxBrush& brush)
       }
       else
       {
-        m_canvas->SetBackgroundColour(m_backgroundBrush.GetColour());
+        // New behaviour, 10/2/99: setting the background brush of a DC
+        // doesn't affect the window background colour. However,
+        // I'm leaving in the transparency setting because it's needed by
+        // various controls (e.g. wxStaticText) to determine whether to draw
+        // transparently or not. TODO: maybe this should be a new function
+        // wxWindow::SetTransparency(). Should that apply to the child itself, or the
+        // parent?
+//        m_canvas->SetBackgroundColour(m_backgroundBrush.GetColour());
         m_canvas->m_backgroundTransparent = FALSE;
       }
     }
@@ -998,32 +1005,32 @@ void wxDC::SetMapMode(int mode)
 
   switch (mode)
   {
-    case MM_TWIPS:
+    case wxMM_TWIPS:
     {
       m_logicalScaleX = (twips2mm * mm2pixelsX);
       m_logicalScaleY = (twips2mm * mm2pixelsY);
       break;
     }
-    case MM_POINTS:
+    case wxMM_POINTS:
     {
       m_logicalScaleX = (pt2mm * mm2pixelsX);
       m_logicalScaleY = (pt2mm * mm2pixelsY);
       break;
     }
-    case MM_METRIC:
+    case wxMM_METRIC:
     {
       m_logicalScaleX = mm2pixelsX;
       m_logicalScaleY = mm2pixelsY;
       break;
     }
-    case MM_LOMETRIC:
+    case wxMM_LOMETRIC:
     {
       m_logicalScaleX = (mm2pixelsX/10.0);
       m_logicalScaleY = (mm2pixelsY/10.0);
       break;
     }
     default:
-    case MM_TEXT:
+    case wxMM_TEXT:
     {
       m_logicalScaleX = 1.0;
       m_logicalScaleY = 1.0;