saving history of edit box and dispalying again

hello,
        I am buliding a  dialog based  appication in which i pop up another 
modal dialog.What i want that when user enters value in the dit box of the 
second dialog,and we click OK then becaus ef UpdateData(TRUE) all the valuse 
from controls are transferred to the varaibles..Now if we close the dialog 
and reopen it again i want that the old set values ahould be diaplayed in the 
respective edit boxes of the dialog,so that user will now what values he had 
set initially.Can we do this?
please tell me how?
           
0
sayu (83)
8/1/2005 4:42:03 AM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
523 Views

Similar Articles

[PageSpeed] 46

You'll have to save the values in the parent dialog and each time the child 
dialog is popped up, you'll need to init the child dialog variables using 
the save data. Something like :-

CDialog child;
....
....
child.somevar1 = somevar1;
child.somevar2 = somevar2;
if(child.DoModal() == IDOK)
{
    somevar1 = child.somevar1;
    somevar2 = child.somevar2;
}

and in child's OnInitDialog, do something like this :-

m_somecontrol1.SetWindowText(somevar1);
m_somecontrol2.SetWindowText(somevar2);

-- 
Regards,
Nish [VC++ MVP]
http://www.voidnish.com
http://blog.voidnish.com


"sayu" <sayu@discussions.microsoft.com> wrote in message 
news:D99BBADD-F2DD-4106-956F-AF6547DB3015@microsoft.com...
> hello,
>        I am buliding a  dialog based  appication in which i pop up another
> modal dialog.What i want that when user enters value in the dit box of the
> second dialog,and we click OK then becaus ef UpdateData(TRUE) all the 
> valuse
> from controls are transferred to the varaibles..Now if we close the dialog
> and reopen it again i want that the old set values ahould be diaplayed in 
> the
> respective edit boxes of the dialog,so that user will now what values he 
> had
> set initially.Can we do this?
> please tell me how?
> 


0
nish (347)
8/1/2005 6:09:02 AM
if you do not Destructe the dialog instance, just save the values in
the child.m_somevar1/2 is ok, no external somevar1/2 is needed.

0
realfun (4)
8/1/2005 8:08:19 AM
if you do not Destruct the dialog instance, just save the values in the
child.m_somevar1/2 is ok, no external somevar1/2 is needed.

0
realfun (4)
8/1/2005 8:08:25 AM
Reply:

Similar Artilces:

Floating Text Box in Excel 2K3/2K7
I am wanting to create a floating text box in Excel 2003/2007 but am currently stuck. The idea is that I will be able lock a text box with a few bullet points in the top right of the screen and that it will remain visible in that position regardless of where I scroll in the worksheet. Locking cells instead, or using Headers/Footers is not an option here. For this purpose, the text box has a name of "Box". I found this code online (along with several other examples) and replaced the name of the text box with my own, but could not get it (or any other example) to work. T...

Auto Save & Temp Files
Hi, I am running Microsoft Office 2003 on windows Xp. I took my laptop home from work and still had a document open and carried on working on it. However, i obviously lost the connection from the office. When i went to save it in My Docs something happened and lost the file. Will there be an autosave version in a tempoary file? Anyone Help? Thanks David In article <44CDEEAB-5CDD-4425-A1C8-599B45589E97@microsoft.com>, David Harrison wrote: > Hi, I am running Microsoft Office 2003 on windows Xp. > > I took my laptop home from work and still had a document...

XML Editing,inserting and deleting Question
I have a XML file which is formed ! And its used with a treeView menu control. But the thing is that the TREEVIEW hasn't got a constant hieracrchy structure! which is difficult to Edit,insert or update! Whats the best way to provide such functionality for a XML that isn't well structured! My xml looks like this:- <?xml version="1.0" encoding="utf-8"?> <TREENODES> <TreeNode Text="Contract"> <TreeNode Text="Test" NavigateUrl="a.aspx" target="_blank"/> <TreeNode Text="" Navigat...

can't save contact information
Some contacts e-mailed me their contact information and when i click on save and close, it doesn't save it. I even made up a mock one and sent it to myself, deleted it form my contact folder and tried to save and close it and it didn't save. What am I doing wrong? Any help is appreciated. Try dragging the contact to a folder or using File | Copy to Folder = instead.=20 --=20 Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for=20 Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Peter McCaul&quo...

Saved Views #2
Hi there, Is there any way to give System Administrators rights to see all saved views both system and user created? I see in the security settings for the Sys Admin you are not able to edit or modify the rights. Even clicking on the permissions level only changes it to none selected. Is there any way to get around this? Thanks - Jason ------=_NextPart_0001_29D3806C Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi Jason, Thanks for posting in. This is Ken in Online Partner Support. As you may notice, saved view is owned by each user and the other users are not able to s...

