Updating dialog controls

Hi,

I have a SDI application written with Visual C++ 6.

The view is a CFormView. The first dialog in the CFormView has CTabCtrl to
switch between dialogs.

When  I open a file, I want that the data ,in this file, to be put in the
differents controls of all of the dialogs.
But I don't know how to do this.

I think I have to do this in the CFormView OnUpdate member function. I have
tried also mTab.UpdateData(FALSE), but without success.

Does anyone has suggestions ?

Thanks,

Claude



0
11/29/2003 4:36:28 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
496 Views

Similar Articles

[PageSpeed] 22

Claude Gagnon wrote:
> Hi,
> 
> I have a SDI application written with Visual C++ 6.
> 
> The view is a CFormView. The first dialog in the CFormView has CTabCtrl to
> switch between dialogs.
> 
> When  I open a file, I want that the data ,in this file, to be put in the
> differents controls of all of the dialogs.
> But I don't know how to do this.
> 
> I think I have to do this in the CFormView OnUpdate member function. I have
> tried also mTab.UpdateData(FALSE), but without success.
> 
> Does anyone has suggestions ?
> 
> Thanks,
> 
> Claude
> 
> 
> 

You should add a function to each tab page dialog to put the data in its 
own controls.  Call each of these functions from CFormView OnUpdate. 
OnUpdate can access the document and read each individual data item from 
document variables, or it could simply pass the document pointer to the 
dialog functions so they can access the document data they need.

-- 
Scott McPhillips [VC++ MVP]

0
scottmcp1 (239)
11/29/2003 4:53:12 PM
Hi Scott,

Thanks for your answer.

 It helps me and I have found the solution.

Bye,

Claude

"Scott McPhillips [MVP]" <scottmcp@mvps.org.nowhere> a �crit dans le message
de news: Otlj6lptDHA.2340@TK2MSFTNGP12.phx.gbl...
> Claude Gagnon wrote:
> > Hi,
> >
> > I have a SDI application written with Visual C++ 6.
> >
> > The view is a CFormView. The first dialog in the CFormView has CTabCtrl
to
> > switch between dialogs.
> >
> > When  I open a file, I want that the data ,in this file, to be put in
the
> > differents controls of all of the dialogs.
> > But I don't know how to do this.
> >
> > I think I have to do this in the CFormView OnUpdate member function. I
have
> > tried also mTab.UpdateData(FALSE), but without success.
> >
> > Does anyone has suggestions ?
> >
> > Thanks,
> >
> > Claude
> >
> >
> >
>
> You should add a function to each tab page dialog to put the data in its
> own controls.  Call each of these functions from CFormView OnUpdate.
> OnUpdate can access the document and read each individual data item from
> document variables, or it could simply pass the document pointer to the
> dialog functions so they can access the document data they need.
>
> --
> Scott McPhillips [VC++ MVP]
>


0
11/29/2003 8:04:53 PM
Reply:

Similar Artilces:

