]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed compilation for when not including <windows.h>
authorJulian Smart <julian@anthemion.co.uk>
Thu, 4 Feb 1999 21:12:30 +0000 (21:12 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 4 Feb 1999 21:12:30 +0000 (21:12 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1599 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/ole/automtn.h
include/wx/wxprec.h
samples/mfc/mfctest.cpp
src/msw/ole/automtn.cpp
src/msw/ole/dataobj.cpp
src/msw/ole/dropsrc.cpp

index 412b04dcf409a0572495d18c78efd4ae60ee2c31..b3598a59858093bccdf0a6d3802ef216a9396059 100644 (file)
@@ -81,36 +81,10 @@ public:
        // without having to deal with nasty IDispatch pointers.
        bool GetObject(wxAutomationObject& obj, const wxString& property, int noArgs = 0, wxVariant args[] = (wxVariant*) NULL) const;
 
-       // Convert variants
-    static bool ConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant) ;
-    static bool ConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant) ;
-
 public:
     WXIDISPATCH*  m_dispatchPtr;
 };
 
-// wrapper around BSTR type (by Vadim Zeitlin)
-
-class WXDLLEXPORT BasicString
-{
-public:
-  // ctors & dtor
-  BasicString(const char *sz);
- ~BasicString();
-
-  // accessors
-    // just get the string
-  operator BSTR() const { return m_wzBuf; }
-    // retrieve a copy of our string - caller must SysFreeString() it later!
-  BSTR Get() const { return SysAllocString(m_wzBuf); }
-
-private:
-  // @@@ not implemented (but should be)
-  BasicString(const BasicString&);
-  BasicString& operator=(const BasicString&);
-
-  OLECHAR *m_wzBuf;     // actual string
-};
 
 #endif
     // _WX_AUTOMTN_H_
index 6f542b6a456b7d3c869e7fbb8ba1aa23631b8c81..940c4a6521a11f2432b516d95e81e0b26f6a3398 100644 (file)
@@ -31,7 +31,7 @@
 // Comment this out if you don't mind slower compilation of the wxWindows
 // library
 #if !defined(__WXMAC__) && !defined(__SALFORDC__)
-#include <windows.h>
+// #include <windows.h>
 #endif
 
 #ifdef GetClassInfo
index cbbcd343c23d7968f094c5128c8fde71d618c70b..26e03e26fb1d0690da7a8188a79df7036bc57fb7 100644 (file)
@@ -42,9 +42,7 @@
 #pragma hdrstop
 #endif
 
-#ifndef WX_PRECOMP
 #include "wx/wx.h"
-#endif
 
 #ifdef new
 #undef new
@@ -60,8 +58,6 @@
 
 #include "mfctest.h"
 
-#include "wx/wx.h"
-
 /////////////////////////////////////////////////////////////////////////////
 
 // theApp:
@@ -95,7 +91,7 @@ class MyChild: public wxFrame
     MyCanvas *canvas;
     MyChild(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size, const long style);
     ~MyChild(void);
-    Bool OnClose(void);
+    bool OnClose(void);
 
     void OnQuit(wxCommandEvent& event);
     void OnNew(wxCommandEvent& event);
@@ -269,7 +265,7 @@ bool MyApp::OnInit(void)
 wxFrame *MyApp::CreateFrame(void)
 {
       MyChild *subframe = new MyChild(NULL, "Canvas Frame", wxPoint(10, 10), wxSize(300, 300),
-                             wxDEFAULT_FRAME);
+                             wxDEFAULT_FRAME_STYLE);
 
       subframe->SetTitle("wxWindows canvas frame");
 
@@ -294,7 +290,7 @@ wxFrame *MyApp::CreateFrame(void)
 
       MyCanvas *canvas = new MyCanvas(subframe, wxPoint(0, 0), wxSize(width, height));
       wxCursor *cursor = new wxCursor(wxCURSOR_PENCIL);
-      canvas->SetCursor(cursor);
+      canvas->SetCursor(*cursor);
       subframe->canvas = canvas;
 
       // Give it scrollbars
