diff --git a/distrib/msw/tmake/b32.t b/distrib/msw/tmake/b32.t index c805a7bc45..34f6377e41 100644 --- a/distrib/msw/tmake/b32.t +++ b/distrib/msw/tmake/b32.t @@ -39,11 +39,12 @@ foreach $file (sort keys %wxMSW) { next if $wxMSW{$file} =~ /\b16\b/; - if ( $file =~ /^automtn/ ) { - #! comment in old makefile.b32 seems to imply that this file can not - #! be compiled with Borland (leads to crash in oleauto sample) - next; - } +#! if ( $file =~ /^automtn/ ) { +#! #! comment in old makefile.b32 seems to imply that this file can not +#! #! be compiled with Borland (leads to crash in oleauto sample) +#! No longer true, at least for BC++ 5.2 +#! next; +#! } $isCFile = $file =~ /\.c$/; diff --git a/samples/oleauto/oleauto.cpp b/samples/oleauto/oleauto.cpp index b4021b93ae..d50c7ecd4b 100644 --- a/samples/oleauto/oleauto.cpp +++ b/samples/oleauto/oleauto.cpp @@ -40,6 +40,10 @@ #error "Sorry, this sample works under Windows only." #endif +#ifdef __WATCOMC__ +#error "Sorry, Watcom C++ does not support wxAutomationObject." +#endif + // ---------------------------------------------------------------------------- // ressources // ---------------------------------------------------------------------------- diff --git a/samples/regtest/regtest.cpp b/samples/regtest/regtest.cpp index 5b4f384aed..2e8b20c303 100644 --- a/samples/regtest/regtest.cpp +++ b/samples/regtest/regtest.cpp @@ -913,10 +913,11 @@ bool RegTreeCtrl::TreeNode::OnExpand() if ( isEmpty ) { // this is for the case when our last child was just deleted - m_pTree->Collapse(Id()); + wxTreeItemId theId(Id()); // Temp variable seems necessary for BC++ + m_pTree->Collapse(theId); // we won't be expanded any more - m_pTree->SetItemHasChildren(Id(), FALSE); + m_pTree->SetItemHasChildren(theId, FALSE); } return TRUE; @@ -935,14 +936,15 @@ void RegTreeCtrl::TreeNode::Refresh() if ( !IsKey() ) return; - bool wasExpanded = m_pTree->IsExpanded(Id()); + wxTreeItemId theId(Id()); // Temp variable seems necessary for BC++ + bool wasExpanded = m_pTree->IsExpanded(theId); if ( wasExpanded ) - m_pTree->Collapse(Id()); + m_pTree->Collapse(theId); OnCollapse(); - m_pTree->SetItemHasChildren(Id()); + m_pTree->SetItemHasChildren(theId); if ( wasExpanded ) { - m_pTree->Expand(Id()); + m_pTree->Expand(theId); OnExpand(); } } @@ -967,7 +969,8 @@ bool RegTreeCtrl::TreeNode::DeleteChild(TreeNode *child) } if ( ok ) { - m_pTree->Delete(child->Id()); + wxTreeItemId theId(child->Id()); // Temp variable seems necessary for BC++ + m_pTree->Delete(theId); Refresh(); } @@ -983,7 +986,8 @@ void RegTreeCtrl::TreeNode::DestroyChildren() long lId = m_aChildren[n]->Id(); // no, wxTreeCtrl will do it //delete m_aChildren[n]; - m_pTree->Delete(lId); + wxTreeItemId theId(lId); // Temp variable seems necessary for BC++ + m_pTree->Delete(theId); } m_aChildren.Empty(); diff --git a/src/makeb32.env b/src/makeb32.env index fec3d1afce..efa659c959 100644 --- a/src/makeb32.env +++ b/src/makeb32.env @@ -13,8 +13,8 @@ WIN95FLAG = -D__WIN95__ -D__WINDOWS__ # Ilink32 is available on BC++ 5.02 and above, and all # versions of C++ Builder. !ifndef LINK -LINK=ilink32 -#LINK=tlink32 +#LINK=ilink32 +LINK=tlink32 !endif !ifndef FINAL diff --git a/src/msw/makefile.b32 b/src/msw/makefile.b32 index bab594b165..4f0d74dc0d 100644 --- a/src/msw/makefile.b32 +++ b/src/msw/makefile.b32 @@ -218,6 +218,7 @@ COMMONOBJS = \ MSWOBJS = $(MSWDIR)\accel.obj \ $(MSWDIR)\app.obj \ + $(MSWDIR)\automtn.obj \ $(MSWDIR)\bitmap.obj \ $(MSWDIR)\bmpbuttn.obj \ $(MSWDIR)\brush.obj \ @@ -517,6 +518,8 @@ $(MSWDIR)\notebook.obj: $(MSWDIR)\notebook.$(SRCSUFF) $(MSWDIR)\oleutils.obj: $(OLEDIR)\oleutils.$(SRCSUFF) +$(MSWDIR)\automtn.obj: $(OLEDIR)\automtn.$(SRCSUFF) + $(MSWDIR)\ownerdrw.obj: $(MSWDIR)\ownerdrw.$(SRCSUFF) $(MSWDIR)\palette.obj: $(MSWDIR)\palette.$(SRCSUFF) diff --git a/src/msw/ole/automtn.cpp b/src/msw/ole/automtn.cpp index f7e069bc01..603f152158 100644 --- a/src/msw/ole/automtn.cpp +++ b/src/msw/ole/automtn.cpp @@ -682,8 +682,12 @@ bool ConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant) #else variant = (bool) (oleVariant.bool != 0); #endif +#else +#ifndef HAVE_BOOL // Can't use bool operator if no native bool type + variant = (long) (oleVariant.boolVal != 0); #else variant = (bool) (oleVariant.boolVal != 0); +#endif #endif break; }