|
true. but that is when u restart the application. save means what ever values that is put in the editbox(dialog2) should appear than the original value(dialog 1)
|
|
|
|
|
Ok for this problem you can use of Registry for save values or use of ini files.
|
|
|
|
|
is there any other way out to store this value in a variable and retrieve this?
|
|
|
|
|
No you want to close your program and open it again,you need to hard for save values not memory.
|
|
|
|
|
Hamid. wrote: No you want to close your program and open it again
Well, but that's not what he wants to do (as far as I understood).
|
|
|
|
|
But he want to uses of these values next time that he will be using of his program.
|
|
|
|
|
You are missing out a lot of information.
What does "get passed" mean?
Is dialog2 the main dialog, and dialog1 is a modal dialog created in a OnSomeButtonPressed call?
Any answer to your question needs to know more about your appilcation. This doesn't sounds like a problem with edit boxes.
Iain.
|
|
|
|
|
let me make it simpler...
i have a splitter control where there are lot of menu items. when i open my application a dialog(dialog1) appears where we have to provide some information. as i told u the edit box is in this dialog.
the value which is entered in the editbox is passed to another editbox in another form(take this as dialog2). that is done. i am able to do this.
now my requirement is when i enter a value in dialog2's editbox it has to get saved in a variable. and if i go to some other sceen and come back to the dialog2 screen the value which i entered should be displayed than the value in the dialog1 editbox. i am not able to do that now. want to know how can i do that.
I hope its clear for everybody.
|
|
|
|
|
If I understand your description, I don't understand where the difficult part is.
What's stopping you from storing the edit text in a CString variable when dialog1 closes? You can send / post a message to dialog2 saying "Hey, reload that edit box with the CString variable!".
Just store the CString in your CDocument and pass a pointer to it to dialog1, 2, 3 or 17.
And if the dialogX's are CFormViews, it's even easier. Just use CDocument::UpdateAllViews.
Good luck,
Iain.
|
|
|
|
|
the difficulty is the original value is displaying all the time. tried ur method. but its not working. i am getting the same value as of dialog1 value.
|
|
|
|
|
OK, I give up.
If the original value is displaying all the time, then that means the dialog isn't closing?
If you're wanting to save the value between times when your program is running, then you've had your answeres.
In your other reply to my last post, you asked "is this the way to do it?". You can answer that for yourself, by trying it. As I no longer know what you want, and you keep changing your question every time you get a reply, then I can't answer.
Good luck,
Iain.
Iain Clarke appearing by Special Request of CPallini.
|
|
|
|
|
i have done something like this
the inital value is
<br />
m_editvalue = pApp1->m_number;<br />
this will send the value from the first dialog to the dialog where there i want the value to be passed(dialog2)
now as per u have told me.
i have made a CString variable
<br />
CString str;<br />
str.Format("%d",m_editvalue);<br />
int value1 = atoi(str);<br />
<br />
now str contains the new value or the value that is there in the editbox of dialog2.
now i have passed this value to the app.
i have made a int variable in app.
<br />
<br />
int appvalue = dialog2.value1; <br />
and i have passed the value back to the dialog2. is this what needs to be done?
|
|
|
|
|
Dear Friends,
I am getting problem in Creating class for Table in Oracle DB. Following steps i have follwed..
1) Created A DSN name in Control pannel- Adminstrative Tool-Data Sources
2) new class, Name it as AA and Base class as CRecordSet - OK
3)In DB Options, ODBC-- DSN Name, Snapshot -- OK
4) Put the password -- ok
5) Here list of tables should be displayed but i cant see any table.. some names are coming but they do not contain the tables which i m searching for..
Can u plz help me out to solve this problem??
Plz ask me if u want any more info..
Megha
|
|
|
|
|
megha_gharote wrote: Can u plz help me out to solve this problem??
When you created the DSN, did it show the available table names?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hello everyone,
I am reading Unknwn.h, and the code logics is a little fuzzy. The QueryInterface, AddRef an Release are all pure virtual methods, right?
thanks advance,
George
|
|
|
|
|
I wish chris to impose a limit on number of questions a member can ask here in a single day.
Seriously though, how come you manage to read so many topics in such short time every day? I see you ask a question in 2-4 hours and each question is on topics that are completely different from one another.
I think I should start to believe that you are a BOT.
Regards,
Vijay.
|
|
|
|
|
We didnt have any limit to ask questions ,but we can learn new things with each question.
|
|
|
|
|
Hamid. wrote: We didnt have any limit to ask questions
And We will not have any limit in future either. I was just kidding when I said Chris should impose limit on the number of questions you can ask in a day.
Hamid. wrote: but we can learn new things with each question.
and that is the only reason why I lurk around here on CP.
Regards,
Vijay.
|
|
|
|
|
Agree, Hamid!
You are a good person like to share learning resources with others.
regards,
George
|
|
|
|
|
Hi Vijay,
I am a real person. I like this forum and programming. Is that enough.
regards,
George
|
|
|
|
|
Thank you.
|
|
|
|
|
Yes.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
Thanks CPallini,
My question is answered.
regards,
George
|
|
|
|
|
There's a really good website full of clever articles, and some are even helpful.
Hint (Begins with "C", and ends with "odeproject".
Have a look under Platforms, Frameworks & Libraries, then COM/COM+, then Beginners.
There are many articles there that explain COM. A good one to start with is a series called "COM in plain C". There are many parts.
Iain.
|
|
|
|
|
Hi Iain,
Thanks for your recommendation.
Iain Clarke wrote: There's a really good website
Which web site do you mean? CodeProject?
regards,
George
|
|
|
|