Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Column rectangle after EnsureVisible()
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Column rectangle after EnsureVisible()

 Post Reply Post Reply
Author
Message Reverse Sort Order
rock View Drop Down
Groupie
Groupie


Joined: 27 October 2005
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote rock Quote  Post ReplyReply Direct Link To This Post Topic: Column rectangle after EnsureVisible()
    Posted: 30 September 2010 at 3:32pm
I've created a custom report header (CXTPReportHeader) for a report control that allows me to do something other than the default when clicking on a column header.  When clicking on a partial column, I need the column to be visible.  Calling either function CXTPReportColumn::EnsureVisible() or CXTPReportControl::EnsureVisible() work fine, but the CRect for the CXTPReportColumn remains unchanged after calling either EnsureVisible() function.  I've tried calling CXTPReportControl::RedrawControl() after EnsureVisible() but the CRect remains unchanged.  I've looked through the CXTPReportColumn, CXTPReportColumns, and CXTPReportControl classes and did not see any relevant functions for updating the column rectangle.  Is there a way to update the CRect for the CXTPReportColumn class?
 
The code for my CXTPReportHeader class for OnLButtonUp is:
 
void CMyColumnHeader::OnLButtonUp(UINT nFlags, CPoint ptClick)
{
CXTPReportColumn *pCol = HitTest(ptClick);
if (pCol)
{
pCol->EnsureVisible();
// CRect unchanged whether or not either of the next 2 lines are called
GetControl()->RedrawControl();
pCol = GetControl()->GetColumns()->GetAt(pCol->GetIndex()); 
CRect rc(pCol->GetRect());
...
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.109 seconds.