]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/pen.cpp
Renamed m_clientData member variable to avoid clash with variable with same
[wxWidgets.git] / src / msw / pen.cpp
index f255240708e5f86df7eab910e3bc882d0277dba4..92b08327a6c1d61161dea3af5eeca43fe7458ad4 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
-// Name:        msw/pen.cpp
+// Name:        src/msw/pen.cpp
 // Purpose:     wxPen
 // Author:      Julian Smart
 // Modified by:
 // Purpose:     wxPen
 // Author:      Julian Smart
 // Modified by:
 #include "wx/wxprec.h"
 
 #ifdef __BORLANDC__
 #include "wx/wxprec.h"
 
 #ifdef __BORLANDC__
-#pragma hdrstop
+    #pragma hdrstop
 #endif
 
 #endif
 
-#ifndef WX_PRECOMP
-#include <stdio.h>
-#include "wx/setup.h"
-#include "wx/list.h"
-#include "wx/utils.h"
-#include "wx/app.h"
 #include "wx/pen.h"
 #include "wx/pen.h"
+
+#ifndef WX_PRECOMP
+    #include <stdio.h>
+    #include "wx/list.h"
+    #include "wx/utils.h"
+    #include "wx/app.h"
 #endif
 
 #include "wx/msw/private.h"
 #endif
 
 #include "wx/msw/private.h"
@@ -123,7 +123,7 @@ bool wxPen::RealizeResource()
    // Join style, Cap style, Pen Stippling
 #if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
    // Only NT can display dashed or dotted lines with width > 1
    // Join style, Cap style, Pen Stippling
 #if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
    // Only NT can display dashed or dotted lines with width > 1
-   if ( os != wxWINDOWS_NT &&
+   if ( os != wxOS_WINDOWS_NT &&
            (M_PENDATA->m_style == wxDOT ||
             M_PENDATA->m_style == wxLONG_DASH ||
             M_PENDATA->m_style == wxSHORT_DASH ||
            (M_PENDATA->m_style == wxDOT ||
             M_PENDATA->m_style == wxLONG_DASH ||
             M_PENDATA->m_style == wxSHORT_DASH ||
@@ -225,25 +225,14 @@ bool wxPen::RealizeResource()
            real_dash = (wxMSWDash*)NULL;
        }
 
            real_dash = (wxMSWDash*)NULL;
        }
 
-       // Win32s doesn't have ExtCreatePen function...
-       if (os==wxWINDOWS_NT || os==wxWIN95)
-       {
-           M_PENDATA->m_hPen =
-             (WXHPEN) ExtCreatePen( ms_style,
-                                    M_PENDATA->m_width,
-                                    &logb,
-                                    M_PENDATA->m_style == wxUSER_DASH
-                                      ? M_PENDATA->m_nbDash
-                                      : 0,
-                                    (LPDWORD)real_dash );
-       }
-       else
-       {
-           M_PENDATA->m_hPen =
-              (WXHPEN) CreatePen( wx2msPenStyle(M_PENDATA->m_style),
-                                  M_PENDATA->m_width,
-                                  ms_colour );
-       }
+       M_PENDATA->m_hPen =
+         (WXHPEN) ExtCreatePen( ms_style,
+                                M_PENDATA->m_width,
+                                &logb,
+                                M_PENDATA->m_style == wxUSER_DASH
+                                  ? M_PENDATA->m_nbDash
+                                  : 0,
+                                (LPDWORD)real_dash );
 
        delete [] real_dash;
    }
 
        delete [] real_dash;
    }
@@ -389,12 +378,10 @@ int wx2msPenStyle(int wx_style)
             return PS_NULL;
 
         case wxUSER_DASH:
             return PS_NULL;
 
         case wxUSER_DASH:
-            // if (wxGetOsVersion()==wxWINDOWS_NT || wxGetOsVersion()==wxWIN95)
-                return PS_USERSTYLE;
+            return PS_USERSTYLE;
     }
 #else
     wxUnusedVar(wx_style);
 #endif
     return PS_SOLID;
 }
     }
 #else
     wxUnusedVar(wx_style);
 #endif
     return PS_SOLID;
 }
-