Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Turn off Row Focus Alltogether
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Turn off Row Focus Alltogether

 Post Reply Post Reply
Author
Message
Kurisu View Drop Down
Newbie
Newbie


Joined: 28 February 2007
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kurisu Quote  Post ReplyReply Direct Link To This Post Topic: Turn off Row Focus Alltogether
    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.
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 09 July 2007 at 5:06pm
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;
};
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.154 seconds.