Print Page | Close Window

Column rectangle after EnsureVisible()

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=17357
Printed Date: 15 May 2024 at 1:34am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Column rectangle after EnsureVisible()
Posted By: rock
Subject: Column rectangle after EnsureVisible()
Date 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());
...



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net