Click here to Skip to main content
15,905,325 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionInteresting quiz [modified] Pin
LiYS1-Jul-08 15:32
LiYS1-Jul-08 15:32 
AnswerRe: Interesting quiz Pin
Stephen Hewitt1-Jul-08 15:54
Stephen Hewitt1-Jul-08 15:54 
GeneralRe: Interesting quiz Pin
LiYS1-Jul-08 16:54
LiYS1-Jul-08 16:54 
AnswerRe: Interesting quiz Pin
Luc Pattyn1-Jul-08 16:26
sitebuilderLuc Pattyn1-Jul-08 16:26 
AnswerRe: Interesting quiz Pin
Stephen Hewitt1-Jul-08 17:29
Stephen Hewitt1-Jul-08 17:29 
AnswerRe: Interesting quiz Pin
David Crow2-Jul-08 5:35
David Crow2-Jul-08 5:35 
AnswerRe: Interesting quiz Pin
Iain Clarke, Warrior Programmer3-Jul-08 0:00
Iain Clarke, Warrior Programmer3-Jul-08 0:00 
QuestionDialog Box Variable Pin
bkelly131-Jul-08 12:22
bkelly131-Jul-08 12:22 
Environment: Windows XP, Visual Studio 2008, C++
Someone gave me a tip about getting a value from a dialog edit box. It gets me almost there, but not quite. Here is what I did:

Create an edit box in a dialog.
Right click on it and select “Add Variable”
The field named Category has the selections Control and Value.
Open the drop down and pick Value.
The field Variable type has changed to CString, and it has a pull down.

Open the pull down and from the options, select double.
In the variable name field enter: edit_double.
Back in the code, write this:
double temp;
temp = edit_double;

The compiler accepts it, links it, and runs it. I don’t have edit_double declared anywhere so it must be a valid variable, but the value is zero regardless of what I edit into the box.

What have I overlooked? What do I need to do to enter “1.12” or “1.2e4” into the dialog box and get the expected value in temp?

Thanks for your time

AnswerRe: Dialog Box Variable Pin
Saurabh.Garg1-Jul-08 15:04
Saurabh.Garg1-Jul-08 15:04 
GeneralRe: Dialog Box Variable Pin
bkelly131-Jul-08 15:21
bkelly131-Jul-08 15:21 
GeneralRe: Dialog Box Variable Pin
Saurabh.Garg1-Jul-08 16:32
Saurabh.Garg1-Jul-08 16:32 
GeneralRe: Dialog Box Variable Pin
cp98761-Jul-08 17:02
cp98761-Jul-08 17:02 
QuestionRe: Dialog Box Variable Pin
David Crow2-Jul-08 5:39
David Crow2-Jul-08 5:39 
AnswerRe: Dialog Box Variable Pin
bkelly133-Jul-08 15:03
bkelly133-Jul-08 15:03 
QuestionRe: Dialog Box Variable Pin
David Crow4-Jul-08 5:37
David Crow4-Jul-08 5:37 
AnswerRe: Dialog Box Variable Pin
bkelly134-Jul-08 5:51
bkelly134-Jul-08 5:51 
GeneralRe: Dialog Box Variable Pin
David Crow4-Jul-08 9:23
David Crow4-Jul-08 9:23 
AnswerRe: Dialog Box Variable Pin
cp98761-Jul-08 15:33
cp98761-Jul-08 15:33 
AnswerRe: Dialog Box Variable Pin
Nelek3-Jul-08 21:54
protectorNelek3-Jul-08 21:54 
GeneralRe: Dialog Box Variable Pin
bkelly134-Jul-08 4:19
bkelly134-Jul-08 4:19 
QuestionA class method definition in a header file... just one problem. Pin
Tomasz Morawski1-Jul-08 11:33
Tomasz Morawski1-Jul-08 11:33 
AnswerRe: A class method definition in a header file... just one problem. Pin
Bram van Kampen1-Jul-08 12:01
Bram van Kampen1-Jul-08 12:01 
GeneralRe: A class method definition in a header file... just one problem. Pin
Stephen Hewitt1-Jul-08 13:58
Stephen Hewitt1-Jul-08 13:58 
GeneralRe: A class method definition in a header file... just one problem. Pin
Bram van Kampen1-Jul-08 14:55
Bram van Kampen1-Jul-08 14:55 
GeneralRe: A class method definition in a header file... just one problem. Pin
Tomasz Morawski1-Jul-08 18:23
Tomasz Morawski1-Jul-08 18:23 

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.