- dc->SetPen( *wxBLACK_PEN );
-
- dc->SetBrush(*(m_hasFocus ? wxBLACK_BRUSH : wxTRANSPARENT_BRUSH));
- dc->SetPen(*wxBLACK_PEN);
+ wxBrush brush(m_caretBrush);
+ wxPen pen(m_caretPen);
+ if (m_richTextCtrl && m_richTextCtrl->GetBasicStyle().HasTextColour())
+ {
+ brush = wxBrush(m_richTextCtrl->GetBasicStyle().GetTextColour());
+ pen = wxPen(m_richTextCtrl->GetBasicStyle().GetTextColour());
+ }
+ dc->SetBrush((m_hasFocus ? brush : *wxTRANSPARENT_BRUSH));
+ dc->SetPen(pen);