Turn off Row Focus Alltogether |
Post Reply |
Author | |
Kurisu
Newbie Joined: 28 February 2007 Status: Offline Points: 9 |
Post Options
Thanks(0)
Posted: 08 July 2007 at 7:02am |
Howdy,
I thought I had done this before, but can't seem to find it again in the ReportControl or PaintManager. I just want to disable row highlight selection/focus when the user tries to click a row in my ReportControl. |
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
Here is a start:
/////////////////////////////
#pragma once
class CSolidFocusPaintManager : public CXTPReportPaintManager
{ public: CSolidFocusPaintManager(COLORREF textColor = 0x0, COLORREF backColor = 0xFFFFFF, COLORREF focusColor = 0x0) { m_textColor = textColor; m_backColor = backColor; m_focusColor = focusColor; m_brush.CreateSolidBrush(focusColor);
} virtual ~CSolidFocusPaintManager() {} virtual void DrawFocusedRow(CDC* pDC, CRect rcRow)
{ COLORREF clrTextColor = pDC->SetTextColor(m_textColor); COLORREF clrBkColor = pDC->SetBkColor(m_backColor); pDC->FrameRect(rcRow, &m_brush); pDC->SetTextColor(clrTextColor); pDC->SetBkColor(clrBkColor); } protected:
CBrush m_brush; COLORREF m_textColor; COLORREF m_backColor; COLORREF m_focusColor; }; |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |