Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

data sharing in Visual C++ 5.0

Posted on 1998-08-12
8
Medium Priority
?
210 Views
Last Modified: 2013-11-20
I have several dialog boxes in my project and I need to take amounts from one
   screen to another, will someone please tell me how to share the data between
   them.  I have already create variables for the edit boxes which I am trying to share
   data between.  The data I am trying to get is in CService2Dialog and I am trying
   to place it in CServiceDialog. Please tell me how to do this they easiest way.
   Thank You for the much need help!
0
Comment
Question by:troy24
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 7

Expert Comment

by:psdavis
ID: 1320653
Troy, delete this question.
0
 
LVL 1

Expert Comment

by:Musashi
ID: 1320654
If a 50 point question is considered easy, a 5 point question is probably so absurdly trivial that you know the answer the moment you ask it. So troy24, why do you think so many people insist on posting 5 point questions?  Perhaps experts should show a little personal pride and shun such questions, or are we so addicted to providing answers that we have no standards?  I'm not sure that I can think of a valid 5 point question; maybe "How do you correctly spel Mikrosofd?"

Troy24, the answer to your question IS Easy, however it IS NOT absurdly trivial.
0
 
LVL 6

Expert Comment

by:thresher_shark
ID: 1320655
To share data between dialog boxes, you have to...

-------
You post 5 point question, we post 5 point responses :-)
0
Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

 
LVL 7

Expert Comment

by:psdavis
ID: 1320656
p.s.  Your points aren't limited.  You can BUY more points. That's how experts-exchange stays in business.

0
 

Accepted Solution

by:
bogie2 earned 60 total points
ID: 1320657
This should work:

CService2Dialog dlg2;
CServiceDialog dlg;
dlg2.DoModal();
dlg.m_myvar = dlg2.m_myvar;
dlg.UpdateData();
dlg.DoModal();

0
 
LVL 7

Expert Comment

by:psdavis
ID: 1320658
Bogie!!! Quit that... He's asked the question already.

However... ;) Your code won't work either.  You're creating two modal dialog boxes in your example.  The first one has to finish before the second DoModal will execute.

Phillip
0
 

Author Comment

by:troy24
ID: 1320659
Adjusted points to 25
0
 
LVL 7

Expert Comment

by:psdavis
ID: 1320660
Bogie, You know, depending on exactly what he's trying to do, it just might work anyway.  If all he's trying to do is take data collected from the first dialog and close that first dialog and then open up the second dialog and transfer the data to it, then you are absolutely correct and have given the best answer.

Sorry for the previous comment.

Phillip
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question