From e0496eaaa4596dd1f6a2157ec9645f3bbe41ac06 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Mon, 17 Feb 2003 12:43:47 +0000 Subject: [PATCH] Changed back inline/const things wxTabCtrl must have WS_CHILD window style small access.cpp tweaks (call QueryInterface) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19235 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/datetime.h | 2 +- include/wx/datetime.inl | 2 +- src/msw/ole/access.cpp | 7 +++++-- src/msw/tabctrl.cpp | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/include/wx/datetime.h b/include/wx/datetime.h index ca6a0ada1f..27c40ec7bd 100644 --- a/include/wx/datetime.h +++ b/include/wx/datetime.h @@ -36,7 +36,7 @@ class WXDLLEXPORT wxDateSpan; // rebuilt) // For Mingw32, causes a link error. (VZ: why?) -#if defined( __WXDEBUG__) && !defined(__MINGW32__) && !defined(_MSC_VER) +#if defined( __WXDEBUG__) && !defined(__MINGW32__) /* && !defined(_MSC_VER) */ #define wxDATETIME_DONT_INLINE #undef inline diff --git a/include/wx/datetime.inl b/include/wx/datetime.inl index 17a8c36f37..398b02828b 100644 --- a/include/wx/datetime.inl +++ b/include/wx/datetime.inl @@ -36,7 +36,7 @@ // ---------------------------------------------------------------------------- // only define this once, when included from datetime.cpp -#if 1 // def wxDEFINE_TIME_CONSTANTS +#ifdef wxDEFINE_TIME_CONSTANTS const long wxDateTime::TIME_T_FACTOR = 1000l; #endif // wxDEFINE_TIME_CONSTANTS diff --git a/src/msw/ole/access.cpp b/src/msw/ole/access.cpp index 3bc308ca47..7c1e16e3f1 100644 --- a/src/msw/ole/access.cpp +++ b/src/msw/ole/access.cpp @@ -594,8 +594,11 @@ STDMETHODIMP wxIAccessible::get_accChild ( VARIANT varChildID, IDispatch** ppDis wxIAccessible* objectIA = child->GetIAccessible(); if (!objectIA) return E_FAIL; - *ppDispChild = objectIA; - objectIA->AddRef(); + + if (objectIA->QueryInterface(IID_IDispatch, (LPVOID*) ppDispChild) != S_OK) + return E_FAIL; + + (*ppDispChild)->AddRef(); return S_OK; } else diff --git a/src/msw/tabctrl.cpp b/src/msw/tabctrl.cpp index c2553f2f2f..128ffff8cc 100644 --- a/src/msw/tabctrl.cpp +++ b/src/msw/tabctrl.cpp @@ -90,7 +90,7 @@ bool wxTabCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, cons m_windowId = (id < 0 ? NewControlId() : id); - long tabStyle = 0; + long tabStyle = WS_CHILD; if (m_windowStyle & wxTC_MULTILINE) tabStyle |= TCS_MULTILINE; if (m_windowStyle & wxTC_RIGHTJUSTIFY) -- 2.45.2