does Exchange save user contacts in the database?
I just have a simple question. Contacts that are in the user's mailbox and not in the global address list, do those get saved to the database? for example, if I had to restore a user's mailbox, would those contacts be there? On Tue, 7 Nov 2006 09:27:01 -0800, Gilbert <Gilbert@discussions.microsoft.com> wrote: >I just have a simple question. Contacts that are in the user's mailbox and >not in the global address list, do those get saved to the database? > >for example, if I had to restore a user's mailbox, would those contacts be >there? Yes. On ...

Can I unsave a spreadsheet once it has been saved
I just overwrote a very important list. I had to many files open at one time Hi April, Unfortunately, unless you have a backup or other copy (email attachment?), you are out of luck --- Regards, Norman "April_Presidion" <April_Presidion@discussions.microsoft.com> wrote in message news:83738A14-7E8E-4479-B580-172A32CC946C@microsoft.com... >I just overwrote a very important list. I had to many files open at one >time ...

Check Box linked cell offset
Hi All, How do I code excel to offset the cursor by 1 cell to the right from a Check Box after it has been "ticked" by the existing macro? -- Tracey @ BrisVegas Hi Tracey maybe Target.Offset(0 , 1).Activate -- Regards Roger Govier "Tracey" <Tracey@discussions.microsoft.com> wrote in message news:2E31C4C1-2ACC-4AE9-878E-9FAE7D6741DE@microsoft.com... > Hi All, > > How do I code excel to offset the cursor by 1 cell to the right from a > Check > Box after it has been "ticked" by the existing macro? > > -- ...

How can I erase previously typed text in a box?
I have typed text in various columns. I am needing to change the text in a particular box. When i erase it it still shows in a lighter form? How can i get rid of it so that I can retype in the box? specialevents wrote: > I have typed text in various columns. I am needing to > change the text in a particular box. When i erase it it > still shows in a lighter form? How can i get rid of it so > that I can retype in the box? ======================== What's the name and version of the program you are using? What happens if you...left click / drag... your cursor across the unwa...

editing stationary in Outlook Express
When I go to new messge using and click on select stationary then I select one and click on edit it says " This file does not have a program associated with it for performing this action. Create an association in my computer by clicking view then folder options". I did this 100 times and I still cannot edit it. What do you do when you get to folder options? Would someone please help? This newsgroup is for support of Outlook 97-2003 from the Office family for Windows PCs. For Outlook Express (OE) support try posting in one of these newsgroups: microsoft.public.inetexplorer...

