Click here to Skip to main content
15,902,911 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRandom numbers [modified] Pin
gordon305629-Jun-08 19:04
gordon305629-Jun-08 19:04 
GeneralRe: Random numbers Pin
«_Superman_»29-Jun-08 19:16
professional«_Superman_»29-Jun-08 19:16 
GeneralRe: Random numbers Pin
gordon305629-Jun-08 19:24
gordon305629-Jun-08 19:24 
GeneralRe: Random numbers Pin
_AnsHUMAN_ 29-Jun-08 19:19
_AnsHUMAN_ 29-Jun-08 19:19 
QuestionNumber property(Use only digits) of EditBox. Pin
Le@rner29-Jun-08 18:46
Le@rner29-Jun-08 18:46 
AnswerRe: Number property(Use only digits) of EditBox. Pin
Naveen29-Jun-08 19:10
Naveen29-Jun-08 19:10 
GeneralRe: Number property(Use only digits) of EditBox. Pin
Le@rner29-Jun-08 19:44
Le@rner29-Jun-08 19:44 
GeneralRe: Number property(Use only digits) of EditBox. Pin
MANISH RASTOGI29-Jun-08 20:35
MANISH RASTOGI29-Jun-08 20:35 
void CNumericEdit::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
{
char szBuffer[100] = {0};
short int nCounter = 0;
short int iTemp = 0;
int iStartChar = 0;
int iEndChar = 0;

if(nChar == '-')
{
return;
}

if(nChar != VK_BACK && nChar != VK_TAB)
{
if(nChar != '.' && (nChar < '0' || nChar > '9'))
{
return;
}

GetWindowText(szBuffer, sizeof(szBuffer));

if(nChar == '.')
{
GetSel(iStartChar, iEndChar);

if(iStartChar != 0 || iEndChar != static_cast<int>(strlen(szBuffer)))
{
for(nCounter = 0; szBuffer[nCounter] != NULL; nCounter++)
{
if(szBuffer[nCounter] == '.')
{
return;
}
}
}
}
}

CEdit::OnChar(nChar, nRepCnt, nFlags);
}
GeneralRe: Number property(Use only digits) of EditBox. Pin
Le@rner29-Jun-08 20:44
Le@rner29-Jun-08 20:44 
GeneralRe: Number property(Use only digits) of EditBox. Pin
MANISH RASTOGI30-Jun-08 2:08
MANISH RASTOGI30-Jun-08 2:08 
GeneralRe: Number property(Use only digits) of EditBox. Pin
Le@rner30-Jun-08 2:12
Le@rner30-Jun-08 2:12 
GeneralRe: Number property(Use only digits) of EditBox. Pin
MANISH RASTOGI30-Jun-08 2:24
MANISH RASTOGI30-Jun-08 2:24 
GeneralRe: Number property(Use only digits) of EditBox. Pin
Le@rner30-Jun-08 19:38
Le@rner30-Jun-08 19:38 
AnswerRe: Number property(Use only digits) of EditBox. Pin
Iain Clarke, Warrior Programmer30-Jun-08 2:13
Iain Clarke, Warrior Programmer30-Jun-08 2:13 
QuestionRe: Number property(Use only digits) of EditBox. Pin
David Crow30-Jun-08 3:11
David Crow30-Jun-08 3:11 
Questionthree questions about CoInitialize/CoUninitialize Pin
George_George29-Jun-08 17:36
George_George29-Jun-08 17:36 
AnswerRe: three questions about CoInitialize/CoUninitialize Pin
Naveen29-Jun-08 17:44
Naveen29-Jun-08 17:44 
GeneralRe: three questions about CoInitialize/CoUninitialize Pin
George_George29-Jun-08 18:02
George_George29-Jun-08 18:02 
GeneralRe: three questions about CoInitialize/CoUninitialize Pin
Naveen29-Jun-08 18:35
Naveen29-Jun-08 18:35 
GeneralRe: three questions about CoInitialize/CoUninitialize Pin
George_George29-Jun-08 18:44
George_George29-Jun-08 18:44 
AnswerRe: three questions about CoInitialize/CoUninitialize Pin
Hamid_RT30-Jun-08 19:00
Hamid_RT30-Jun-08 19:00 
GeneralRe: three questions about CoInitialize/CoUninitialize Pin
George_George30-Jun-08 19:03
George_George30-Jun-08 19:03 
Questiondata type that is efficient for both 32-bit and 64-bit cpu Pin
followait29-Jun-08 17:24
followait29-Jun-08 17:24 
AnswerRe: data type that is efficient for both 32-bit and 64-bit cpu Pin
Naveen29-Jun-08 17:41
Naveen29-Jun-08 17:41 
GeneralRe: data type that is efficient for both 32-bit and 64-bit cpu Pin
followait29-Jun-08 19:02
followait29-Jun-08 19:02 

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.