Click here to Skip to main content
15,909,645 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralMultithreading and the AfxBeginThread(..) func Pin
Rickard Andersson2010-Jan-02 10:36
Rickard Andersson2010-Jan-02 10:36 
GeneralRe: Multithreading and the AfxBeginThread(..) func Pin
Joaquín M López Muñoz10-Jan-02 11:00
Joaquín M López Muñoz10-Jan-02 11:00 
GeneralRe: Multithreading and the AfxBeginThread(..) func Pin
Rickard Andersson2010-Jan-02 11:42
Rickard Andersson2010-Jan-02 11:42 
GeneralRe: Multithreading and the AfxBeginThread(..) func Pin
Nish Nishant10-Jan-02 16:24
sitebuilderNish Nishant10-Jan-02 16:24 
GeneralRe: Multithreading and the AfxBeginThread(..) func Pin
Rickard Andersson2010-Jan-02 20:53
Rickard Andersson2010-Jan-02 20:53 
Generalwierd debug / release error... Pin
l a u r e n10-Jan-02 9:22
l a u r e n10-Jan-02 9:22 
GeneralRe: wierd debug / release error... Pin
Joaquín M López Muñoz10-Jan-02 9:26
Joaquín M López Muñoz10-Jan-02 9:26 
GeneralRe: wierd debug / release error... Pin
l a u r e n10-Jan-02 9:30
l a u r e n10-Jan-02 9:30 
hi again

here is the code for DoCommas() but as i said it works in debug build just not release build ... or at least not all release builds on all machines

<br />
//----------------------------------------------------------------------<br />
// formatting routines<br />
//----------------------------------------------------------------------<br />
bool CBfecApp::DoCommas (_TCHAR *szNumber) <br />
{<br />
	int		idx;<br />
	int		nIntegerLen;<br />
	int		commas,leading;<br />
	_TCHAR	*szP = NULL;<br />
	_TCHAR	szDecimals[10];<br />
	_TCHAR	szInteger[30];<br />
<br />
<br />
	if (szNumber[0] == '-')<br />
		szNumber++;<br />
<br />
	_tcscpy(szInteger,szNumber);<br />
<br />
	// split number first<br />
	if ((szP = _tcschr(szInteger,'.')) != NULL){<br />
		_tcscpy(szDecimals,szP);<br />
		*szP = (int)0;<br />
	}<br />
<br />
	nIntegerLen = _tcslen(szInteger);<br />
	if (nIntegerLen < 4)<br />
		return true;<br />
<br />
	commas = (nIntegerLen - 1) / 3;<br />
	leading = nIntegerLen - (commas * 3);<br />
<br />
	szNumber[leading] = (int)0;<br />
<br />
	for (idx = 0; idx < commas; idx++){<br />
		_tcscat(szNumber,_T(","));<br />
		_tcsncat(szNumber,szInteger + leading,3);<br />
		leading += 3;<br />
	}<br />
<br />
	if (szP != NULL)<br />
		_tcscat(szNumber,szDecimals);<br />
<br />
	return true;<br />
}<br />





---
"every year we invent better idiot proof systems and every year they invent better idiots ... and the linux zealots still aren't being sterilized"
GeneralRe: wierd debug / release error... Pin
Joaquín M López Muñoz10-Jan-02 9:41
Joaquín M López Muñoz10-Jan-02 9:41 
GeneralRe: wierd debug / release error... Pin
l a u r e n10-Jan-02 9:46
l a u r e n10-Jan-02 9:46 
GeneralRe: wierd debug / release error... Pin
Ernest Laurentin10-Jan-02 10:49
Ernest Laurentin10-Jan-02 10:49 
GeneralRe: wierd debug / release error... Pin
Tim Smith10-Jan-02 9:57
Tim Smith10-Jan-02 9:57 
GeneralRe: wierd debug / release error... Pin
l a u r e n10-Jan-02 9:58
l a u r e n10-Jan-02 9:58 
GeneralRe: wierd debug / release error... Pin
Joaquín M López Muñoz10-Jan-02 10:08
Joaquín M López Muñoz10-Jan-02 10:08 
GeneralRe: wierd debug / release error... Pin
l a u r e n10-Jan-02 10:55
l a u r e n10-Jan-02 10:55 
GeneralRe: wierd debug / release error... Pin
Joaquín M López Muñoz10-Jan-02 11:13
Joaquín M López Muñoz10-Jan-02 11:13 
GeneralRe: wierd debug / release error... Pin
Michael Dunn10-Jan-02 13:06
sitebuilderMichael Dunn10-Jan-02 13:06 
GeneralEnumWindows and EnumWindowsProc Pin
RobJones10-Jan-02 9:08
RobJones10-Jan-02 9:08 
GeneralRe: EnumWindows and EnumWindowsProc Pin
Joaquín M López Muñoz10-Jan-02 9:36
Joaquín M López Muñoz10-Jan-02 9:36 
GeneralRe: EnumWindows and EnumWindowsProc Pin
Ernest Laurentin10-Jan-02 10:20
Ernest Laurentin10-Jan-02 10:20 
GeneralRe: EnumWindows and EnumWindowsProc Pin
2-Feb-02 13:37
suss2-Feb-02 13:37 
Generalstupid VC++ 7 error... Pin
Mario M.10-Jan-02 8:15
Mario M.10-Jan-02 8:15 
GeneralRe: stupid VC++ 7 error... Pin
Nemanja Trifunovic10-Jan-02 8:36
Nemanja Trifunovic10-Jan-02 8:36 
GeneralRe: stupid VC++ 7 error... Pin
Mario M.10-Jan-02 8:43
Mario M.10-Jan-02 8:43 
GeneralRe: stupid VC++ 7 error... Pin
James R. Twine10-Jan-02 8:52
James R. Twine10-Jan-02 8:52 

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.