Combo Box Drop-down list is based on specific data
I have a table (ASSIGNEES), which has four columns (ID, ASSIGN-NAMES, EMAILADDRESS, DEPARTMENT). I need to set up a combo box that only shows the names associated with a specific department when I click on the drop-down arrow. For example, anyone with a department of MGT will not show in the drop-down selection and anyone with a department of ENG will show up. Thank you in advance for your help. Linda You put the criteria in the query that you create in the record source. So in the query, reference the control on the form that has the department you want (or don't want) to s...

error message when saving file
I received error message when I try to save file in Publisher. The message is: Publisher cannot launch or communicate with the OLE server program needed to complete this task. There may not be enough disk space, or there may be a problem with the server program. To make more disk space available , deleted some unneeded files on your hard disk. If you suspect a problem with the server program, try reinstall it. Then try the task again. Our IT checked my computer and he said there is plenty of memories left. Please help! -- janet What version Publisher? -- Mary Sauer MSFT MVP http:/...

getting old info after saving
If someone changed info in a file and saved it, is there any way to get back the old info? Hi Jacob Unless you have a backup somewhere I'm afraid you're out of luck. Check with your MIS folks, if they do a nightly back up of your data files on the system, they may have the copy from the previous day. >-----Original Message----- >If someone changed info in a file and saved it, is there any way to get back >the old info? > > >. > ...

Saving files onto a network under Win XP
Hi, I've got a bit of a strange problem. We've just moved a users files onto the network and they are now unable to save Microsoft Publisher files. The permissions are correct as they can save excel, word files etc into the same directory but when you try saving publisher it says that the disk is full when it isn't. Thanks Jim wrote: > Hi, > > I've got a bit of a strange problem. We've just moved a users files > onto the network and they are now unable to save Microsoft Publisher > files. The permissions are correct as they can save excel, word files...

saving a report to a text file without decimals
I have a report that needs to be exported to a text file in a specific format without decimal places. It's a list of checks for reconciliation purposes. In Access, I have created the report. Currently what the client is doing is opening the report, taking it to word, using replace to get rid of the decimal places, then saving it as a text file to email to the bank. I would like to automate the process so that it save sot a specific folder ready to be uploaded. I have a couple of problems... I don't know how to get rid of the decimal points within Access The only way...

IV30200
is this the only table that keep item movement? I am working on a report where user will state a date range, say date1 and date2, and the report will show: * opening quantity as at date1-1 * qty in bewteen date1 and date2 * qty out bewteen date1 and date2 * closing balance as at date2 can I get above trx from IV30200? thks The table IV30200 is the Inventory Transaction Header History. That alone can not solve your purpose. You require one more table IV30300 which is Inventory Transaction Details History. This table will contain your IV Trx Line details such as Item Number, UOFM, Sit...

? Initialize ComboBox Edit String
Hi, I give up! I have spent the past four or so hours trying to figure out this blasted thing which I'm sure is (at least supposed to be) very simple, if not trivial. I've written a class based on CComboBox. What I am trying to do is to get it to automatically set the text in the edit control to a default, like an edit control which starts out with "enter username" and the like. What I did was to use SetWindowText in PreSubclassWindow. It successfully sets the edit control text (I used SetWindowText followed immediately by GetWindowText as a test). However, when the di...

saving xsltransform to a file
Hi I would like to save a cached version of an xsltransform class to a file but can find no way of serializing it or getting at the string representation of the stylesheet I could load the stylesheet into a reader, create a copy and use one to write to the transform class, one to the cached file. The problem with this is that some stylesheets will contain <xsl:import href="myFile.xsl"/> so if we read to a reader, then load into a xsltransform, it will evaluate this as <program file>/myFile.xls rather than <stylesheetUrl>/myfile.xsl (which is how the xsltra...

Unable to save GIF images fro outlook express
Dear friends, I'm accesing mails only through oulook express. I cannot able to save the GIF files in my hard disk from my outlook express. By default it saves as a BMP file. In BMP files the animation is not found in the images. How can i save a GIF file from outlook express.Please help me out. Thanks in advance. ...

Can't save e-mail Drafts
In Outlook 2003, if I wish to save an e-mail as a Draft becasue I an not finished, or wish to send it at a later time, I am not able to do so. Is there a setting which can be checked to see why all of the suddden I am not able to save e-mail in the Drafts folder? File | Sae usually works. there can be an issue when emails are initiated externally but that usually only means they get saved in the Inbox. "Susan Hollis" <Susan Hollis@discussions.microsoft.com> wrote in message news:93E516FF-1538-47BC-8A13-704576307EBD@microsoft.com... > In Outlook 2003, if I wish to save...

Inhibit tick boxes
I have a form with about 7 tick box controls. What can I do so that once one box is ticked the others become inactive and a message pops up that says "You can only tick one box at a time" Would I be better using radio buttons? Thanks Tony -- Why don't my grey cells communicate with each as fast as they used to? I hate getting old! Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201002/1 It's not so much radio buttons as it is an option group. However, if you are storing the seven values in seven different...

Why can't I save my file, says its "folder is marked as read only
I'm using it through the citrix access platform via my school and I can't save it to my computer, it keeps giving me the "folder is marked as read only" message. ...

data validation box arrow
Excel 2002 SP3 Win XP HE Hi, On a data validation cell using the drop down list, is it possible to retain the down arrow *always* visible--as opposed to being visible only when clicking on cell? Thanks. No, it is not possible if you use validation. You can use a combobox from the control toolbox instead -- Regards, Peo Sjoblom "stef" <notvalid@nomail.nul> wrote in message news:ONw$8bg%23HHA.1416@TK2MSFTNGP03.phx.gbl... > Excel 2002 SP3 > Win XP HE > > Hi, > On a data validation cell using the drop down list, is it possible to > retain the dow...

Combo box Null value
Hi. I have a combo box that the user selects a value from to populate a sub-form. Sometimes, I get an error relating the value of the Combo-box being Null when it has clearly got a value populated on the form. How do I get the value of the combo-box selection on the form if programatically, the value is null? I hope this makes sens! Cheers, Steve. What you see selected in the combo box and what the value of the bound column is are not necessarily the same thing. When you simply refer to Me!NameOfComboBox (or Forms!NameOfForm!NameOfComboBox), you get the value of the bound column....

How to change content in dialog box?
I started a dialog-based project and want to change the pages of control sets in the dialog like using tab control. But I don't want the tab control apperance. I just want the whole page change to another page like install wizards. How can I achieve this? Thx a lot "Alex" <alexcheung@perceptiondigital.com> wrote in message news:%23z5JI10JEHA.3924@tk2msftngp13.phx.gbl... > I started a dialog-based project and want to change the pages of control > sets in the dialog like using tab control. But I don't want the tab control > apperance. I just want the whole pa...