Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Everyone,

How to get two input in a single Edit Box in VC++ in Visual Studio 2005
Its like getting an input from Edit Box(Divident) and second input(Divisor) in single Function.I have written a code which is not working i have tried many ways......

C#
void CCalciDlg::OnBnClickedCbuttondiv()
{
    double a,b;
    resu.SetFocus();
    UpdateData(TRUE);
    a=num1;      //num1 is the Edit Box Resource
    resu.SetFocus();
    a=num;
    UpdateData(TRUE);
    resu.SetFocus();
    b=num1;
    num=a/b;
    
}


This Code Taking Both a and b as the same......
Posted
Updated 30-Oct-11 19:30pm
v2

1 solution

If you need to retrieve multiple values from a string (the edit box content) then (supposing it is possible, i.e. there are value separators) you have to parse it (see, for instance Parsing_expression_grammar[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900