1. wxTreeCtrl::SetBackgroundColour() works (with new comctl32 anyhow)

2. wxToolTip should work with old comctl32


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5225 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-01-03 23:38:57 +00:00
parent 398b582f36
commit bb44855297
3 changed files with 54 additions and 3 deletions

View File

@@ -62,6 +62,16 @@
#define TVIS_FOCUSED 0x0001
#endif
#ifndef TV_FIRST
#define TV_FIRST 0x1100
#endif
// old headers might miss these messages (comctl32.dll 4.71+ only)
#ifndef TVM_SETBKCOLOR
#define TVM_SETBKCOLOR (TV_FIRST + 29)
#define TVM_SETTEXTCOLOR (TV_FIRST + 30)
#endif
// ----------------------------------------------------------------------------
// private classes
// ----------------------------------------------------------------------------
@@ -484,6 +494,30 @@ size_t wxTreeCtrl::GetChildrenCount(const wxTreeItemId& item,
return counter.GetCount() - 1;
}
// ----------------------------------------------------------------------------
// control colours
// ----------------------------------------------------------------------------
bool wxTreeCtrl::SetBackgroundColour(const wxColour &colour)
{
if ( !wxWindowBase::SetBackgroundColour(colour) )
return FALSE;
SendMessage(GetHwnd(), TVM_SETBKCOLOR, 0, colour.GetPixel());
return TRUE;
}
bool wxTreeCtrl::SetForegroundColour(const wxColour &colour)
{
if ( !wxWindowBase::SetForegroundColour(colour) )
return FALSE;
SendMessage(GetHwnd(), TVM_SETTEXTCOLOR, 0, colour.GetPixel());
return TRUE;
}
// ----------------------------------------------------------------------------
// Item access
// ----------------------------------------------------------------------------