Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Changed behaviour of Populate method
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Changed behaviour of Populate method

 Post Reply Post Reply
Author
Message
apautrot View Drop Down
Groupie
Groupie
Avatar

Joined: 16 April 2009
Location: France
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote apautrot Quote  Post ReplyReply Direct Link To This Post Topic: Changed behaviour of Populate method
    Posted: 24 August 2012 at 4:46am
Hi, since we changed our version to the 15.31 we now have this different behavior : Populate method now call a selection clear that ends in a notification to the listener of the message XTP_NM_REPORT_SELCHANGED. This was not the case with the previous version we used, the 15.13.

We have to embrace our code with a lock counter to avoid reacting to selection change notification.

selectionLockCount++;
_report.Populate();
selectionLockCount--;

void OnSelectionChanged(NMHDR* pNotifyStruct, LRESULT* pResult)
{
if  (selectionLockCount == 0)
{
...
}
}

Hope that knowing that might help other programmers.


Win 7 x64
VS 2008
CJ 15.13

Back to Top
Luza View Drop Down
Newbie
Newbie
Avatar

Joined: 30 November 2007
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Luza Quote  Post ReplyReply Direct Link To This Post Posted: 16 November 2012 at 11:51am
I changed to 15.3.1 from 13.3.1 just now.

Have the same problem. App crashes because of this call.
I use a CXTPReportView which has a CXTPReportControl.
I do not derive from CXTPReportControl so i can not use your solution.

I looked at the added functionality in the Populate function and i see some added Behavior functions?!

Just added this after creating the CXTPReportView.

//m_pProjectTreeView is derived from CXTPReportView.
// Obtain the target report
//CXTPReportControl* CProjectTreeView::GetTargetReport()
//{
//   return &(GetReportCtrl());
//}

  m_pProjectTreeView->GetTargetReport()->GetBehavior()->Notifications->Populate->bSelectionChanged = false;


This will do the trick. Smile

I do not know what GetBehavior()->Notifications->Populate->bSelectionChanged does.
But as far as i can tell everything works just fine when its false.Wacko



Product: ToolKit Pro SDK 15.3.1
Platform: Windows 7 SP1
Language: Visual C++
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1201
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Posted: 20 November 2012 at 1:12pm
Hi;

Have you tried to set

CXTPReportControl::m_bInitialSelectionEnable=FALSE;


Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022
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.188 seconds.