@@ -321,13 +317,13 @@ void MyCanvas::OnPaint(wxPaintEvent& event)
 {
     wxPaintDC dc(this);
 
-    dc.SetFont(small_font);
-    dc.SetPen(wxGREEN_PEN);
+    dc.SetFont(small_font);
+    dc.SetPen(wxGREEN_PEN);
     dc.DrawLine(0, 0, 200, 200);
     dc.DrawLine(200, 0, 0, 200);
 
-    dc.SetBrush(wxCYAN_BRUSH);
-    dc.SetPen(wxRED_PEN);
+    dc.SetBrush(wxCYAN_BRUSH);
+    dc.SetPen(wxRED_PEN);
     dc.DrawRectangle(100, 100, 100, 50);
     dc.DrawRoundedRectangle(150, 150, 100, 50, 20);
 
@@ -342,7 +338,7 @@ void MyCanvas::OnPaint(wxPaintEvent& event)
 void MyCanvas::OnMouseEvent(wxMouseEvent& event)
 {
     wxClientDC dc(this);
-    dc.SetPen(wxBLACK_PEN);
+    dc.SetPen(wxBLACK_PEN);
     long x, y;
     event.Position(&x, &y);
     if (xpos > -1 && ypos > -1 && event.Dragging())
@@ -387,7 +383,7 @@ void MyChild::OnActivate(wxActivateEvent& event)
     canvas->SetFocus();
 }
 
-Bool MyChild::OnClose(void)
+bool MyChild::OnClose(void)
 {
   return TRUE;
 }
index e16be59a3258e1d10e03024099f1a9edde31fe04..4d062412c75652f7c243fe24c42f682e8ad783aa 100644 (file)
 #include <math.h>
 #include <time.h>
 
+#ifdef GetObject
+#undef GetObject
+#endif
+
+// wrapper around BSTR type (by Vadim Zeitlin)
+
+class WXDLLEXPORT BasicString
+{
+public:
+  // ctors & dtor
+  BasicString(const char *sz);
+ ~BasicString();
+
+  // accessors
+    // just get the string
+  operator BSTR() const { return m_wzBuf; }
+    // retrieve a copy of our string - caller must SysFreeString() it later!
+  BSTR Get() const { return SysAllocString(m_wzBuf); }
+
+private:
+  // @@@ not implemented (but should be)
+  BasicString(const BasicString&);
+  BasicString& operator=(const BasicString&);
+
+  OLECHAR *m_wzBuf;     // actual string
+};
+
+// Convert variants
+static bool ConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant) ;
+static bool ConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant) ;
+
 // Convert string to Unicode
 static BSTR ConvertStringToOle(const wxString& str);
 
@@ -484,7 +515,7 @@ bool wxAutomationObject::CreateInstance(const wxString& classId) const
 }
 
 
-bool wxAutomationObject::ConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant)
+bool ConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant)
 {
        ClearVariant(&oleVariant);
        if (variant.IsNull())
@@ -601,7 +632,7 @@ bool wxAutomationObject::ConvertVariantToOle(const wxVariant& variant, VARIANTAR
 #define VT_TYPEMASK 0xfff
 #endif
 
-bool wxAutomationObject::ConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant)
+bool ConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant)
 {
        switch (oleVariant.vt & VT_TYPEMASK)
        {
index 43f372295c24117044ac977521c5d63f8d2bb119..d32806d9a06573a0df996899e2153216986a3266 100644 (file)
 
 #if defined(__WIN32__) && !defined(__GNUWIN32__)
 
-#include  <wx/log.h>
-#include  <wx/msw/ole/oleutils.h>
-#include  <wx/msw/ole/dataobj.h>
+#include <wx/log.h>
+#include <wx/msw/ole/dataobj.h>
+
+#include <windows.h>
+#include <oleauto.h>
 
 #ifndef __WIN32__
   #include <ole2.h>
   #include <olestd.h>
 #endif
 
+#include  <wx/msw/ole/oleutils.h>
+
 // ----------------------------------------------------------------------------
 // functions
 // ----------------------------------------------------------------------------
index e6955bad071ff0efa3d9e8fc2d636088e2e1f943..7a434d08f1c208bca413bfeeace7040346a8217a 100644 (file)
 #if wxUSE_DRAG_AND_DROP
 
 #include  <wx/log.h>
-#include  <wx/msw/ole/oleutils.h>
 #include  <wx/msw/ole/dataobj.h>
 #include  <wx/msw/ole/dropsrc.h>
 
+#include <windows.h>
+
 #ifndef __WIN32__
   #include <ole2.h>
   #include <olestd.h>
 #endif
 
+#include <oleauto.h>
+
+#include <wx/msw/ole/oleutils.h>
+
 // ----------------------------------------------------------------------------
 // wxIDropSource implementation of IDropSource interface
 // ----------------------------------------------------------------------------