BC++ fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7322 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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$/;
|
||||
|
||||
|
@@ -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
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -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();
|
||||
|
@@ -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
|
||||
|
@@ -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)
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user