Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Troubles with CXTPReportControlLocale::RefreshActi
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Troubles with CXTPReportControlLocale::RefreshActi

 Post Reply Post Reply
Author
Message
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 Topic: Troubles with CXTPReportControlLocale::RefreshActi
    Posted: 23 December 2006 at 6:12pm
Hi;
 
after migrating to toolkit version 10.4 we got troubles with all of our language independant conversion functions. After a few minutes of debugging I found out that the CXTPReportControl ctor calls CXTPReportControlLocale::RefreshActiveLCID(); that further calls _tsetlocale() with the currently selected user locales.
 
This breaks most of our existing formatting and conversion code because the code depends on "C" locale.
 
Is it possible to change and/or switch off this - unwanted - behaviour without creating a bunch of new classes?
 
Thanks in advance
 
Martin
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 25 December 2006 at 7:41am
Hi,

Well, agree that this is a problem -- we'll remove _tsetlocale calls for future versions and correct all the related code.

To avoid a problem for now, you can simply comment the body of RefreshActiveLCID() and rebuild the toolkit.

--
WBR,
Serge
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: 28 December 2006 at 6:46am
Hi Serge;
 
Does this change have any adverse effect on existing code? Where, what??
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
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 29 December 2006 at 4:10am
Hi,

_tsetlocale() was used to set locale other than English for date/time formating (COleDateTime::Format).
 
You can easily avoid this by overriding some methods like GetCaption().
 
_tsetlocale() call was actually added as an improvement, but unfortunately it appeared to raise the issue instead.

It is safe to comment it.
 
For future versions we'll use another localized formating methods instead of _tsetlocale and COleDateTime::Format.

--
WBR,
Serge
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: 29 December 2006 at 4:14am
Hi Serge,
Thanks for your comments!
BTW I like the toolkit and its stability...
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.125 seconds.