Click here to Skip to main content
15,888,113 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
in a VC++ program, I want to take a value (for example an integer by an edit control in a dialog) from user and then process it throughout the program, showing in all other dialogs so that I can get this and conclusion where and when I want.
It would be appreciated if you explain clearly and I am grateful to you if your explanation is accompanied by an example (code).

What I have tried:

I try to define a public variable, but I don't know where I can do it!
Posted
Updated 25-Apr-23 1:11am
Comments
Dave Kreskowiak 25-Apr-23 9:46am    
That "question" describes every single application ever written. There is no way anyone can explain to you what you want to do because you haven't described what you want to do in any detail what-so-ever.

Seriously, you need to pick up a book or two on C++ and start working through them.
Member 15974928 26-Apr-23 1:09am    
my question is very clear. when we don't know something or we can't help someone, it's better to say nothing. It's strongly suggested.

1 solution

This is much the same issue as yesterday's question at In VC++, how can I get the value of a variable from a dialog to another one?[^]. And you still have not provided any clue as to what your code is doing, or trying to do.
 
Share this answer
 
Comments
Member 15974928 26-Apr-23 1:34am    
Yes! both question come from one problem. I seriously can't figure out why my question is vague for someone who is supposed to be a pro in VC++. however, I try to explain what my problem is. I define a dialog named A and another named B.in dialog A, I have an Edit Control that get an input (a value can be for example int, double or ...) from user.I save this in a variable by using UpdateData(). definitely, this variable is known just in dialog A. now, I want to transfer and use value saved in this variable to dialog B. simply, I want to show this on dialog B. well, how can I do this? in other words, how can I use and call it throughout a program.
I hope that I could explain my problem well and I profoundly hope that you help me.
Richard MacCutchan 26-Apr-23 3:27am    
Well that is just a repeat of your original questioon, and the answer is, "pass the variable to the other dialog". Now perhpas you can understand that vague statements are meaningless.

We have no idea how your code is put together or what relationship exists between the two dialogs, or even if they exist at the same time. So please use the Improve question link above, and add complete details including the actual code that you are referring to.
Member 15974928 26-Apr-23 3:44am    
Tanks a lot! I seem to have visited the wrong page...
Richard MacCutchan 26-Apr-23 3:54am    
No, you seem to be incapable of asking a proper question.

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