minimising a dialog
Hi, I want to minimise my dialog, but i've removed the minimize / maximise buttons. I'm going to use one of my own buttons, but I don't know how to call the minimisation. I've removed the exit button, but have created my own one instead. However, one draw back of removing the title bar etc is that in the system tray thing (not sure what it's called) at the bottom middle of my screen, with most applications it shows the name, and then a right click will give the optinos of closing, maximising etc. Anyway, these are now not there. How do I fix this? Any help much appreciat...

Too many problems while updating information online
Several of my accounts are unable to update information online using MS Money 2007 Deluxe - ING Direct - Bestbuy Card (HSBC) - MBNA - Bank of America This is frustrating!! Anyone else with the same problems? Just keep trying, eventually it will work. If you're in a bind, download the QIF or OFX files from the institutions web sites -- B of A works better that way anyway :) Paul McKenna <Paul McKenna@discussions.microsoft.com> wrote: >Several of my accounts are unable to update information online using MS Money >2007 Deluxe > >- ING Direct >- Bestbuy Card (HSBC...

Control "Reply to all" for dl's.
We have a global distribution list that only one user will have access to. How do we stop someone from replying to all when they receive a message from that dl? thanks On Thu, 12 May 2005 12:36:06 -0700, "MJKQB" <MJKQB@discussions.microsoft.com> wrote: >We have a global distribution list that only one user will have access to. >How do we stop someone from replying to all when they receive a message from >that dl? > >thanks Exchange General tab/ Message Restrictions and add the users who can send to that DL. ...

Windows update site problems
So whats happening with the windows update site ?I keep getting a message telling me there is a problem with the web page (am trying to update new installation of XP Home),is it me or the site,and when will it be sorted out? -- Be happy,Strat4axe "stat4axe" <strat4axe@hotmail.com(donotspam)> wrote in message news:36618CFD-EF82-4F82-A7C3-90CF2DDCCEA5@microsoft.com... > So whats happening with the windows update site ?I keep getting a message > telling me there is a problem with the web page (am trying to update new > installation of XP Home),is it me o...

RE: Use that security update
--dedtgpho Content-Type: multipart/related; boundary="yzkfzsfqtv"; type="multipart/alternative" --yzkfzsfqtv Content-Type: multipart/alternative; boundary="qeviqcxczwaquy" --qeviqcxczwaquy Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Microsoft Consumer this is the latest version of security update, the "October 2003, Cumulative Patch" update which eliminates all known security vulnerabilities affecting MS Internet Explorer, MS Outlook and MS Outlook Express as well as three newly discovered vulnerabilities. Install now to hel...

Non-modal dialog pParent initialization (and warning C4355)
I have read several posts about "warning C4355: 'this' : used in base member initializer list", and I understand about the object of 'this' not being fully initialized, but that it is common 'safe' practice to use this method to only save a pointer for future use.. OK, my question is; What is the proper or best way to initialize a non-modal dialog? I have used two methods: 1.) CFooDlg::CFooDlg(CWnd* pParent /*=NULL*/) : CDialog(IDD, pParent) { // pParent is not set here, See Create pCV=NULL; } BOOL CFooDlg::Create(CWnd * pParent) { pCV=(CMyBar ...

Updating Boolean Field with onChange
I am having difficulty with setting a value of a new boolean field using the OnChange scripting against a picklist. If anyone has some sample code / formatting information that I can use it would be greatly appreciated. Also, I also need to know if it is possible to stop the default value for the Revenue (isrevenuesystemcalculated) field on the opportunity form being set to "Yes" when the "Convert Lead" function is used. We can set the default value to "No" for user created Opportunities but when Convert Lead is used it seems to ignore the default value. Again, a...

Outlook 2003 Folder & Favorite-folder synch/update problems
I've been using Outlook since 1998 and I make my living at software support, so I'm usually hard to stump, but I'm sucking wind on this one. The problems below all started on the remote Outlook copy, so I have to imagine they're connected to the remote setup and OST files. But I've been through the settings and tried to re-synch, cleared the folder store and recreated it, etc., and nothing seems to correct the problems. Can anyone suggest a systematic way to diagnose and fix what's happening? Here's the story: I'm running Outlook 2003 (all current patches: ...

Dialog displayed
Hi I'm creating a dialog and calling it with domodal(). Is there a message handler or something insode my dialogclass that is called after the dialog is displayed? Thanks Urban Yes & No. Take a look at the OnInitDialog() message handler. OnInitDialog() gets called before the dialog is displayed. However you can post a user-defined message to yourself from the OnInitDialog() handler, and handle things that you want to do after the dialog is displayed. -- Cheers Check Abdoul [ VC++ MVP ] ----------------------------------- "Urban Stadler" <mail@ustadler....

Outlook/Access 2003
I've been doing a lot of research and purchased (but haven't completely read) Sue Mosher's book. However, before I spend much more time I'd like to find out if my idea is even feasible. The basic idea is to create an appointment system for multiple therapists that can be used by a receptionist and other staff. Using Outlook and Exchange is very nice but the appointment data needs to end up in an Access table immediately. We can purchase SBS 2003 with Exchange 2003 or we can buy a third party tool for calendar sharing whichever would be the easiest to use. I currently...

getting the error when updating file xls file.
Hi. We are using exchange 2003 server and office XP but know we start to Upgrade our office to office 2003 Know we are face problem. When our user try to make changes to file in public folder there can not make the changes it say “file is read only” but that user can make the changes or edit that same file from the P.C were office XP is installed. Do I have to install some patch if yes can you please send that patch because in trying from last two day and I can not find it. Note: If possible can you reply on parag.lopes@madinatjumeirah.com Just a guess... Are you s...

Comments entered on Task Updates to Manager: Where does it get sto
There is a checkbox option on the My Tasks page for team members to select and send comments about task updates to their managers. Anyone know where these task comments can be reviewed other than when the PM opens it up to approve? It does not seem to be retained anywhere like the Notes get retained. Hi Kahuna, PM can see the comments with Approvals -> Task Updates -> Go To -> Applied Requests and Errors, clicking on the task name. The approval history is listed there including comments. A team member can see them with clicking in the task name in 'My Tasks&#...

active X control
I have a calandar (active x control) on my form. Does anyone know how to link/sync it to a bound control; i.e., when a user chooses a date control, the calandar appears, and when a date is selected it populates into the requisite field. alex Try this: http://www.datastrat.com/Download/XCalendar2K.zip -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "alex" <sql_aid@yahoo.com> wrote in message news:1182963470.109302.283780@q75g2000hsh.googlegroups.com... >I have a calandar (active x control) on my form. > Does anyo...

increment through controls on form
I have a form that I've name the controls on it in such a way that I could determine through open args if it should be locked or not. Example any text box that begins with txtd would be unlocked with open args of 1. I was hoping there was a way I could just move through the controls in a loop and set that property with one function.....I'm not for sure how to accomplish this though. Does anyone have some sample code on how to "loop" through all the controls on a form and set the locked property? I can write the criteria portion if I could get a sample of how to ...

Unable to delete the Dead Domain controller
Dear, Iam working on windows server 2008 Ent Ed I have two doman controllers in the domain both are GC but only one domain controller has all the fsmo roles but iam having replicattion problems with the dead DC (i.e mppkw-database) and Iam unable to delete or remove the dead domain controller from the domain and iam having follwing problems using the ntdsutil :- matadata cleanup select operation target: list domains Found 1 domain(s) 0 - DC=mediaphoneplus,DC=com select operation target: select domain 0 No current site Domain - DC=mediaphoneplus,DC=com No current server N...

Update from Money 2007 Premium
I currently use Money 2007 Premium. I plan on installing Money Plus Deluxe. They look to be pretty much the same. Will anything be lost going from 2007 Premium to Plus Deluxe? Thanks, Bob K The services provided by Premium. (Gainskeeper, et al.) "Bob K" <BobK@discussions.microsoft.com> wrote in message news:8C0C34A6-F03E-49AC-8B54-BAFF63BC538A@microsoft.com... > Will anything be lost going from 2007 > Premium to Plus Deluxe? "Dick Watson" wrote: > The services provided by Premium. (Gainskeeper, et al.) > > "Bob K" <BobK@discus...

More control over taxation
I would like to be able to exempt items for different levels of taxation while still using "tax by customer." Rather than taxable or non-taxable, I need to be able to exempt from federal and state separately. Thanks, dan@endurosport.com ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree...

Exchange error
Hello, for one week now, my exchange 2000 server crashes nearly every night at random time, the only solution to have it all restart is to restart the entire server. In the application log, multiple error events are reported like these : Event Type: Error Event Source: Userenv Event Category: None Event ID: 1000 Date: 26/07/2005 Time: 01:27:39 User: NT AUTHORITY\SYSTEM Computer: BELLINI Description: Windows cannot establish a connection to *domain name* with (1364). Event Type: Error Event Source: Userenv Event Category: None Event ID: 1000 Date: 26/07/2005 Time: 01:37:41 User: ...

can't download email after MS updates
I'm using Outlook 2000 with Win XP Pro and I was able to download all my emails from my POP3 server, but coincidentally after doing the windows regular updates yesterday the Outlook doesn't download the emails. Although I can do send...I don't get any errors or dialog boxes for promts when i do send & receive. Thanks, Ik. Can you turn on diagnostic logging (see http://support.microsoft.com/default.aspx?scid=kb;en-us;Q240347) and post the POP3Log.txt file? -- Jeff Stephenson Outlook Development This posting is provided "AS IS" with no warranties, and confers n...

Tab control + having same size for all tabs
Hello All I am working on tab control in which I want to set the same size of all tabs of tab control. I am adding the tabs dynamically . When I saw the .NET style tab control ( Look tab control used in MSDN) , I felt that it is more elegant than the old looked MFC tab control. My ultimate goal is to have the same size for all tabs irrespective of text it has ( MFC's default behaviour shows the full text in tab ) If the text exceeds that width, then It will make it shortened by adding .... ( three dots ) (e.g. "The text of tab...Will Come here" ) , I know that I will have to wri...

How do I use the "Correlation" dialog box with multiple ranges?
I'm using data in an Excel 2003 in a workbook, trying to see if there is any correlation between specific offices in which people work and the length of time they have been employed, their age the amount of sickleave taken and/or the amount of sickleave balance they have. I'm attempting to use Data Analysis and the Correlation dialog box. Although the dialog description tells me that I can use multiple comparison ranges, I don't see how to do it. Thanks for any help. Paulf6 - Arrange your data in list (database) format, i.e., names in the top row (Time Employed, Age, ...)...

UPDATE KB979202 MS silverlight problem
Hello, I was able to have all updates install, but i'm stuck with this KB979202. When I install it, a box popup (windows Installer) and ask for "enter path to folder containing installlation package silverlight.msi". ??? I try to uninstall silverlight and same message appear and ask for silverlight.msi?? Can anyone help? Thank in advance. By the way, I'm using Windows XP SP3 PRO. "powersupply" <powersupplydot007@gmaildotcom> ���g��l��s�D:O0dCAgz%23KHA.1892@TK2MSFTNGP05.phx.gbl... > Hello, > > I was able to have all updates i...

SPC Control Charts
Does anyone know if Excel can create SPC control charts? I can not find them anywhere. Not as a basic chart type. You can roll your own. http://www.peltiertech.com/Excel/Charts/statscharts.html#CtrlCht has suggestions. Jerry Skip wrote: > Does anyone know if Excel can create SPC control charts? > I can not find them anywhere. ...

get speed between device incorrect in Win7 with two controller
when I debug a 1394B image device driver on windows 7 x64, I found the result of REQUEST_GET_SPEED_BETWEEN_DEVICES requesting incorrect sometimes, I have two controller, one 1394B (TI's PCIE chip), one is 1394A, my image device run at S800, and connected on 1394B port. I want to get the speed between device and host is 8 (S800), but sometimes I got 4 when I power on my device with cable had connected. Is there a bug of windows 7 1394 bus stack? thanks for any helps. -- Steven ...

How to remove Quotes update
Money Plus When i do online updates how can i remove Quotes updates. Now i have to uncheck them everytime. Is there a way to make it unchecked ? In microsoft.public.money, desgnr wrote: >Money Plus >When i do online updates how can i remove Quotes updates. >Now i have to uncheck them everytime. >Is there a way to make it unchecked ? > Are you saying that Portfolio->UpdatePrices->PickQuotesToDownload is not remembering that you cleared the box? A sure-fire way to make a security not do a price update is to remove its symbol. How do i remove the symbol ? "Cal ...