Click here to Skip to main content
15,914,359 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: programmically calling .exe Pin
brdavid29-Apr-04 7:32
brdavid29-Apr-04 7:32 
GeneralRe: programmically calling .exe Pin
David Crow29-Apr-04 7:50
David Crow29-Apr-04 7:50 
GeneralRe: programmically calling .exe Pin
Navin29-Apr-04 8:16
Navin29-Apr-04 8:16 
GeneralRe: programmically calling .exe Pin
softp_vc30-Apr-04 23:27
softp_vc30-Apr-04 23:27 
GeneralLink Error with DLL Pin
sweep12329-Apr-04 5:42
sweep12329-Apr-04 5:42 
GeneralRe: Link Error with DLL Pin
David Crow29-Apr-04 7:56
David Crow29-Apr-04 7:56 
GeneralRe: Link Error with DLL Pin
sweep12329-Apr-04 21:29
sweep12329-Apr-04 21:29 
Generalsetlocale() only working second time around Pin
BlueShirtPaul29-Apr-04 5:31
BlueShirtPaul29-Apr-04 5:31 
I would welcome some help on this problem (Win32, MFC)...

I wish to ensure some text processing code always executes in the English locale. I have bracketed the code with setlocale() calls as follows:
:
// Native locale code
:
_tsetlocale(LC_ALL, _T("English"));
:
// text processing code, sprintf()s etc.
:
_tsetlocale(LC_ALL, _T("C"));
:
// Native locale code
:
Debugging through this code always shows the setlocale() calls succeeding (returning the selected locale string). However, the first time through, sprintf() floats are incorrectly output in the Native locale format, while the subsequent iterations through this code correctly produce English formatted numbers.
The text processing code exists in a static library written in plain C, while the surrounding code shown above is a C++ DLL linking to the static library.

Any ideas what might be causing this problem and how to solve it?

BlueShirt
GeneralRe: setlocale() only working second time around Pin
Navin29-Apr-04 6:15
Navin29-Apr-04 6:15 
Generalduplicating derived classes Pin
Jerome Conus29-Apr-04 5:28
Jerome Conus29-Apr-04 5:28 
GeneralRe: duplicating derived classes Pin
Nemanja Trifunovic29-Apr-04 5:42
Nemanja Trifunovic29-Apr-04 5:42 
GeneralString Field Pin
Roger H. Art29-Apr-04 4:45
sussRoger H. Art29-Apr-04 4:45 
GeneralRe: String Field Pin
David Crow29-Apr-04 4:52
David Crow29-Apr-04 4:52 
GeneralRe: String Field Pin
Roger H Art29-Apr-04 5:16
sussRoger H Art29-Apr-04 5:16 
GeneralRe: String Field Pin
David Crow29-Apr-04 5:20
David Crow29-Apr-04 5:20 
GeneralCHtmlView resource download Pin
Jason Carter29-Apr-04 4:33
Jason Carter29-Apr-04 4:33 
GeneralCreateNamedPipe and CreateFile on Win98 Pin
Ceri29-Apr-04 3:40
Ceri29-Apr-04 3:40 
GeneralXML library for Visual Studio 6.0 Pin
pankajdaga29-Apr-04 3:26
pankajdaga29-Apr-04 3:26 
GeneralRe: XML library for Visual Studio 6.0 Pin
Anonymous29-Apr-04 6:39
Anonymous29-Apr-04 6:39 
GeneralRe: XML library for Visual Studio 6.0 Pin
pankajdaga29-Apr-04 6:49
pankajdaga29-Apr-04 6:49 
GeneralRe: XML library for Visual Studio 6.0 Pin
Ravi Bhavnani29-Apr-04 10:28
professionalRavi Bhavnani29-Apr-04 10:28 
GeneralRe: XML library for Visual Studio 6.0 Pin
pankajdaga29-Apr-04 11:40
pankajdaga29-Apr-04 11:40 
GeneralTreelist - right click selecting item Pin
Anonymous29-Apr-04 3:02
Anonymous29-Apr-04 3:02 
GeneralRe: Treelist - right click selecting item Pin
Anonymous29-Apr-04 10:20
Anonymous29-Apr-04 10:20 
GeneralRe: Treelist - right click selecting item Pin
thowra29-Apr-04 23:12
thowra29-Apr-04 23:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.