Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - CXTPReportControl with Thread Safe
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPReportControl with Thread Safe

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

Joined: 07 June 2005
Location: United States
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jose5 Quote  Post ReplyReply Direct Link To This Post Topic: CXTPReportControl with Thread Safe
    Posted: 31 January 2011 at 10:38pm
Can You please guide me on
CXTPReportControl Best way to update through another thread
as I'm trying  and it keeps giving me random error and killing the application


thanks Dead

IT WASENT ME!!!
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 01 February 2011 at 2:28am
Hi,

best way is to send message to main thread and let it update/add new record.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1198
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Posted: 01 February 2011 at 2:58am
Originally posted by oleg oleg wrote:

Hi,

best way is to send message to main thread and let it update/add new record.

Sorry,
but SendMessage is performed in caller thread. So to be thread safe PostMessage should be used, or any kind of sync mechanism (critical section, mutex, ...) is necessary.
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017
Back to Top
Jose5 View Drop Down
Groupie
Groupie
Avatar

Joined: 07 June 2005
Location: United States
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jose5 Quote  Post ReplyReply Direct Link To This Post Posted: 01 February 2011 at 4:19am
ok I'm using CXTPReportControl  with XTPReportDataManager->Bind with ADO configuration
the recordset is constantly being updated and the Report control  updating almost real time..
I have a Thread that Senses updates and call Recordset->Requery() Hook that calls CRstEvent::raw_FetchProgress where i refresh the Grid
when I try selecting rows randomly  it kill the app can you please help here
IT WASENT ME!!!
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1198
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Posted: 01 February 2011 at 4:22am
Hi;

Thats exactly the reason why I'm NOT using data binding when threads are used!
It's not transparent enough for me.
So I can't help here...
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017
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.156 seconds.