Click here to Skip to main content
15,913,685 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Which Database? Pin
Bob Stanneveld18-Jul-05 21:15
Bob Stanneveld18-Jul-05 21:15 
Questionhow to do an isnumeric Pin
neodeaths18-Jul-05 15:18
neodeaths18-Jul-05 15:18 
AnswerRe: how to do an isnumeric Pin
Ryan McDermott18-Jul-05 15:30
Ryan McDermott18-Jul-05 15:30 
AnswerRe: how to do an isnumeric Pin
Christian Graus18-Jul-05 15:49
protectorChristian Graus18-Jul-05 15:49 
GeneralRe: how to do an isnumeric Pin
Bob Stanneveld18-Jul-05 21:19
Bob Stanneveld18-Jul-05 21:19 
GeneralRe: how to do an isnumeric Pin
Christian Graus19-Jul-05 10:29
protectorChristian Graus19-Jul-05 10:29 
GeneralRe: how to do an isnumeric Pin
Bob Stanneveld19-Jul-05 20:09
Bob Stanneveld19-Jul-05 20:09 
AnswerRe: how to do an isnumeric Pin
Jack Puppy18-Jul-05 16:11
Jack Puppy18-Jul-05 16:11 
I found this in one of my old libraries. Ignore the CHECK, it's an internal macro.

/// Determines if a string is numeric
/// @param lpszText Text to determine numericy of
/// @param bSigned Determines if the function tests against signed or unsigned
/// numbers
/// @param nBase Numeric base to test against
/// @return True if the string is numeric, false if not
BOOL AfxIsNumeric(LPCTSTR lpszText, BOOL bSigned, int nBase)
{
        CHECK(lpszText != NULL, FALSE);

	// Convert the text to a number using the appropriate sign oriented
	// function
	LPTSTR lpszEndPtr = NULL;
	
	if (bSigned)
        _tcstoi64(lpszText, &lpszEndPtr, nBase);
    else
        _tcstoui64(lpszText, &lpszEndPtr, nBase);        
    
	// If the end pointer points to the null terminator, and it doesn't point to
	// the start of the text, (which would occur on an empty string) it's a
	// valid number
	return ((lpszEndPtr != lpszText) && (*lpszEndPtr == _T('\0')));
}



Suspicious | :suss: Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!

Painted on the side of a dog trainer's van: SIT HAPPENS

AnswerRe: how to do an isnumeric Pin
Jose Lamas Rios18-Jul-05 16:15
Jose Lamas Rios18-Jul-05 16:15 
GeneralChange socket server Pin
bsurma18-Jul-05 13:00
bsurma18-Jul-05 13:00 
GeneralOCX to DLL Pin
maskeen18-Jul-05 12:28
maskeen18-Jul-05 12:28 
GeneralRe: OCX to DLL Pin
Jose Lamas Rios18-Jul-05 16:20
Jose Lamas Rios18-Jul-05 16:20 
GeneralRe: OCX to DLL Pin
Anonymous18-Jul-05 17:06
Anonymous18-Jul-05 17:06 
Generalservices Pin
Shotgun18-Jul-05 9:36
Shotgun18-Jul-05 9:36 
GeneralRe: services Pin
David Crow18-Jul-05 10:03
David Crow18-Jul-05 10:03 
GeneralRe: services Pin
Graham Bradshaw18-Jul-05 11:57
Graham Bradshaw18-Jul-05 11:57 
QuestionAnyone know how to find USB to Serial ports? Pin
JohnnyG18-Jul-05 9:19
JohnnyG18-Jul-05 9:19 
AnswerRe: Anyone know how to find USB to Serial ports? Pin
Bob Stanneveld18-Jul-05 21:25
Bob Stanneveld18-Jul-05 21:25 
GeneralRe: Anyone know how to find USB to Serial ports? Pin
JohnnyG19-Jul-05 3:19
JohnnyG19-Jul-05 3:19 
GeneralRe: Anyone know how to find USB to Serial ports? Pin
Bob Stanneveld19-Jul-05 20:00
Bob Stanneveld19-Jul-05 20:00 
GeneralHelp with DateTime() Pin
Lagwagon5618-Jul-05 7:16
Lagwagon5618-Jul-05 7:16 
GeneralRe: Help with DateTime() Pin
Michael Dunn18-Jul-05 7:46
sitebuilderMichael Dunn18-Jul-05 7:46 
GeneralRe: Help with DateTime() Pin
Lagwagon5618-Jul-05 7:53
Lagwagon5618-Jul-05 7:53 
GeneralIsWindow Pin
Larsson18-Jul-05 6:11
Larsson18-Jul-05 6:11 
GeneralRe: IsWindow Pin
Jose Lamas Rios18-Jul-05 6:49
Jose Lamas Rios18-Jul-05 6:49 

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.