Column rectangle after EnsureVisible() |
Post Reply |
Author | |
rock
Groupie Joined: 27 October 2005 Status: Offline Points: 19 |
Post Options
Thanks(0)
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());
...
|
|
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 |