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